1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-29 15:22:30 +03:00
lvm2/scripts
David Teigland c609dedc2f Allow system.devices to be automatically created on first boot
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.
2024-05-21 16:29:12 -05:00
..
lvm2create_initrd doc: change fsf address 2016-01-21 12:11:37 +01:00
.gitignore git: update .gitignore 2021-03-19 23:21:18 +01:00
blk_availability_init_red_hat.in shellcheck: some apostrophe changes and cleanups 2017-10-25 22:02:54 +02:00
blk_availability_systemd_red_hat.service.in remove static autoactivation 2022-01-27 16:43:11 -06:00
blkdeactivate.sh.in blkdeactivate: add missing VDO_AVAILABLE check in deactivate_vdo 2020-06-08 15:41:35 +02:00
cmirrord_init_red_hat.in shellcheck: some apostrophe changes and cleanups 2017-10-25 22:02:54 +02:00
code-stats.rb scripts/code-stats.rb: count files better, handle bad utf8 2018-05-17 09:52:13 +01:00
com.redhat.lvmdbus1.conf lvmdbus: Add new daemon. 2016-02-17 23:53:35 +00:00
com.redhat.lvmdbus1.service.in systemd: use proper sbindir path 2017-10-25 22:02:54 +02:00
dm_event_systemd_red_hat.service.in systemd: remove Install sections from socket-activated services 2017-11-01 15:37:19 +01:00
dm_event_systemd_red_hat.socket.in systemd: use RemoveOnStop for dm-event.socket and lvm2-lvmetad.socket 2014-06-13 15:45:25 +02:00
fsadm.sh lvresize: add new options and defaults for fs handling 2022-09-13 15:15:05 -05:00
gdbinit doc: change fsf address 2016-01-21 12:11:37 +01:00
lvm2_cmirrord_systemd_red_hat.service.in systemd: add missing Before=shutdown.target to LVM2 services to fix shutdown ordering 2019-04-09 12:24:37 +02:00
lvm2_lvmdbusd_systemd_red_hat.service.in systemd: use proper sbindir path 2017-10-25 22:02:54 +02:00
lvm2_lvmpolld_init_red_hat.in shellcheck: some apostrophe changes and cleanups 2017-10-25 22:02:54 +02:00
lvm2_lvmpolld_systemd_red_hat.service.in systemd: add missing Before=shutdown.target to LVM2 services to fix shutdown ordering 2019-04-09 12:24:37 +02:00
lvm2_lvmpolld_systemd_red_hat.socket.in systemd: put back DefaultDependencies=no for lvmpolld socket unit 2019-04-11 12:18:02 +02:00
lvm2_monitoring_init_red_hat.in shellcheck: some apostrophe changes and cleanups 2017-10-25 22:02:54 +02:00
lvm2_monitoring_init_rhel4 doc: change fsf address 2016-01-21 12:11:37 +01:00
lvm2_monitoring_systemd_red_hat.service.in remove static autoactivation 2022-01-27 16:43:11 -06:00
lvm2_tmpfiles_red_hat.conf.in Use 'd' instead of 'D' in tmpfiles configuration to not overwrite any existing directory. 2012-02-23 14:24:30 +00:00
lvm2-pvscan.service.in lvm2-pvscan: include --autoactivation event 2021-11-04 14:14:37 -05:00
lvm_import_vdo.sh vdo: typo fix 2023-09-14 10:01:43 +02:00
lvm-devices-import.path Allow system.devices to be automatically created on first boot 2024-05-21 16:29:12 -05:00
lvm-devices-import.service Allow system.devices to be automatically created on first boot 2024-05-21 16:29:12 -05:00
lvmdump.sh.in shellcheck: updates 2021-04-23 23:00:55 +02:00
lvmlockd.service.in More cleanup needed for dropped scripts 2018-09-13 11:09:25 -05:00
lvmlocks.service.in Fix scripts/lvmlocks.service.in using nonexistent --lock-opt autowait 2020-04-21 16:52:45 -05:00
lvresize_fs_helper.sh lvresize_fs_helper: cleanup shellcheck warns 2023-02-10 17:50:27 +01:00
Makefile.in makefiles: use SHOW 2024-04-08 14:52:23 +02:00
relpath.awk doc: change fsf address 2016-01-21 12:11:37 +01:00
vgimportclone.sh shellcheck: updates 2021-04-23 23:00:55 +02:00
VolumeGroup.ocf Add OCF support 2010-11-05 16:18:38 +00:00