mirror of https://github.com/sipwise/netscript.git
Starting with lvm2 v2.02.111 it includes a udev rules file named /lib/udev/rules.d/69-dm-lvm-metad.rules (see http://sources.debian.net/src/lvm2/2.02.111-2.2%2Bdeb8u1/udev/69-dm-lvm-metad.rules.in/ wheras its "(PVSCAN_RULE)" corresponds to RUN+="/sbin/lvm pvscan --cache --activate ay --major $major --minor $minor", ENV{LVM_SCANNED}="1" in the installed /lib/udev/rules.d/69-dm-lvm-metad.rules). The udev rule gets triggered during disk changes and automatically invokes `lvm pvscan [...]`, triggering the following behavior if a LV is already present on a disk: | # dmsetup ls # it's empty | # parted -s /dev/sda mklabel msdos | # parted -s /dev/sda mkpart primary 1048576B 8589934591B | # dmsetup ls # this will list already existing LVs, like: | vg0-swap .... | vg0-root ... | # blockdev --rereadpt /dev/sda # this will fail now with "Device or resource busy" This causes deployments to fail if it's reinstalled on a system that already had any LVs on the target disks. Change-Id: I35cdd437e2c8de0ca956adce9891bb0b23f70d3bchanges/60/13160/1
parent
dce4d36070
commit
c02a3ab79f
Loading…
Reference in new issue