1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-11 20:58:50 +03:00
David Teigland e9f7918c57 Allow system.devices to be automatically created on first boot
This is intended for image-based OS deployments, where an installer
is not run on the target machine to create a custom system.devices.

Instead, the OS image preparation can configure the image so that
lvm will automatically create system.devices for the root VG on
first boot.

image preparation:
- create empty file /etc/lvm/devices/auto-import-rootvg
- remove any existing /etc/lvm/devices/system.devices
- enable lvm-devices-init.path and lvm-devices-init.service

on first boot:
- udev triggers vgchange -aay --autoactivation event <rootvg>
- vgchange activates LVs in the root VG
- vgchange finds finds auto-import-rootvg, and no system.devices,
  so it creates /run/lvm/lvm-devices-init
- lvm-devices-init.path is run when /run/lvm/lvm-devices-init
  appears, and triggers lvm-devices-init.service
- lvm-devices-init.service runs vgimportdevices --rootvg --auto
- vgimportdevices finds 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-init
2024-04-25 15:52:28 -05:00
..
2016-01-21 12:11:37 +01:00
2024-03-28 18:18:37 +01:00
2016-01-21 12:11:37 +01:00
2023-02-10 17:50:27 +01:00
2023-08-14 17:02:11 +02:00
2024-03-17 13:17:53 +01:00
2022-09-09 16:18:55 -05:00
2020-10-20 22:22:52 +02:00
2020-10-20 22:22:52 +02:00
2020-10-20 22:22:52 +02:00
2020-10-20 22:22:52 +02:00
2016-01-21 12:11:37 +01:00
2023-10-17 16:49:23 +02:00
2018-12-04 14:06:46 -06:00
2022-09-09 16:18:55 -05:00
2024-03-25 17:17:24 +01:00
2023-07-15 11:05:35 +02:00
2024-04-08 14:52:23 +02:00
2024-04-10 00:03:09 +02:00
2024-03-29 01:34:22 +01:00
2016-01-21 12:11:37 +01:00
2019-06-25 15:39:08 -05:00
2024-04-10 00:03:09 +02:00
2016-01-21 12:11:37 +01:00
2018-06-13 14:14:03 -05:00
2016-01-21 12:11:37 +01:00
2024-01-10 14:02:22 +01:00
2023-02-22 16:19:48 -06:00
2021-08-16 11:31:15 -05:00
2023-07-15 11:05:35 +02:00