1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/lib/device
David Teigland e59027e4f7 devices file: back up each version
Create backup copies of system.devices in /etc/lvm/devices/backup
named system.devices-YYYYMMDD.HHMMSS.NNNN.  NNNN is the version
counter from the file.

Each time that an lvm command writes a new system.devices file,
it also writes the same file in the backup directory.

A new comment line is added to system.devices with HASH=<num>
where <num> is a crc calculated from the uncommented lines in
system.devices.  This lets lvm detect if the file has been
modified outside of lvm itself.

If system.devices is edited directly, the next time a command
reads the file, the crc will not match the HASH value.  The
command will then rewrite system.devices with the correct HASH
value, and create a backup reflecting the edits.

A default limit of 50 backup files is kept, configurable by
lvm.conf devicesfile_backup_limit (set to 0 to disable backups.)
2024-02-15 11:40:37 -06:00
..
bcache-utils.c gcc: correct signess comparation 2023-07-13 21:31:18 +02:00
bcache.c cov: mask some warning about leakage 2021-09-20 14:26:09 +02:00
bcache.h bcache: use indirection table for fd 2020-09-18 15:10:11 -05:00
dev_util.c devices: factor common list functions 2022-11-07 11:38:46 -06:00
dev-cache.c cov: some stack tracing corrections 2024-01-10 14:02:22 +01:00
dev-cache.h device_id: rewrite validation of devname entries 2023-08-04 11:45:40 -05:00
dev-dasd.c cov: mask uninitialized value 2021-03-10 01:34:27 +01:00
dev-ext-udev-constants.h dev-type: check for DEVLINKS udev db variable existence if udev_device_get_is_initialized fn is not present 2016-09-06 13:21:29 +02:00
dev-ext.c build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
dev-io.c cleanup: correcting some log_print 2023-05-06 20:38:49 +02:00
dev-luks.c filter: remove unused EAGAIN case and flag 2022-04-06 12:51:34 -05:00
dev-lvm1-pool.c build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
dev-md.c filter: remove unused EAGAIN case and flag 2022-04-06 12:51:34 -05:00
dev-mpath.c cov: some stack tracing corrections 2024-01-10 14:02:22 +01:00
dev-swap.c filter: remove unused EAGAIN case and flag 2022-04-06 12:51:34 -05:00
dev-type.c gcc: correct signess comparation 2023-07-13 21:31:18 +02:00
dev-type.h gcc: correct signess comparation 2023-07-13 21:31:18 +02:00
device_id.c devices file: back up each version 2024-02-15 11:40:37 -06:00
device_id.h lvmdevices: new output and options for check and update 2023-11-02 11:46:31 -05:00
device-types.h devices: recognise rbd (ceph rados block device) 2021-12-13 13:32:06 -06:00
device.h device_id: remove unused dev pointer from dev_id struct 2023-11-09 13:15:02 -06:00
filesystem.c debug: fix message severity levels 2023-10-06 10:50:26 +02:00
filesystem.h lvresize: fail early if crypt device is missing 2023-01-30 17:12:11 -06:00
online.c debug: fix message severity levels 2023-10-06 10:50:26 +02:00
online.h cleanup: correcting some log_print 2023-05-06 20:38:49 +02:00
parse_vpd.c gcc: correct signess comparation 2023-07-13 21:31:18 +02:00