1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
Commit Graph

83 Commits

Author SHA1 Message Date
Marian Csontos
49822624e8 spec: Rename vdoimport to lvm_import_vdo. 2021-08-26 17:14:08 +02:00
Marian Csontos
640fe5cf42 spec: Add vdoimport man page 2021-07-21 16:40:27 +02:00
Zdenek Kabelac
ed48cb26a3 vdo: add vdoimport support
Add tool 'vdoimport' to support easy conversion of an existing VDO manager managed
VDO volumes into lvm2 managed VDO LV.

When physical converted volume is already a logical volume, conversion
happens with the VG itself, just with validation for extent_size, so
the virtually sized logical VDO volume size can be expressed in extents.

Example of basic simple usage:

vdoimport --name vg/vdolv  /dev/mapper/vdophysicalvolume
2021-07-09 14:57:59 +02:00
David Teigland
83fe6e720f device usage based on devices file
The LVM devices file lists devices that lvm can use.  The default
file is /etc/lvm/devices/system.devices, and the lvmdevices(8)
command is used to add or remove device entries.  If the file
does not exist, or if lvm.conf includes use_devicesfile=0, then
lvm will not use a devices file.  When the devices file is in use,
the regex filter is not used, and the filter settings in lvm.conf
or on the command line are ignored.

LVM records devices in the devices file using hardware-specific
IDs, such as the WWID, and attempts to use subsystem-specific
IDs for virtual device types.  These device IDs are also written
in the VG metadata.  When no hardware or virtual ID is available,
lvm falls back using the unstable device name as the device ID.
When devnames are used, lvm performs extra scanning to find
devices if their devname changes, e.g. after reboot.

When proper device IDs are used, an lvm command will not look
at devices outside the devices file, but when devnames are used
as a fallback, lvm will scan devices outside the devices file
to locate PVs on renamed devices.  A config setting
search_for_devnames can be used to control the scanning for
renamed devname entries.

Related to the devices file, the new command option
--devices <devnames> allows a list of devices to be specified for
the command to use, overriding the devices file.  The listed
devices act as a sort of devices file in terms of limiting which
devices lvm will see and use.  Devices that are not listed will
appear to be missing to the lvm command.

Multiple devices files can be kept in /etc/lvm/devices, which
allows lvm to be used with different sets of devices, e.g.
system devices do not need to be exposed to a specific application,
and the application can use lvm on its own set of devices that are
not exposed to the system.  The option --devicesfile <filename> is
used to select the devices file to use with the command.  Without
the option set, the default system devices file is used.

Setting --devicesfile "" causes lvm to not use a devices file.

An existing, empty devices file means lvm will see no devices.

The new command vgimportdevices adds PVs from a VG to the devices
file and updates the VG metadata to include the device IDs.
vgimportdevices -a will import all VGs into the system devices file.

LVM commands run by dmeventd not use a devices file by default,
and will look at all devices on the system.  A devices file can
be created for dmeventd (/etc/lvm/devices/dmeventd.devices)  If
this file exists, lvm commands run by dmeventd will use it.

Internal implementaion:

- device_ids_read - read the devices file
  . add struct dev_use (du) to cmd->use_devices for each devices file entry
- dev_cache_scan - get /dev entries
  . add struct device (dev) to dev_cache for each device on the system
- device_ids_match - match devices file entries to /dev entries
  . match each du on cmd->use_devices to a dev in dev_cache, using device ID
  . on match, set du->dev, dev->id, dev->flags MATCHED_USE_ID
- label_scan - read lvm headers and metadata from devices
  . filters are applied, those that do not need data from the device
  . filter-deviceid skips devs without MATCHED_USE_ID, i.e.
    skips /dev entries that are not listed in the devices file
  . read lvm label from dev
  . filters are applied, those that use data from the device
  . read lvm metadata from dev
  . add info/vginfo structs for PVs/VGs (info is "lvmcache")
- device_ids_find_renamed_devs - handle devices with unstable devname ID
  where devname changed
  . this step only needed when devs do not have proper device IDs,
    and their dev names change, e.g. after reboot sdb becomes sdc.
  . detect incorrect match because PVID in the devices file entry
    does not match the PVID found when the device was read above
  . undo incorrect match between du and dev above
  . search system devices for new location of PVID
  . update devices file with new devnames for PVIDs on renamed devices
  . label_scan the renamed devs
- continue with command processing
2021-02-23 16:43:32 -06:00
Zdenek Kabelac
ee43ec5782 rpm: bare words are no longer supported
Update for new rpm requirement and use "..." words.
2020-10-02 22:27:00 +02:00
Marian Csontos
33265467f9 spec: Enable integrity 2020-05-05 14:12:32 +02:00
Marian Csontos
b20b23dfc6 spec: Fix lvm2-activation-generator man page handling
lvm2-activation-generator is not installed when systemd is not in the
system.
2019-10-04 16:29:38 +02:00
Marian Csontos
90fe4b106b spec: enable writecache 2019-09-25 08:40:30 +02:00
Marian Csontos
3ce0dc59f2 spec: Move blkdeactivate to device-mapper 2019-09-20 10:59:59 +02:00
Zdenek Kabelac
2a45ef0300 rpm: package lvmvdo man page 2019-01-22 14:35:47 +01:00
Marian Csontos
21784e94d6 udev: 69-dm-lvm-metad.rules is still needed 2018-12-06 10:50:42 +01:00
Zdenek Kabelac
6a4a6a7cd7 rpm: install lvm2-pvscan again
Let's repeat history once more 13d5c78a8d.
2018-11-30 13:10:00 +01:00
Marian Csontos
fc35a9169e spec: lvmdbusd requires python3 setuptools 2018-10-22 12:51:51 +02:00
Marian Csontos
11d4e63888 spec: No %ghost for dirs at tmpfiles.d
%ghost should not be used for directories created by systemd-tmpfiles.

This may prevent package from working right after installation without
invoking systemd-tmpfiles.

See: https://pagure.io/packaging-committee/issue/439
2018-10-03 20:05:37 +02:00
Marian Csontos
ccb08dfa1d spec: Remove lvmconf refernces
Fixes: 81ca0cb161
2018-09-14 13:49:51 +02:00
David Teigland
19a59cc53c More cleanup needed for dropped scripts
and drop the lvm2 prefix from lvmlockd service
2018-09-13 11:09:25 -05:00
Marian Csontos
706606627f spec: Fix conditional 2018-07-24 16:22:23 +02:00
Marian Csontos
279f3bfdc0 spec: Add vdo files 2018-07-24 15:41:30 +02:00
Marian Csontos
7709b70f97 spec: Remove unsupported config options 2018-07-24 15:00:12 +02:00
Marian Csontos
86c3940537 spec: Remove python bindings 2018-07-24 14:55:32 +02:00
Marian Csontos
bf4be80669 spec: Remove lvmetad 2018-07-24 14:50:52 +02:00
Zdenek Kabelac
27c647d6ce rpm: drop no longer present clvmd, lvm2app 2018-06-15 00:47:35 +02:00
Marian Csontos
3745b52ed4 spec: Enable notify-dbus in builds with dbus 2017-05-26 07:40:09 +02:00
David Teigland
a5256d1353 spec: rename lockd to lvmlockd 2017-04-18 11:22:07 -05:00
Marian Csontos
162552041f spec: Add dmfilemapd 2017-03-28 21:52:50 +02:00
Marian Csontos
a87715b6fd spec: Disable sanlock only, keep lockd_dlm enabled 2017-03-16 13:03:25 +01:00
Marian Csontos
19b65a3d76 spec: Replace remaining %define by %global 2017-03-16 13:03:24 +01:00
Marian Csontos
7067514c9b spec: Use %global instead of %define for constants
Using %define is now discouraged by Fedora Packaging Guidelines
2017-03-16 13:03:24 +01:00
Marian Csontos
5ba82a16db spec: Update requirements for lockd
lockd requires sanlock >= 3.3.0
2017-03-16 13:03:24 +01:00
Marian Csontos
cf0bf4b314 spec: Profiles are not %config(noreplace)
These files are just examples and should not be edited by user.
2017-03-16 13:02:24 +01:00
Marian Csontos
2fd5c8e908 spec: lvmchange is built-in command 2017-03-16 11:44:10 +01:00
Peter Rajnoha
5c55c4ac18 spec: move dmeventd -R from post to posttrans script for device-mapper-event package
See also https://bugzilla.redhat.com/show_bug.cgi?id=1382688.
2016-10-12 13:52:13 +02:00
Zdenek Kabelac
5bf1778e33 rpm: install lvmreport.7 2016-09-12 16:51:53 +02:00
Zdenek Kabelac
ca7921f54b rpm: build with raid man page 2016-09-09 20:59:22 +02:00
Marian Csontos
e30fb19030 spec: Add new files 2016-08-11 14:10:59 +02:00
Marian Csontos
e72184bb76 spec: Fix gobject dependency
Use python3-gobject-base instead of python3-gobject requiring xorg

(cherry picked from commit d929d82116759f53484e662b967165ef4fe4257c)
2016-03-09 14:00:05 +01:00
Marian Csontos
d7ca164597 spec: Add missing dependency for dbusd
(cherry picked from commit 7435de21492f6b37ac7664d1f27b4a8dcc4d0dd4)
2016-03-09 10:58:21 +01:00
Marian Csontos
367fb85e44 spec: Fix 04ab1fa572: Remove left-overs 2016-02-22 17:50:35 +01:00
Marian Csontos
04ab1fa572 spec: Update python bindings and dbus-service
The workaround for python3 is no longer needed.
2016-02-18 20:46:03 +01:00
Marian Csontos
ef5583a209 Fix rpm builds 2016-02-18 12:37:44 +01:00
Zdenek Kabelac
fcbef05aae doc: change fsf address
Hmm rpmlint suggest fsf is using a different address these days,
so lets keep it up-to-date
2016-01-21 12:11:37 +01:00
Marian Csontos
89574055f7 spec: Add python bindings 2015-11-02 12:42:32 +01:00
Zdenek Kabelac
0889cff5d5 spec: upgrade
Upgrade spec rules to be in touch with recent code.
Provide services and proper postin/preun/postun scriplets.
2015-09-10 17:28:47 +02:00
Zdenek Kabelac
0ec64370b2 specs: install lvmlockctl only when built
Move install line into proper section.
2015-09-07 23:27:50 +02:00
Zdenek Kabelac
330cad1567 specs: package lvmlockctl man page 2015-09-07 17:44:08 +02:00
Marian Csontos
bfb58b7e1c spec: Add cache-*.profile 2015-08-14 21:45:11 +02:00
Alasdair G Kergon
41001dbfdd dmsetup: Also install dmstats. 2015-08-10 00:35:15 +01:00
Marian Csontos
8bc90a25c2 spec: lockd_dlm requires dlm-lib instead of dlm 2015-07-30 20:39:38 +02:00
Marian Csontos
d9d47b7b88 spec: Move lvm2-lockd into separate package 2015-07-07 16:53:19 +02:00
Marian Csontos
181e701cc5 spec: Update to use enable_lockd_* 2015-07-07 16:53:19 +02:00