1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/lib
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
..
activate activation: log_debug_activation 2024-05-14 17:59:16 +02:00
cache lvmcache: stop saving duplicate pvs info between scans 2024-04-26 14:13:46 -05:00
cache_segtype const: _ops segtype handler 2024-05-04 01:01:57 +02:00
commands Allow system.devices to be automatically created on first boot 2024-05-21 16:29:12 -05:00
config Allow system.devices to be automatically created on first boot 2024-05-21 16:29:12 -05:00
datastruct cleanup: eliminate unused assign 2021-03-11 00:18:01 +01:00
device Allow system.devices to be automatically created on first boot 2024-05-21 16:29:12 -05:00
display const: use arrays of strings 2024-05-04 01:01:57 +02:00
error const: _ops segtype handler 2024-05-04 01:01:57 +02:00
filters const: use arrays of strings 2 2024-05-04 01:01:57 +02:00
format_text gcc: same signess 2024-05-14 17:59:26 +02:00
freeseg device_mapper: remove dbg_malloc. 2018-06-08 13:40:53 +01:00
integrity const: _ops segtype handler 2024-05-04 01:01:57 +02:00
label label: make scan_bcache local 2024-05-13 02:21:37 +02:00
locking refactor: update dm_strncpy to _dm_strncpy 2024-04-04 19:38:21 +02:00
log const: log level string 2024-05-04 01:01:57 +02:00
lvmpolld const: _fns poll_function 2024-05-04 01:01:57 +02:00
metadata cov: enum mapping cache format 2024-05-08 01:55:21 +02:00
mirror const: _ops segtype handler 2024-05-04 01:01:57 +02:00
misc clenaup: update local static with _ 2024-05-08 01:55:21 +02:00
mm gcc: same signess 2024-05-14 17:59:26 +02:00
notify debug: check for syscalls 2023-09-03 22:03:33 +02:00
properties build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
raid const: _ops segtype handler 2024-05-04 01:01:57 +02:00
report gcc: same signess 2024-05-14 17:59:26 +02:00
snapshot const: _ops segtype handler 2024-05-04 01:01:57 +02:00
striped const: _ops segtype handler 2024-05-04 01:01:57 +02:00
thin const: _ops segtype handler 2024-05-04 01:01:57 +02:00
unknown const: _ops segtype handler 2024-05-04 01:01:57 +02:00
uuid refactor: remove (void) from dm_strncpy usage 2024-04-04 19:38:21 +02:00
vdo const: _ops segtype handler 2024-05-04 01:01:57 +02:00
writecache const: _ops segtype handler 2024-05-04 01:01:57 +02:00
zero const: _ops segtype handler 2024-05-04 01:01:57 +02:00
Makefile.in devices: factor common list functions 2022-11-07 11:38:46 -06:00