Taken from here
This is put here for my reference, in case the above link ever breaks.
When you use a DRBD device as an underlying block device for lvm as described in the drbd manual you may face the following error after reboot and start DRBD. Lower device is already claimed The reason is the lack of the lvm.conf in the initramfs. To add this file to the initramfs simply follow these steps: edit the file
/usr/share/initramfs-tools/hooks/lvm2
and add
[ -r /etc/lvm/lvm.conf ] && mkdir $DESTDIR/etc/lvm && cp /etc/lvm/lvm.conf $DESTDIR/etc/lvm
after the lines contains
cp -p /etc/udev/rules.d/85-lvm2.rules ${DESTDIR}/etc/udev/rules.d
so that it looks like
cp -p /etc/udev/rules.d/85-lvm2.rules ${DESTDIR}/etc/udev/rules.d
[ -r /etc/lvm/lvm.conf ] && mkdir $DESTDIR/etc/lvm && cp /etc/lvm/lvm.conf $DESTDIR/etc/lvm
[ -r /etc/lvm/lvm.conf ] && mkdir $DESTDIR/etc/lvm && cp /etc/lvm/lvm.conf $DESTDIR/etc/lvm
then you have to rebuild the initramfs using
update-initramfs -u
and to restart the system in order to modifications can take effect
reboot
Now DRBD should start as wanted, assuming you had modified the lvm.conf as mentioned in the link.
Comments
Post a Comment