mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +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. |
||
---|---|---|
.. | ||
lvm2create_initrd | ||
.gitignore | ||
blk_availability_init_red_hat.in | ||
blk_availability_systemd_red_hat.service.in | ||
blkdeactivate.sh.in | ||
cmirrord_init_red_hat.in | ||
code-stats.rb | ||
com.redhat.lvmdbus1.conf | ||
com.redhat.lvmdbus1.service.in | ||
dm_event_systemd_red_hat.service.in | ||
dm_event_systemd_red_hat.socket.in | ||
fsadm.sh | ||
gdbinit | ||
lvm2_cmirrord_systemd_red_hat.service.in | ||
lvm2_lvmdbusd_systemd_red_hat.service.in | ||
lvm2_lvmpolld_init_red_hat.in | ||
lvm2_lvmpolld_systemd_red_hat.service.in | ||
lvm2_lvmpolld_systemd_red_hat.socket.in | ||
lvm2_monitoring_init_red_hat.in | ||
lvm2_monitoring_init_rhel4 | ||
lvm2_monitoring_systemd_red_hat.service.in | ||
lvm2_tmpfiles_red_hat.conf.in | ||
lvm2-pvscan.service.in | ||
lvm_import_vdo.sh | ||
lvm-devices-import.path | ||
lvm-devices-import.service | ||
lvmdump.sh.in | ||
lvmlockd.service.in | ||
lvmlocks.service.in | ||
lvresize_fs_helper.sh | ||
Makefile.in | ||
relpath.awk | ||
vgimportclone.sh | ||
VolumeGroup.ocf |