|
|
4aaf76 |
man/lvconvert.8_pregen | 2 +-
|
|
|
4aaf76 |
man/lvmdevices.8_pregen | 79 ++++++++++++++++++++++++++++++++++++++++---------
|
|
|
4aaf76 |
2 files changed, 66 insertions(+), 15 deletions(-)
|
|
|
4aaf76 |
|
|
|
4aaf76 |
diff --git a/man/lvconvert.8_pregen b/man/lvconvert.8_pregen
|
|
|
4aaf76 |
index d733ab6..4fafe5d 100644
|
|
|
4aaf76 |
--- a/man/lvconvert.8_pregen
|
|
|
4aaf76 |
+++ b/man/lvconvert.8_pregen
|
|
|
4aaf76 |
@@ -670,7 +670,7 @@ Convert LV to type thin-pool.
|
|
|
4aaf76 |
.RE
|
|
|
4aaf76 |
.P
|
|
|
4aaf76 |
.RS 4
|
|
|
4aaf76 |
-LV1 types: linear striped cache raid error zero
|
|
|
4aaf76 |
+LV1 types: linear striped cache raid error zero writecache
|
|
|
4aaf76 |
.RE
|
|
|
4aaf76 |
.P
|
|
|
4aaf76 |
\(em
|
|
|
4aaf76 |
diff --git a/man/lvmdevices.8_pregen b/man/lvmdevices.8_pregen
|
|
|
4aaf76 |
index 267ce96..fa85362 100644
|
|
|
4aaf76 |
--- a/man/lvmdevices.8_pregen
|
|
|
4aaf76 |
+++ b/man/lvmdevices.8_pregen
|
|
|
4aaf76 |
@@ -28,6 +28,8 @@ lvmdevices \(em Manage the devices file
|
|
|
4aaf76 |
.br
|
|
|
4aaf76 |
\fB--delpvid\fP \fIString\fP
|
|
|
4aaf76 |
.br
|
|
|
4aaf76 |
+ \fB--deviceidtype\fP \fIString\fP
|
|
|
4aaf76 |
+.br
|
|
|
4aaf76 |
\fB--devices\fP \fIPV\fP
|
|
|
4aaf76 |
.br
|
|
|
4aaf76 |
\fB--devicesfile\fP \fIString\fP
|
|
|
4aaf76 |
@@ -70,18 +72,18 @@ remove it from the devices file with lvmdevices --deldev. The
|
|
|
4aaf76 |
vgimportdevices(8) command adds all PVs from a VG to the devices file,
|
|
|
4aaf76 |
and updates the VG metadata to include device IDs of the PVs.
|
|
|
4aaf76 |
.P
|
|
|
4aaf76 |
-Commands adding new devices to the devices file necessarily look outside
|
|
|
4aaf76 |
-the existing devices file to find the devices to add. pvcreate, vgcreate,
|
|
|
4aaf76 |
-and vgextend also look outside the devices file to create new PVs and add
|
|
|
4aaf76 |
-them to the devices file.
|
|
|
4aaf76 |
+Commands that add new devices to the devices file necessarily look outside
|
|
|
4aaf76 |
+the existing devices file to find the devices being added. pvcreate,
|
|
|
4aaf76 |
+vgcreate, and vgextend also look outside the devices file to create new
|
|
|
4aaf76 |
+PVs and add those PVs to the devices file.
|
|
|
4aaf76 |
.P
|
|
|
4aaf76 |
LVM records devices in the devices file using hardware-specific IDs, such
|
|
|
4aaf76 |
as the WWID, and attempts to use subsystem-specific IDs for virtual device
|
|
|
4aaf76 |
-types (which also aim to be as unique and stable as possible.)
|
|
|
4aaf76 |
-These device IDs are also written in the VG metadata. When no hardware or
|
|
|
4aaf76 |
+types (which also aim to be as unique and stable as possible.) These
|
|
|
4aaf76 |
+device IDs are also written in the VG metadata. When no hardware or
|
|
|
4aaf76 |
virtual ID is available, lvm falls back using the unstable device name as
|
|
|
4aaf76 |
-the device ID. When devnames are used, lvm performs extra scanning to
|
|
|
4aaf76 |
-find devices if their devname changes, e.g. after reboot.
|
|
|
4aaf76 |
+the device ID. When devnames are used as IDs, lvm performs extra scanning
|
|
|
4aaf76 |
+to find devices if their devname changes, e.g. after reboot.
|
|
|
4aaf76 |
.P
|
|
|
4aaf76 |
When proper device IDs are used, an lvm command will not look at devices
|
|
|
4aaf76 |
outside the devices file, but when devnames are used as a fallback, lvm
|
|
|
4aaf76 |
@@ -95,12 +97,13 @@ overriding the devices file. The listed devices act as a sort of devices
|
|
|
4aaf76 |
file in terms of limiting which devices lvm will see and use. Devices
|
|
|
4aaf76 |
that are not listed will appear to be missing to the lvm command.
|
|
|
4aaf76 |
.P
|
|
|
4aaf76 |
-Multiple devices files can be kept in \fI#DEFAULT_SYS_DIR#/devices\fP, which allows lvm
|
|
|
4aaf76 |
-to be used with different sets of devices, e.g. system devices do not need
|
|
|
4aaf76 |
-to be exposed to a specific application, and the application can use lvm on
|
|
|
4aaf76 |
-its own devices that are not exposed to the system. The option
|
|
|
4aaf76 |
---devicesfile <filename> is used to select the devices file to use with the
|
|
|
4aaf76 |
-command. Without the option set, the default system devices file is used.
|
|
|
4aaf76 |
+Multiple devices files can be kept \fI#DEFAULT_SYS_DIR#/devices\fP, which
|
|
|
4aaf76 |
+allows lvm to be used with different sets of devices. For example, system
|
|
|
4aaf76 |
+devices do not need to be exposed to a specific application, and the
|
|
|
4aaf76 |
+application can use lvm on its own devices that are not exposed to the
|
|
|
4aaf76 |
+system. The option --devicesfile <filename> is used to select the devices
|
|
|
4aaf76 |
+file to use with the command. Without the option set, the default system
|
|
|
4aaf76 |
+devices file is used.
|
|
|
4aaf76 |
.P
|
|
|
4aaf76 |
Setting --devicesfile "" causes lvm to not use a devices file.
|
|
|
4aaf76 |
.P
|
|
|
4aaf76 |
@@ -120,6 +123,45 @@ if it does not yet exist.
|
|
|
4aaf76 |
.P
|
|
|
4aaf76 |
It is recommended to use lvm commands to make changes to the devices file to
|
|
|
4aaf76 |
ensure proper updates.
|
|
|
4aaf76 |
+.P
|
|
|
4aaf76 |
+The device ID and device ID type are included in the VG metadata and can
|
|
|
4aaf76 |
+be reported with pvs -o deviceid,deviceidtype. (Note that the lvmdevices
|
|
|
4aaf76 |
+command does not update VG metadata, but subsequent lvm commands modifying
|
|
|
4aaf76 |
+the metadata will include the device ID.)
|
|
|
4aaf76 |
+.P
|
|
|
4aaf76 |
+Possible device ID types are:
|
|
|
4aaf76 |
+.br
|
|
|
4aaf76 |
+.IP \[bu] 2
|
|
|
4aaf76 |
+.B sys_wwid
|
|
|
4aaf76 |
+uses the wwid reported by sysfs. This is the first choice for non-virtual
|
|
|
4aaf76 |
+devices.
|
|
|
4aaf76 |
+.IP \[bu] 2
|
|
|
4aaf76 |
+.B sys_serial
|
|
|
4aaf76 |
+uses the serial number reported by sysfs. This is the second choice for
|
|
|
4aaf76 |
+non-virtual devices.
|
|
|
4aaf76 |
+.IP \[bu] 2
|
|
|
4aaf76 |
+.B mpath_uuid
|
|
|
4aaf76 |
+is used for dm multipath devices, reported by sysfs.
|
|
|
4aaf76 |
+.IP \[bu] 2
|
|
|
4aaf76 |
+.B crypt_uuid
|
|
|
4aaf76 |
+is used for dm crypt devices, reported by sysfs.
|
|
|
4aaf76 |
+.IP \[bu] 2
|
|
|
4aaf76 |
+.B md_uuid
|
|
|
4aaf76 |
+is used for md devices, reported by sysfs.
|
|
|
4aaf76 |
+.B lvmlv_uuid
|
|
|
4aaf76 |
+is used if a PV is placed on top of an lvm LV, reported by sysfs.
|
|
|
4aaf76 |
+.IP \[bu] 2
|
|
|
4aaf76 |
+.B loop_file
|
|
|
4aaf76 |
+is used for loop devices, the backing file name repored by sysfs.
|
|
|
4aaf76 |
+.IP \[bu] 2
|
|
|
4aaf76 |
+.B devname
|
|
|
4aaf76 |
+the device name is used if no other type applies.
|
|
|
4aaf76 |
+.P
|
|
|
4aaf76 |
+
|
|
|
4aaf76 |
+The default choice for device ID type can be overriden using lvmdevices
|
|
|
4aaf76 |
+--addev --deviceidtype <type>. If the specified type is available for the
|
|
|
4aaf76 |
+device it will be used, otherwise the device will be added using the type
|
|
|
4aaf76 |
+that would otherwise be chosen.
|
|
|
4aaf76 |
.
|
|
|
4aaf76 |
.SH USAGE
|
|
|
4aaf76 |
.
|
|
|
4aaf76 |
@@ -169,6 +211,8 @@ Add a device to the devices file.
|
|
|
4aaf76 |
.br
|
|
|
4aaf76 |
.RS 4
|
|
|
4aaf76 |
.ad l
|
|
|
4aaf76 |
+[ \fB--deviceidtype\fP \fIString\fP ]
|
|
|
4aaf76 |
+.br
|
|
|
4aaf76 |
[ COMMON_OPTIONS ]
|
|
|
4aaf76 |
.ad b
|
|
|
4aaf76 |
.RE
|
|
|
4aaf76 |
@@ -308,6 +352,13 @@ Remove a device from the devices file.
|
|
|
4aaf76 |
Remove a device with the PVID from the devices file.
|
|
|
4aaf76 |
.
|
|
|
4aaf76 |
.HP
|
|
|
4aaf76 |
+\fB--deviceidtype\fP \fIString\fP
|
|
|
4aaf76 |
+.br
|
|
|
4aaf76 |
+The type of device ID to use for the device.
|
|
|
4aaf76 |
+If the specified type is available for the device,
|
|
|
4aaf76 |
+then it will override the default type that lvm would use.
|
|
|
4aaf76 |
+.
|
|
|
4aaf76 |
+.HP
|
|
|
4aaf76 |
\fB--devices\fP \fIPV\fP
|
|
|
4aaf76 |
.br
|
|
|
4aaf76 |
Devices that the command can use. This option can be repeated
|