mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-30 17:18:21 +03:00
c609dedc2f
An OS installer can create system.devices for the system and disks, but an OS image cannot create the system-specific system.devices. The OS image can instead configure the image so that lvm will create system.devices on first boot. Image preparation steps to enable auto creation of system.devices: - create empty file /etc/lvm/devices/auto-import-rootvg - remove any existing /etc/lvm/devices/system.devices - enable lvm-devices-import.path - enable lvm-devices-import.service On first boot of the prepared image: - udev triggers vgchange -aay --autoactivation event <rootvg> - vgchange activates LVs in the root VG - vgchange finds the file /etc/lvm/devices/auto-import-rootvg, and no /etc/lvm/devices/system.devices, so it creates /run/lvm/lvm-devices-import - lvm-devices-import.path is run when /run/lvm/lvm-devices-import appears, and triggers lvm-devices-import.service - lvm-devices-import.service runs vgimportdevices --rootvg --auto - vgimportdevices finds /etc/lvm/devices/auto-import-rootvg, and no system.devices, so it creates system.devices containing PVs in the root VG, and removes /etc/lvm/devices/auto-import-rootvg and /run/lvm/lvm-devices-import Run directly, vgimportdevices --rootvg (without --auto), will create a new system.devices for the root VG, or will add devices for the root VG to an existing system.devices. |
||
---|---|---|
.. | ||
bcache-utils.c | ||
bcache.c | ||
bcache.h | ||
dev_util.c | ||
dev-cache.c | ||
dev-cache.h | ||
dev-dasd.c | ||
dev-ext-udev-constants.h | ||
dev-ext.c | ||
dev-io.c | ||
dev-luks.c | ||
dev-lvm1-pool.c | ||
dev-md.c | ||
dev-mpath.c | ||
dev-swap.c | ||
dev-type.c | ||
dev-type.h | ||
device_id.c | ||
device_id.h | ||
device-types.h | ||
device.h | ||
filesystem.c | ||
filesystem.h | ||
online.c | ||
online.h | ||
parse_vpd.c |