Automatic LVM assembly - call for testers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Traditionally, LVM is assembled by running "vgchange -ay" manually. That
has several problems, especially if one of the physical volumes is
missing when the VG was supposed to be assembled. This has been
experienced by people who use LVM on USB storage for their root device.

I came up with a way of assembling LVM automatically through udev: A
udev rule combined with a short shell script waits until all required
physical volumes have been detected, then assembles the volume group in
the background. This also works when adding a removable device to the
system at any time.

I'm asking anyone with LVM and a bit of spare time to test this. I'm
especially interested in results from people who have a volume group on
more than one hard drive.

This is how it works: Get the package from:
http://dev.archlinux.org/~thomas/lvm_autoassemble/
If you want to use this for detection of your boot device: Replace the
"lvm2" hook with the "lvm_autoassemble" hook in mkinitcpio.conf and
recreate the initramfs (make sure to keep a copy of the working one, as
always).

Possible side-effects: There may be some trouble when dealing with
removable devices that contain LVM physical volumes: The volume groups
are automatically activated, but have to be deactivated manually before
removing the drive. Furthermore, when you remove a device and add it
again later, the mechanism that detects whether all PVs have been found
might fail and "vgchange -ay" may be run too often.

Another side-effect is that I didn't add --ignoremonitoring to the
script, so dmeventd may be started in initramfs (for mirror or snapshot
volumes), which may not be desired.

Any feedback is welcome.

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux