1

I need use the command "vgchange -ay" every system reboot. The LVM is make with local drive on the host, i have two partition as PVs on two diferents drives. The LV is a raid 1. I mount this as storage repository for my VMs vdisks and this work but when i reboot this is detach and when i use the lvdisplay commnad i get the NOT AVAILABLE message for this LV.

Thanks in advance.

RodixPy
  • 363
  • 3
  • 15
  • I have the same problem with Xenserver 7.0. Looks like some protection mechanism. However the Xen's local ext3 storages are correctly mounted after the boot and even they are not in the fstab. There is a custom processing somewhere in the boot process. – csadam Jan 25 '18 at 21:33

1 Answers1

1

I can confirm, what's worse is that Xen Server 7 will not boot if I have a mountpoint in /etc/fstab for my LV...due to same reason, LV being NOT AVAILABLE, halting systemd boot and downing my server. Seems like a bug...

Workaround for me was to set metadata_read_only to 0 in /etc/lvm.conf and add 'vgchange -a y' to /etc/rc.local like so

#!/bin/bash
# THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES
#
# It is highly advisable to create own systemd services or udev rules
# to run scripts during boot instead of using this file.
#
# In contrast to previous versions due to parallel execution during boot
# this script will NOT be run after all other services.
#
# Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure
# that this script will be executed during boot.

exec 2> /tmp/rc.local.log      # send stderr from rc.local to a log file
exec 1>&2                      # send stdout to the same log file
echo "rc.local started"        # show start of execution
set -x                         # tell sh to display commands before execution

touch /var/lock/subsys/local
vgchange -a y
mount /dev/VG_XenStorage-0ddceea1-3812-d470-7b8a-85b7834adb19/ISO /mnt/iso

echo "rc.local completed"
supersonik
  • 11
  • 2