1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/man
David Teigland ef96186add device usage based on devices file
The devices file /etc/lvm/devices/system.devices is a list of
devices that lvm can use.  This is the default system devices
file, which is specified in lvm.conf devices/devicesfile.

The command option --devicesfile <filename> allows lvm to be
used with a different set of devices.  This allows different
applications to use lvm on different sets of devices, e.g.
system devices do not need to be exposed to an application
using lvm on its own devices, and application devices do not
need to be exposed to the system.

In most cases (with limited exceptions), lvm will not read or
use a device not listed in the devices file.  When the devices
file is used, the regex filter is not used, and the filter
settings in lvm.conf are ignored.  filter-deviceid is used
when the devices file is enabled, and rejects any device that
does not match an entry in the devices file.

Set use_devicesfile=0 in lvm.conf or set --devicesfile ""
on the command line to disable the use of a devices file.
When disabled, lvm will see and use any device on the system
that passes the regex filter (and other standard filters.)

A device ID, e.g. wwid or serial number from sysfs, is a
unique ID that identifies a device.  The device ID is
generally independent of the device content, and lvm can
get the device ID without reading the device.
The device ID is used in the devices file as the primary
method of identifying device entries, and is also included
in VG metadata for PVs.

Each device_id has a device_id_type which indicates where
the device_id comes from, e.g. "sys_wwid" means the device_id
comes from the sysfs wwid file.  Others are sys_serial,
mpath_uuid, loop_file, md_uuid, devname.  (devname is the
device path, which is a fallback when no other proper
device_id_type is available.)

filter-deviceid permits lvm to use only devices on the system
that have a device_id matching a devices file entry.  Using
the device_id, lvm can determine the set of devices to use
without reading any devices, so the devices file will constrain
lvm in two ways:
1. it limits the devices that lvm will read.
2. it limits the devices that lvm will use.

In some uncommon cases, e.g. when devices have no unique ID
and device_id has to fall back to using the devname, lvm may
need to read all devices on the system to determine which
ones correspond to the devices file entries.  In this case,
the devices file does not limit the devices that lvm reads,
but it does limit the devices that lvm uses.

pvcreate/vgcreate/vgextend are not constrained by the devices
file, and will look outside it to find the new PV.  They assign
the new PV a device_id and add it to the devices file.  It is
also possible to explicitly add new PVs to the devices file before
using them in pvcreate/etc, in which case these commands would not
need to look outside the devices file for the new device.

vgimportdevices VG looks at all devices on the system to find an
existing VG and add its devices to the devices file.  The command
is not limited by an existing devices file.  The command will also
add device_ids to the VG metadata if the VG does not yet include
device_ids.  vgimportdevices -a imports devices for all accessible
VGs.  Since vgimportdevices does not limit itself to devices in
an existing devices file, the lvm.conf regex filter applies.
Adding --foreign will import devices for foreign VGs, but device_ids
are not added to foreign VGs.  Incomplete VGs are not imported.

The lvmdevices command manages the devices file.  The primary
purpose is to edit the devices file, but it will read PV headers
to find/check PVIDs.  (It does not read, process or modify VG
metadata.)

lvmdevices
. Displays devices file entries.
lvmdevices --check
. Checks devices file entries.
lvmdevices --update
. Updates devices file entries.
lvmdevices --adddev <devname>
. Adds devices_file entry (reads pv header).
lvmdevices --deldev <devname>
. Removes devices file entry.
lvmdevices --addpvid <pvid>
. Reads pv header of all devices to find <pvid>,
  and if found adds devices file entry.
lvmdevices --delpvid <pvid>
. Removes devices file entry.

The vgimportclone command has a new option --importdevices
that does the equivalent of vgimportdevices with the cloned
devices that are being imported.  The devices are "uncloned"
(new vgname and pvids) while at the same time adding the
devices to the devices file.  This allows cloned PVs to be
imported without duplicate PVs ever appearing on the system.

The command option --devices <devnames> allows a specific
list of devices to be exposed to the lvm command, overriding
the devices file.
2021-02-17 15:17:12 -06:00
..
.gitignore man: add man-generator and build artefacts to .gitignore 2017-03-10 13:14:02 +00:00
blkdeactivate.8_main blkdeactivate: add support for VDO in blkdeactivate script 2020-04-09 15:29:29 +02:00
cmirrord.8_main man: remove some clvmd references 2018-11-14 10:00:23 -06:00
dmeventd.8_main man: dmeventd vdo plugin 2019-03-20 14:39:11 +01:00
dmfilemapd.8_main man-generator/man/help: simplify hyphen escaping 2017-03-27 16:49:39 +02:00
dmsetup.8_main dmsetup: hide integrity encryption keys on table output 2017-11-10 15:23:00 +01:00
dmstats.8_main man-generator/man/help: simplify hyphen escaping 2017-03-27 16:49:39 +02:00
fsadm.8_main fsadm: add support for crypt devices 2017-10-10 14:18:57 +02:00
lvchange.8_des man: Revise internal man page generation process. 2017-03-14 00:47:46 +00:00
lvchange.8_end man-generator/man/help: simplify hyphen escaping 2017-03-27 16:49:39 +02:00
lvchange.8_pregen man: regenerate 2020-10-24 01:42:16 +02:00
lvconvert.8_des man lvcreate/lvconvert: minor clean up rewording 2017-04-11 10:21:36 -05:00
lvconvert.8_end man-generator/man/help: simplify hyphen escaping 2017-03-27 16:49:39 +02:00
lvconvert.8_pregen make: generate 2021-01-18 14:46:22 +01:00
lvcreate.8_des man: vdo regenerated 2019-01-28 22:39:10 +01:00
lvcreate.8_end vdo: add some basic example 2019-01-28 22:39:10 +01:00
lvcreate.8_pregen man: regenerate 2020-10-24 01:42:16 +02:00
lvdisplay.8_des man: Revise internal man page generation process. 2017-03-14 00:47:46 +00:00
lvdisplay.8_end man: Revise internal man page generation process. 2017-03-14 00:47:46 +00:00
lvdisplay.8_pregen man: regenerate 2020-10-24 01:42:16 +02:00
lvextend.8_des man-generator/man/help: simplify hyphen escaping 2017-03-27 16:49:39 +02:00
lvextend.8_end man-generator/man/help: simplify hyphen escaping 2017-03-27 16:49:39 +02:00
lvextend.8_pregen man: regenerate 2020-10-24 01:42:16 +02:00
lvm2-activation-generator.8_main man: lvm2-activation-generator fix vgchange comment 2020-03-10 14:41:51 -05:00
lvm-fullreport.8_des man lvm fullreport and lvpoll references 2017-05-03 16:40:44 -05:00
lvm-fullreport.8_end man: Revise internal man page generation process. 2017-03-14 00:47:46 +00:00
lvm-fullreport.8_pregen man: regenerate 2020-10-24 01:42:16 +02:00
lvm-lvpoll.8_des man: Revise internal man page generation process. 2017-03-14 00:47:46 +00:00
lvm-lvpoll.8_end man-generator/man/help: simplify hyphen escaping 2017-03-27 16:49:39 +02:00
lvm-lvpoll.8_pregen man: regenerate 2020-10-24 01:42:16 +02:00
lvm.8_main man: Include '_vdata' as reserved name 2019-10-30 10:38:40 -05:00
lvm.conf.5_main man lvm.conf: say how to get a description of settings 2017-05-03 16:01:19 -05:00
lvmcache.7_main man lvmcache: add writecache cleaner info 2020-12-02 15:29:21 -06:00
lvmconfig.8_des man: simplify by avoiding different headers on de-duplication of lvmconfig, lvm-config and lvm-dumpconfig 2017-03-29 01:44:09 +02:00
lvmconfig.8_end man: Revise internal man page generation process. 2017-03-14 00:47:46 +00:00
lvmconfig.8_pregen man: regenerate 2020-10-24 01:42:16 +02:00
lvmdbusd.8_main man-generator/man/help: simplify hyphen escaping 2017-03-27 16:49:39 +02:00
lvmdevices.8_des device usage based on devices file 2021-02-17 15:17:12 -06:00
lvmdevices.8_end device usage based on devices file 2021-02-17 15:17:12 -06:00
lvmdiskscan.8_des man: Revise internal man page generation process. 2017-03-14 00:47:46 +00:00
lvmdiskscan.8_end man: Revise internal man page generation process. 2017-03-14 00:47:46 +00:00
lvmdiskscan.8_pregen man: regenerate 2020-10-24 01:42:16 +02:00
lvmdump.8_main man: correctly use configured directories 2020-09-09 13:22:37 +02:00
lvmlockctl.8_main man-generator/man/help: simplify hyphen escaping 2017-03-27 16:49:39 +02:00
lvmlockd.8_main man: correctly use configured directories 2020-09-09 13:22:37 +02:00
lvmpolld.8_main man-generator/man/help: simplify hyphen escaping 2017-03-27 16:49:39 +02:00
lvmraid.7_main Allow dm-integrity to be used for raid images 2020-04-15 12:10:32 -05:00
lvmreport.7_main man lvm fullreport and lvpoll references 2017-05-03 16:40:44 -05:00
lvmsadc.8_main man-generator/man/help: simplify hyphen escaping 2017-03-27 16:49:39 +02:00
lvmsar.8_main man-generator/man/help: simplify hyphen escaping 2017-03-27 16:49:39 +02:00
lvmsystemid.7_main man: remove scattered lvmetad references 2018-11-14 09:57:57 -06:00
lvmthin.7_main thin: improve 16g support for thin pool metadata 2021-02-01 12:06:13 +01:00
lvmvdo.7_main man: update lvmvdo 2020-12-08 20:32:34 +01:00
lvreduce.8_des man-generator/man/help: simplify hyphen escaping 2017-03-27 16:49:39 +02:00
lvreduce.8_end Revert "man: fix lvreduce example" 2018-06-27 09:20:21 -05:00
lvreduce.8_pregen man: regenerate 2020-10-24 01:42:16 +02:00
lvremove.8_des man: remove blank lines from end/des files 2017-03-15 15:59:43 -05:00
lvremove.8_end man-generator/man/help: simplify hyphen escaping 2017-03-27 16:49:39 +02:00
lvremove.8_pregen man: regenerate 2020-10-24 01:42:16 +02:00
lvrename.8_des man: Revise internal man page generation process. 2017-03-14 00:47:46 +00:00
lvrename.8_end man: remove blank lines from end/des files 2017-03-15 15:59:43 -05:00
lvrename.8_pregen man: regenerate 2020-10-24 01:42:16 +02:00
lvresize.8_des man-generator/man/help: simplify hyphen escaping 2017-03-27 16:49:39 +02:00
lvresize.8_end man-generator/man/help: simplify hyphen escaping 2017-03-27 16:49:39 +02:00
lvresize.8_pregen man: regenerate 2020-10-24 01:42:16 +02:00
lvs.8_des man: Revise internal man page generation process. 2017-03-14 00:47:46 +00:00
lvs.8_end writecache: show error in lv_health_status and lv_attr 2020-06-10 12:13:48 -05:00
lvs.8_pregen man: regenerate 2020-10-24 01:42:16 +02:00
lvscan.8_des man: Revise internal man page generation process. 2017-03-14 00:47:46 +00:00
lvscan.8_end man: Revise internal man page generation process. 2017-03-14 00:47:46 +00:00
lvscan.8_pregen man: regenerate 2020-10-24 01:42:16 +02:00
Makefile.in device usage based on devices file 2021-02-17 15:17:12 -06:00
pvchange.8_des man pvchange: mention one option is required 2017-05-03 15:10:10 -05:00
pvchange.8_end man-generator/man/help: simplify hyphen escaping 2017-03-27 16:49:39 +02:00
pvchange.8_pregen man: regenerate 2020-10-24 01:42:16 +02:00
pvck.8_des man: pvck dump description improvements 2020-01-22 15:01:00 -06:00
pvck.8_end man-generator/man/help: simplify hyphen escaping 2017-03-27 16:49:39 +02:00
pvck.8_pregen man: regenerate 2020-10-24 01:42:16 +02:00
pvcreate.8_des Place the first PE at 1 MiB for all defaults 2018-11-26 16:36:50 -06:00
pvcreate.8_end man-generator/man/help: simplify hyphen escaping 2017-03-27 16:49:39 +02:00
pvcreate.8_pregen man: regenerate 2020-10-24 01:42:16 +02:00
pvdisplay.8_des man: Revise internal man page generation process. 2017-03-14 00:47:46 +00:00
pvdisplay.8_end man: Revise internal man page generation process. 2017-03-14 00:47:46 +00:00
pvdisplay.8_pregen man: regenerate 2020-10-24 01:42:16 +02:00
pvmove.8_des man: remove blank lines from end/des files 2017-03-15 15:59:43 -05:00
pvmove.8_end man-generator/man/help: simplify hyphen escaping 2017-03-27 16:49:39 +02:00
pvmove.8_pregen man: regenerate 2020-10-24 01:42:16 +02:00
pvremove.8_des man: Revise internal man page generation process. 2017-03-14 00:47:46 +00:00
pvremove.8_end man: Revise internal man page generation process. 2017-03-14 00:47:46 +00:00
pvremove.8_pregen man: regenerate 2020-10-24 01:42:16 +02:00
pvresize.8_des man: Revise internal man page generation process. 2017-03-14 00:47:46 +00:00
pvresize.8_end man-generator/man/help: simplify hyphen escaping 2017-03-27 16:49:39 +02:00
pvresize.8_pregen man: regenerate 2020-10-24 01:42:16 +02:00
pvs.8_des man: Revise internal man page generation process. 2017-03-14 00:47:46 +00:00
pvs.8_end man: remove blank lines from end/des files 2017-03-15 15:59:43 -05:00
pvs.8_pregen man: regenerate 2020-10-24 01:42:16 +02:00
pvscan.8_des man: pvscan updates 2018-11-14 09:34:30 -06:00
pvscan.8_end man: Revise internal man page generation process. 2017-03-14 00:47:46 +00:00
pvscan.8_pregen man: regenerate 2020-10-24 01:42:16 +02:00
see_also.end man: remove scattered lvmetad references 2018-11-14 09:57:57 -06:00
vgcfgbackup.8_des man-generator/man/help: simplify hyphen escaping 2017-03-27 16:49:39 +02:00
vgcfgbackup.8_end man: Revise internal man page generation process. 2017-03-14 00:47:46 +00:00
vgcfgbackup.8_pregen man: regenerate 2020-10-24 01:42:16 +02:00
vgcfgrestore.8_des man-generator/man/help: simplify hyphen escaping 2017-03-27 16:49:39 +02:00
vgcfgrestore.8_end man-generator/man/help: simplify hyphen escaping 2017-03-27 16:49:39 +02:00
vgcfgrestore.8_pregen man: regenerate 2020-10-24 01:42:16 +02:00
vgchange.8_des man: Revise internal man page generation process. 2017-03-14 00:47:46 +00:00
vgchange.8_end man-generator/man/help: simplify hyphen escaping 2017-03-27 16:49:39 +02:00
vgchange.8_pregen man: regenerate 2020-10-24 01:42:16 +02:00
vgck.8_des man: Revise internal man page generation process. 2017-03-14 00:47:46 +00:00
vgck.8_end man: Revise internal man page generation process. 2017-03-14 00:47:46 +00:00
vgck.8_pregen man: regenerate 2020-10-24 01:42:16 +02:00
vgconvert.8_des Remove vgconvert 2018-06-13 14:14:03 -05:00
vgconvert.8_end man: Revise internal man page generation process. 2017-03-14 00:47:46 +00:00
vgconvert.8_pregen man: regenerate 2020-10-24 01:42:16 +02:00
vgcreate.8_des Place the first PE at 1 MiB for all defaults 2018-11-26 16:36:50 -06:00
vgcreate.8_end man: remove blank lines from end/des files 2017-03-15 15:59:43 -05:00
vgcreate.8_pregen man: regenerate 2020-10-24 01:42:16 +02:00
vgdisplay.8_des man: Revise internal man page generation process. 2017-03-14 00:47:46 +00:00
vgdisplay.8_end man: Revise internal man page generation process. 2017-03-14 00:47:46 +00:00
vgdisplay.8_pregen man: regenerate 2020-10-24 01:42:16 +02:00
vgexport.8_des man vgexport: expand description 2018-05-21 16:26:49 -05:00
vgexport.8_end man: Revise internal man page generation process. 2017-03-14 00:47:46 +00:00
vgexport.8_pregen man: regenerate 2020-10-24 01:42:16 +02:00
vgextend.8_des man-generator/man/help: simplify hyphen escaping 2017-03-27 16:49:39 +02:00
vgextend.8_end man: remove blank lines from end/des files 2017-03-15 15:59:43 -05:00
vgextend.8_pregen man: regenerate 2020-10-24 01:42:16 +02:00
vgimport.8_des man: Revise internal man page generation process. 2017-03-14 00:47:46 +00:00
vgimport.8_end man: Revise internal man page generation process. 2017-03-14 00:47:46 +00:00
vgimport.8_pregen man: regenerate 2020-10-24 01:42:16 +02:00
vgimportclone.8_des man: Revise internal man page generation process. 2017-03-14 00:47:46 +00:00
vgimportclone.8_end man-generator/man/help: simplify hyphen escaping 2017-03-27 16:49:39 +02:00
vgimportclone.8_pregen man: regenerate 2020-10-24 01:42:16 +02:00
vgimportdevices.8_des device usage based on devices file 2021-02-17 15:17:12 -06:00
vgimportdevices.8_end device usage based on devices file 2021-02-17 15:17:12 -06:00
vgmerge.8_des man: Revise internal man page generation process. 2017-03-14 00:47:46 +00:00
vgmerge.8_end man-generator/man/help: simplify hyphen escaping 2017-03-27 16:49:39 +02:00
vgmerge.8_pregen man: regenerate 2020-10-24 01:42:16 +02:00
vgmknodes.8_des man: Revise internal man page generation process. 2017-03-14 00:47:46 +00:00
vgmknodes.8_end man: Revise internal man page generation process. 2017-03-14 00:47:46 +00:00
vgmknodes.8_pregen man: regenerate 2020-10-24 01:42:16 +02:00
vgreduce.8_des man: Revise internal man page generation process. 2017-03-14 00:47:46 +00:00
vgreduce.8_end man: Revise internal man page generation process. 2017-03-14 00:47:46 +00:00
vgreduce.8_pregen man: regenerate 2020-10-24 01:42:16 +02:00
vgremove.8_des man-generator/man/help: simplify hyphen escaping 2017-03-27 16:49:39 +02:00
vgremove.8_end man: Revise internal man page generation process. 2017-03-14 00:47:46 +00:00
vgremove.8_pregen man: regenerate 2020-10-24 01:42:16 +02:00
vgrename.8_des man: Revise internal man page generation process. 2017-03-14 00:47:46 +00:00
vgrename.8_end man-generator/man/help: simplify hyphen escaping 2017-03-27 16:49:39 +02:00
vgrename.8_pregen man: regenerate 2020-10-24 01:42:16 +02:00
vgs.8_des man: Revise internal man page generation process. 2017-03-14 00:47:46 +00:00
vgs.8_end man: remove blank lines 2017-03-15 11:05:31 -05:00
vgs.8_pregen man: regenerate 2020-10-24 01:42:16 +02:00
vgscan.8_des man: Revise internal man page generation process. 2017-03-14 00:47:46 +00:00
vgscan.8_end man: Revise internal man page generation process. 2017-03-14 00:47:46 +00:00
vgscan.8_pregen man: regenerate 2020-10-24 01:42:16 +02:00
vgsplit.8_des man: vgsplit source and destination VGs 2020-11-17 11:00:40 -06:00
vgsplit.8_end man: Revise internal man page generation process. 2017-03-14 00:47:46 +00:00
vgsplit.8_pregen build: make generate 2020-11-26 17:37:32 +01:00