main - all: fix typos
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=01d5e4d1ca27b5dbf4d...
Commit: 01d5e4d1ca27b5dbf4dce19be3da2ab83cefd40d
Parent: d5b0c72f40abc8caa199a0f484a9a0223f4a03dc
Author: Samanta Navarro <ferivoz(a)riseup.net>
AuthorDate: Sat Oct 3 11:52:37 2020 +0000
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Mar 30 13:08:14 2021 +0200
all: fix typos
---
WHATS_NEW | 2 +-
WHATS_NEW_DM | 2 +-
conf/example.conf.in | 14 +++++++-------
daemons/dmeventd/plugins/raid/dmeventd_raid.c | 2 +-
doc/kernel/integrity.txt | 2 +-
lib/config/config_settings.h | 14 +++++++-------
lib/locking/lvmlockd.c | 2 +-
lib/metadata/raid_manip.c | 2 +-
man/dmsetup.8_main | 2 +-
man/dmstats.8_main | 4 ++--
man/lvchange.8_pregen | 2 +-
man/lvconvert.8_pregen | 2 +-
man/lvcreate.8_pregen | 2 +-
man/lvextend.8_pregen | 2 +-
man/lvm.8_main | 4 ++--
man/lvmraid.7_main | 10 +++++-----
man/lvmreport.7_main | 10 +++++-----
man/lvmsystemid.7_main | 2 +-
man/lvresize.8_pregen | 2 +-
man/pvcreate.8_des | 6 +++---
man/pvcreate.8_pregen | 6 +++---
man/pvmove.8_pregen | 2 +-
man/vgchange.8_pregen | 2 +-
man/vgcreate.8_des | 2 +-
man/vgcreate.8_pregen | 4 ++--
man/vgsplit.8_pregen | 2 +-
test/shell/snapshot-merge-thin.sh | 2 +-
tools/args.h | 6 +++---
tools/command.c | 4 ++--
tools/toollib.c | 2 +-
30 files changed, 60 insertions(+), 60 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index c08864bae..83c94701a 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1769,7 +1769,7 @@ Version 2.02.105 - 20th January 2014
Allow lvmetad to reuse stale socket.
Only unlink lvmetad socket on error if created by the same process.
Append missing newline to lvmetad missing socket path error message.
- Check for non-zero aligment in _text_pv_add_metadata_area() to not div by 0.
+ Check for non-zero alignment in _text_pv_add_metadata_area() to not div by 0.
Add allocation/use_blkid_wiping to lvm.conf to enable blkid wiping.
Enable blkid_wiping by default if the blkid library is present.
Add configure --disable-blkid_wiping to disable libblkid signature detection.
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index ba0129a55..400e458b4 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -555,7 +555,7 @@ Version 1.02.86 - 23rd June 2014
Add DM_REPORT_FIELD_TYPE_STRING_LIST: separate string and string list fields.
Add dm_str_list to libdevmapper for string list type definition and its reuse.
Add dmsetup -S/--select to define selection criteria for dmsetup reports.
- Add dm_report_init_with_selection to intialize report with selection criteria.
+ Add dm_report_init_with_selection to initialize report with selection criteria.
Add DM_REPORT_FIELD_TYPE_SIZE: separate number and size reporting fields.
Use RemoveOnStop for dm-event.socket systemd unit.
Document env var 'DM_DEFAULT_NAME_MANGLING_MODE' in dmsetup man page.
diff --git a/conf/example.conf.in b/conf/example.conf.in
index 215a30f86..5275e76c5 100644
--- a/conf/example.conf.in
+++ b/conf/example.conf.in
@@ -270,16 +270,16 @@ devices {
# Configuration option devices/md_chunk_alignment.
# Align the start of a PV data area with md device's stripe-width.
# This applies if a PV is placed directly on an md device.
- # default_data_alignment will be overriden if it is not aligned
+ # default_data_alignment will be overridden if it is not aligned
# with the value detected for this setting.
- # This setting is overriden by data_alignment_detection,
+ # This setting is overridden by data_alignment_detection,
# data_alignment, and the --dataalignment option.
md_chunk_alignment = 1
# Configuration option devices/default_data_alignment.
# Align the start of a PV data area with this number of MiB.
# Set to 1 for 1MiB, 2 for 2MiB, etc. Set to 0 to disable.
- # This setting is overriden by data_alignment and the --dataalignment
+ # This setting is overridden by data_alignment and the --dataalignment
# option.
# This configuration option has an automatic default value.
# default_data_alignment = 1
@@ -293,9 +293,9 @@ devices {
# preferred unit of receiving I/O, e.g. MD stripe width.
# minimum_io_size is used if optimal_io_size is undefined (0).
# If md_chunk_alignment is enabled, that detects the optimal_io_size.
- # default_data_alignment and md_chunk_alignment will be overriden
+ # default_data_alignment and md_chunk_alignment will be overridden
# if they are not aligned with the value detected for this setting.
- # This setting is overriden by data_alignment and the --dataalignment
+ # This setting is overridden by data_alignment and the --dataalignment
# option.
data_alignment_detection = 1
@@ -304,7 +304,7 @@ devices {
# When non-zero, this setting overrides default_data_alignment.
# Set to 0 to disable, in which case default_data_alignment
# is used to align the first PE in units of MiB.
- # This setting is overriden by the --dataalignment option.
+ # This setting is overridden by the --dataalignment option.
data_alignment = 0
# Configuration option devices/data_alignment_offset_detection.
@@ -315,7 +315,7 @@ devices {
# partitioning will have an alignment_offset of 3584 bytes (sector 7
# is the lowest aligned logical block, the 4KiB sectors start at
# LBA -1, and consequently sector 63 is aligned on a 4KiB boundary).
- # This setting is overriden by the --dataalignmentoffset option.
+ # This setting is overridden by the --dataalignmentoffset option.
data_alignment_offset_detection = 1
# Configuration option devices/ignore_suspended_devices.
diff --git a/daemons/dmeventd/plugins/raid/dmeventd_raid.c b/daemons/dmeventd/plugins/raid/dmeventd_raid.c
index 525b72150..5be605a35 100644
--- a/daemons/dmeventd/plugins/raid/dmeventd_raid.c
+++ b/daemons/dmeventd/plugins/raid/dmeventd_raid.c
@@ -77,7 +77,7 @@ static int _process_raid_event(struct dso_state *state, char *params, const char
if (dead) {
/*
- * Use the first event to run a repair ignoring any additonal ones.
+ * Use the first event to run a repair ignoring any additional ones.
*
* We presume lvconvert to do pre-repair
* checks to avoid bloat in this plugin.
diff --git a/doc/kernel/integrity.txt b/doc/kernel/integrity.txt
index f33e3ade7..03a3b956a 100644
--- a/doc/kernel/integrity.txt
+++ b/doc/kernel/integrity.txt
@@ -94,7 +94,7 @@ journal_watermark:number
commit_time:number
Commit time in milliseconds. When this time passes, the journal is
- written. The journal is also written immediatelly if the FLUSH
+ written. The journal is also written immediately if the FLUSH
request is received.
internal_hash:algorithm(:key) (the key is optional)
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index 3000a4be1..a19402d9d 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -427,15 +427,15 @@ cfg(devices_fw_raid_component_detection_CFG, "fw_raid_component_detection", devi
cfg(devices_md_chunk_alignment_CFG, "md_chunk_alignment", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_MD_CHUNK_ALIGNMENT, vsn(2, 2, 48), NULL, 0, NULL,
"Align the start of a PV data area with md device's stripe-width.\n"
"This applies if a PV is placed directly on an md device.\n"
- "default_data_alignment will be overriden if it is not aligned\n"
+ "default_data_alignment will be overridden if it is not aligned\n"
"with the value detected for this setting.\n"
- "This setting is overriden by data_alignment_detection,\n"
+ "This setting is overridden by data_alignment_detection,\n"
"data_alignment, and the --dataalignment option.\n")
cfg(devices_default_data_alignment_CFG, "default_data_alignment", devices_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, FIRST_PE_AT_ONE_MB_IN_MB, vsn(2, 2, 75), NULL, 0, NULL,
"Align the start of a PV data area with this number of MiB.\n"
"Set to 1 for 1MiB, 2 for 2MiB, etc. Set to 0 to disable.\n"
- "This setting is overriden by data_alignment and the --dataalignment\n"
+ "This setting is overridden by data_alignment and the --dataalignment\n"
"option.\n")
cfg(devices_data_alignment_detection_CFG, "data_alignment_detection", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_DATA_ALIGNMENT_DETECTION, vsn(2, 2, 51), NULL, 0, NULL,
@@ -447,9 +447,9 @@ cfg(devices_data_alignment_detection_CFG, "data_alignment_detection", devices_CF
"preferred unit of receiving I/O, e.g. MD stripe width.\n"
"minimum_io_size is used if optimal_io_size is undefined (0).\n"
"If md_chunk_alignment is enabled, that detects the optimal_io_size.\n"
- "default_data_alignment and md_chunk_alignment will be overriden\n"
+ "default_data_alignment and md_chunk_alignment will be overridden\n"
"if they are not aligned with the value detected for this setting.\n"
- "This setting is overriden by data_alignment and the --dataalignment\n"
+ "This setting is overridden by data_alignment and the --dataalignment\n"
"option.\n")
cfg(devices_data_alignment_CFG, "data_alignment", devices_CFG_SECTION, 0, CFG_TYPE_INT, 0, vsn(2, 2, 45), NULL, 0, NULL,
@@ -457,7 +457,7 @@ cfg(devices_data_alignment_CFG, "data_alignment", devices_CFG_SECTION, 0, CFG_TY
"When non-zero, this setting overrides default_data_alignment.\n"
"Set to 0 to disable, in which case default_data_alignment\n"
"is used to align the first PE in units of MiB.\n"
- "This setting is overriden by the --dataalignment option.\n")
+ "This setting is overridden by the --dataalignment option.\n")
cfg(devices_data_alignment_offset_detection_CFG, "data_alignment_offset_detection", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_DATA_ALIGNMENT_OFFSET_DETECTION, vsn(2, 2, 50), NULL, 0, NULL,
"Shift the start of an aligned PV data area based on sysfs information.\n"
@@ -467,7 +467,7 @@ cfg(devices_data_alignment_offset_detection_CFG, "data_alignment_offset_detectio
"partitioning will have an alignment_offset of 3584 bytes (sector 7\n"
"is the lowest aligned logical block, the 4KiB sectors start at\n"
"LBA -1, and consequently sector 63 is aligned on a 4KiB boundary).\n"
- "This setting is overriden by the --dataalignmentoffset option.\n")
+ "This setting is overridden by the --dataalignmentoffset option.\n")
cfg(devices_ignore_suspended_devices_CFG, "ignore_suspended_devices", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_IGNORE_SUSPENDED_DEVICES, vsn(1, 2, 19), NULL, 0, NULL,
"Ignore DM devices that have I/O suspended while scanning devices.\n"
diff --git a/lib/locking/lvmlockd.c b/lib/locking/lvmlockd.c
index 3b9abd6bf..9a1b4f476 100644
--- a/lib/locking/lvmlockd.c
+++ b/lib/locking/lvmlockd.c
@@ -1289,7 +1289,7 @@ int lockd_start_wait(struct cmd_context *cmd)
* can provide in the lock-gl call.
*
* lockd_gl() and lockd_gl_create() differ in the specific cases where
- * ENOLS (no lockspace found) is overriden. In the vgcreate case, the
+ * ENOLS (no lockspace found) is overridden. In the vgcreate case, the
* override cases are related to sanlock bootstrap, and the lock_type of
* the vg being created is needed.
*
diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c
index 05b7caf9c..74adf0231 100644
--- a/lib/metadata/raid_manip.c
+++ b/lib/metadata/raid_manip.c
@@ -5463,7 +5463,7 @@ static int _takeover_upconvert_wrapper(TAKEOVER_FN_ARGS)
extents_copied = seg->extents_copied;
seg_len = seg->len;
- /* In case of raid4/5, adjust to allow for allocation of additonal image pairs */
+ /* In case of raid4/5, adjust to allow for allocation of additional image pairs */
if (seg_is_raid4(seg) || seg_is_any_raid5(seg)) {
if (!(seg->segtype = get_segtype_from_flag(lv->vg->cmd, SEG_RAID0_META)))
return_0;
diff --git a/man/dmsetup.8_main b/man/dmsetup.8_main
index 8317e23a2..2e15e699c 100644
--- a/man/dmsetup.8_main
+++ b/man/dmsetup.8_main
@@ -510,7 +510,7 @@ Suppress the headings line when using columnar output.
.
.HP
.BR --noflush
-Do not flush outstading I/O when suspending a device, or do not
+Do not flush outstanding I/O when suspending a device, or do not
commit thin-pool metadata when obtaining thin-pool status.
.
.HP
diff --git a/man/dmstats.8_main b/man/dmstats.8_main
index da9d93490..db9f31904 100644
--- a/man/dmstats.8_main
+++ b/man/dmstats.8_main
@@ -553,7 +553,7 @@ Can also specify custom units e.g. \fB--units\ 3M\fP.
.IR user_data
.br
Specify user data (a word) to be stored with a new region. The value
-is added to any internal auxilliary data (for example, group
+is added to any internal auxiliary data (for example, group
information), and stored with the region in the aux_data field provided
by the kernel. Whitespace is not permitted.
.
@@ -1022,7 +1022,7 @@ Group identifier. This is a non-negative integer returned by the dmstats
.TP
.B interval_ns
The estimated interval over which the current counter values have
-accumulated. The value is reported as an interger expressed in units
+accumulated. The value is reported as an integer expressed in units
of nanoseconds.
.TP
.B interval
diff --git a/man/lvchange.8_pregen b/man/lvchange.8_pregen
index 572f84aa8..fa7bdada0 100644
--- a/man/lvchange.8_pregen
+++ b/man/lvchange.8_pregen
@@ -678,7 +678,7 @@ multiple tags at once. See \fBlvm\fP(8) for information about tags.
.br
Determines the allocation policy when a command needs to allocate
Physical Extents (PEs) from the VG. Each VG and LV has an allocation policy
-which can be changed with vgchange/lvchange, or overriden on the
+which can be changed with vgchange/lvchange, or overridden on the
command line.
\fBnormal\fP applies common sense rules such as not placing parallel stripes
on the same PV.
diff --git a/man/lvconvert.8_pregen b/man/lvconvert.8_pregen
index 5be4321c6..f6b364611 100644
--- a/man/lvconvert.8_pregen
+++ b/man/lvconvert.8_pregen
@@ -1192,7 +1192,7 @@ Common options for lvm:
.br
Determines the allocation policy when a command needs to allocate
Physical Extents (PEs) from the VG. Each VG and LV has an allocation policy
-which can be changed with vgchange/lvchange, or overriden on the
+which can be changed with vgchange/lvchange, or overridden on the
command line.
\fBnormal\fP applies common sense rules such as not placing parallel stripes
on the same PV.
diff --git a/man/lvcreate.8_pregen b/man/lvcreate.8_pregen
index 79441c128..c19b7da7b 100644
--- a/man/lvcreate.8_pregen
+++ b/man/lvcreate.8_pregen
@@ -1269,7 +1269,7 @@ multiple tags at once. See \fBlvm\fP(8) for information about tags.
.br
Determines the allocation policy when a command needs to allocate
Physical Extents (PEs) from the VG. Each VG and LV has an allocation policy
-which can be changed with vgchange/lvchange, or overriden on the
+which can be changed with vgchange/lvchange, or overridden on the
command line.
\fBnormal\fP applies common sense rules such as not placing parallel stripes
on the same PV.
diff --git a/man/lvextend.8_pregen b/man/lvextend.8_pregen
index 5e0a89ffd..cf7925ee0 100644
--- a/man/lvextend.8_pregen
+++ b/man/lvextend.8_pregen
@@ -362,7 +362,7 @@ Common options for lvm:
.br
Determines the allocation policy when a command needs to allocate
Physical Extents (PEs) from the VG. Each VG and LV has an allocation policy
-which can be changed with vgchange/lvchange, or overriden on the
+which can be changed with vgchange/lvchange, or overridden on the
command line.
\fBnormal\fP applies common sense rules such as not placing parallel stripes
on the same PV.
diff --git a/man/lvm.8_main b/man/lvm.8_main
index ba151e367..1e03b8cb9 100644
--- a/man/lvm.8_main
+++ b/man/lvm.8_main
@@ -427,12 +427,12 @@ File descriptor to use for report output from LVM commands.
.TP
.B LVM_COMMAND_PROFILE
Name of default command profile to use for LVM commands. This profile
-is overriden by direct use of \fB--commandprofile\fP command line option.
+is overridden by direct use of \fB--commandprofile\fP command line option.
.TP
.B LVM_RUN_BY_DMEVENTD
This variable is normally set by dmeventd plugin to inform lvm2 command
it is running from dmeventd plugin so lvm2 takes some extra action
-to avoid comunication and deadlocks with dmeventd.
+to avoid communication and deadlocks with dmeventd.
.TP
.B LVM_SYSTEM_DIR
Directory containing \fBlvm.conf\fP(5) and other LVM system files.
diff --git a/man/lvmraid.7_main b/man/lvmraid.7_main
index aedd16a27..2335f5dbe 100644
--- a/man/lvmraid.7_main
+++ b/man/lvmraid.7_main
@@ -180,7 +180,7 @@ parity 0 with data restart.) See \fBRAID5 variants\fP below.
raid6 is a form of striping like raid5, but uses two extra devices for
parity blocks. LV data and parity blocks are stored on each device, typically
-in a rotating pattern for perfomramce reasons. The
+in a rotating pattern for performance reasons. The
LV data remains available if up to two devices fail. The parity is used
to recalculate data that is lost from one or two devices. The minimum
number of devices required is 5.
@@ -376,7 +376,7 @@ The \fBrepair\fP mode can make the RAID LV data consistent, but it does
not know which data is correct. The result may be consistent but
incorrect data. When two different blocks of data must be made
consistent, it chooses the block from the device that would be used during
-RAID intialization. However, if the PV holding corrupt data is known,
+RAID initialization. However, if the PV holding corrupt data is known,
lvchange --rebuild can be used in place of scrubbing to reconstruct the
data on the bad device.
@@ -475,7 +475,7 @@ holds parity. Each rmeta SubLV holds RAID metadata.
.B raid5
.br
-At least three rimage SubLVs each typcially hold a portion of LV data and parity
+At least three rimage SubLVs each typically hold a portion of LV data and parity
(see section on raid5)
Each rmeta SubLV holds RAID metadata.
@@ -1347,7 +1347,7 @@ The 'R' in the same column of the attribute field shows the freed image Sub LVs
lv_rimage_6:0-33 8192
.fi
-Now that the reshape is finished the 'R' atribute on the RaidLV shows images can be removed.
+Now that the reshape is finished the 'R' attribute on the RaidLV shows images can be removed.
.nf
# lvs -o lv_name,attr,segtype,seg_pe_ranges,dataoffset vg
@@ -1584,7 +1584,7 @@ conversion.
Now we'll change the number of data stripes from 1 to 5 and request 128K stripe size
in one command. This will grow the size of the LV by a factor of 5 (we add 4 data stripes
-to the one given). That additonal space can be used by e.g. growing any contained filesystem
+to the one given). That additional space can be used by e.g. growing any contained filesystem
or the LV can be reduced in size after the reshaping conversion has finished.
.nf
diff --git a/man/lvmreport.7_main b/man/lvmreport.7_main
index 7167df0ea..aca1b4940 100644
--- a/man/lvmreport.7_main
+++ b/man/lvmreport.7_main
@@ -129,7 +129,7 @@ Definition of the set set of fields to use
.br
Field set to use. See \fBmain report specifics\fP and
\fBlog report specifics\fP for information about field sets configured with
-global configuratin settings that this option overrides.
+global configuration settings that this option overrides.
.IP - 3
--options|-o+ FieldSet
.br
@@ -240,7 +240,7 @@ this option suppresses the \fBmain report\fP output and it causes the
.IP - 3
--unbuffered
.br
-Overrides report/bufffered configuration setting.
+Overrides report/buffered configuration setting.
.RE
.RE
@@ -1337,7 +1337,7 @@ field which is of type "size" - it's =, !=, >=, >, <= and <. You can find
applicable comparison operators for other fields and other field types the
same way.
-To demostrate selection functionality in LVM, we will create more LVs in
+To demonstrate selection functionality in LVM, we will create more LVs in
addition to lvol0 and lvol1 we used in our previous examples.
.nf
@@ -1686,9 +1686,9 @@ subreport here.
Below is an extended example with \fBlvm fullreport\fP to illustrate
combination of various options. The report output is in JSON format.
Also, we configure "vg", "pvseg", "seg" and "log" subreport to contain
-only specified fields. For the "pvseg" subreport, we're intested only
+only specified fields. For the "pvseg" subreport, we're interested only
in PV names having "sda" in their name. For the "log" subreport we're
-intested only in log lines related to either "lvol0" object or object
+interested only in log lines related to either "lvol0" object or object
having "sda" in its name. Also, for the log subreport we define ordering
to be based on "log_object_type" field.
diff --git a/man/lvmsystemid.7_main b/man/lvmsystemid.7_main
index 688d16b77..7d6e96ed6 100644
--- a/man/lvmsystemid.7_main
+++ b/man/lvmsystemid.7_main
@@ -122,7 +122,7 @@ accessible to any host.
.B Owned:
A local VG that has a system ID set, as viewed from the host with a
-matching system ID (the owner). This VG type is acessible to the host.
+matching system ID (the owner). This VG type is accessible to the host.
.B Foreign:
A local VG that has a system ID set, as viewed from any host with an
diff --git a/man/lvresize.8_pregen b/man/lvresize.8_pregen
index bc0b440db..8c115198a 100644
--- a/man/lvresize.8_pregen
+++ b/man/lvresize.8_pregen
@@ -310,7 +310,7 @@ Common options for lvm:
.br
Determines the allocation policy when a command needs to allocate
Physical Extents (PEs) from the VG. Each VG and LV has an allocation policy
-which can be changed with vgchange/lvchange, or overriden on the
+which can be changed with vgchange/lvchange, or overridden on the
command line.
\fBnormal\fP applies common sense rules such as not placing parallel stripes
on the same PV.
diff --git a/man/pvcreate.8_des b/man/pvcreate.8_des
index 60205c785..22fb26bf3 100644
--- a/man/pvcreate.8_des
+++ b/man/pvcreate.8_des
@@ -54,7 +54,7 @@ default_data_alignment 1 (MiB), setting --metadatasize 2048k results in
pe_start of 3 MiB and mda_size of 3068 KiB. Alternatively, --metadatasize
2044k results in pe_start at 2 MiB and mda_size of 2044 KiB.
-The alignment of pe_start described above may be automatically overriden
+The alignment of pe_start described above may be automatically overridden
based on md device properties or device i/o properties reported in sysfs.
These automatic adjustments can be enabled/disabled using lvm.conf
settings md_chunk_alignment and data_alignment_offset_detection.
@@ -72,7 +72,7 @@ provides at least 2048 KiB of metadata space.
Always check the resulting alignment and metadata size when using
these options.
-To shift an aligned pe_start value, use the --dataaligmentoffset option.
+To shift an aligned pe_start value, use the --dataalignmentoffset option.
The pe_start alignment is calculated as described above, and then the
-value specified with --dataaligmentoffset is added to produce the final
+value specified with --dataalignmentoffset is added to produce the final
pe_start value.
diff --git a/man/pvcreate.8_pregen b/man/pvcreate.8_pregen
index b43dbdd16..0df67bd5d 100644
--- a/man/pvcreate.8_pregen
+++ b/man/pvcreate.8_pregen
@@ -64,7 +64,7 @@ default_data_alignment 1 (MiB), setting --metadatasize 2048k results in
pe_start of 3 MiB and mda_size of 3068 KiB. Alternatively, --metadatasize
2044k results in pe_start at 2 MiB and mda_size of 2044 KiB.
-The alignment of pe_start described above may be automatically overriden
+The alignment of pe_start described above may be automatically overridden
based on md device properties or device i/o properties reported in sysfs.
These automatic adjustments can be enabled/disabled using lvm.conf
settings md_chunk_alignment and data_alignment_offset_detection.
@@ -82,9 +82,9 @@ provides at least 2048 KiB of metadata space.
Always check the resulting alignment and metadata size when using
these options.
-To shift an aligned pe_start value, use the --dataaligmentoffset option.
+To shift an aligned pe_start value, use the --dataalignmentoffset option.
The pe_start alignment is calculated as described above, and then the
-value specified with --dataaligmentoffset is added to produce the final
+value specified with --dataalignmentoffset is added to produce the final
pe_start value.
.SH USAGE
\fBpvcreate\fP \fIPV\fP ...
diff --git a/man/pvmove.8_pregen b/man/pvmove.8_pregen
index 0fc745009..a370e75ba 100644
--- a/man/pvmove.8_pregen
+++ b/man/pvmove.8_pregen
@@ -172,7 +172,7 @@ destination PV, while unmoved segments will remain on the source PV.
.br
Determines the allocation policy when a command needs to allocate
Physical Extents (PEs) from the VG. Each VG and LV has an allocation policy
-which can be changed with vgchange/lvchange, or overriden on the
+which can be changed with vgchange/lvchange, or overridden on the
command line.
\fBnormal\fP applies common sense rules such as not placing parallel stripes
on the same PV.
diff --git a/man/vgchange.8_pregen b/man/vgchange.8_pregen
index cb3c3500a..04cc23b8b 100644
--- a/man/vgchange.8_pregen
+++ b/man/vgchange.8_pregen
@@ -697,7 +697,7 @@ multiple tags at once. See \fBlvm\fP(8) for information about tags.
.br
Determines the allocation policy when a command needs to allocate
Physical Extents (PEs) from the VG. Each VG and LV has an allocation policy
-which can be changed with vgchange/lvchange, or overriden on the
+which can be changed with vgchange/lvchange, or overridden on the
command line.
\fBnormal\fP applies common sense rules such as not placing parallel stripes
on the same PV.
diff --git a/man/vgcreate.8_des b/man/vgcreate.8_des
index bc636609f..e2861c3a0 100644
--- a/man/vgcreate.8_des
+++ b/man/vgcreate.8_des
@@ -1,5 +1,5 @@
vgcreate creates a new VG on block devices. If the devices were not
-previously intialized as PVs with \fBpvcreate\fP(8), vgcreate will
+previously initialized as PVs with \fBpvcreate\fP(8), vgcreate will
inititialize them, making them PVs. The pvcreate options for initializing
devices are also available with vgcreate.
diff --git a/man/vgcreate.8_pregen b/man/vgcreate.8_pregen
index 91fa6a67e..0b7802ed7 100644
--- a/man/vgcreate.8_pregen
+++ b/man/vgcreate.8_pregen
@@ -9,7 +9,7 @@ vgcreate - Create a volume group
.br
.SH DESCRIPTION
vgcreate creates a new VG on block devices. If the devices were not
-previously intialized as PVs with \fBpvcreate\fP(8), vgcreate will
+previously initialized as PVs with \fBpvcreate\fP(8), vgcreate will
inititialize them, making them PVs. The pvcreate options for initializing
devices are also available with vgcreate.
@@ -191,7 +191,7 @@ multiple tags at once. See \fBlvm\fP(8) for information about tags.
.br
Determines the allocation policy when a command needs to allocate
Physical Extents (PEs) from the VG. Each VG and LV has an allocation policy
-which can be changed with vgchange/lvchange, or overriden on the
+which can be changed with vgchange/lvchange, or overridden on the
command line.
\fBnormal\fP applies common sense rules such as not placing parallel stripes
on the same PV.
diff --git a/man/vgsplit.8_pregen b/man/vgsplit.8_pregen
index fe680982d..9aa79e890 100644
--- a/man/vgsplit.8_pregen
+++ b/man/vgsplit.8_pregen
@@ -145,7 +145,7 @@ Common options for lvm:
.br
Determines the allocation policy when a command needs to allocate
Physical Extents (PEs) from the VG. Each VG and LV has an allocation policy
-which can be changed with vgchange/lvchange, or overriden on the
+which can be changed with vgchange/lvchange, or overridden on the
command line.
\fBnormal\fP applies common sense rules such as not placing parallel stripes
on the same PV.
diff --git a/test/shell/snapshot-merge-thin.sh b/test/shell/snapshot-merge-thin.sh
index 4e4577ca9..a74567b85 100644
--- a/test/shell/snapshot-merge-thin.sh
+++ b/test/shell/snapshot-merge-thin.sh
@@ -54,7 +54,7 @@ aux delay_dev "$dev1" 0 400 "$(get first_extent_sector "$dev1"):"
# Initiate background merge
lvconvert -b --merge $vg/$lv2
-# Query status of snapshot immediatelly after start
+# Query status of snapshot immediately after start
# - may hit race of checking already in-progress merge
#lvs -a -o+lv_merging,lv_merge_failed $vg
check lv_field $vg/$lv1 lv_merging "merging"
diff --git a/tools/args.h b/tools/args.h
index ca8f9ec51..c1d32be32 100644
--- a/tools/args.h
+++ b/tools/args.h
@@ -59,7 +59,7 @@ arg(aligned_ARG, '\0', "aligned", 0, 0, 0,
arg(alloc_ARG, '\0', "alloc", alloc_VAL, 0, 0,
"Determines the allocation policy when a command needs to allocate\n"
"Physical Extents (PEs) from the VG. Each VG and LV has an allocation policy\n"
- "which can be changed with vgchange/lvchange, or overriden on the\n"
+ "which can be changed with vgchange/lvchange, or overridden on the\n"
"command line.\n"
"\\fBnormal\\fP applies common sense rules such as not placing parallel stripes\n"
"on the same PV.\n"
@@ -1138,7 +1138,7 @@ arg(maxlogicalvolumes_ARG, 'l', "maxlogicalvolumes", uint32_VAL, 0, 0,
"Sets the maximum number of LVs allowed in a VG.\n")
/*
- * The extents_VAL is overriden in configure_command_option_values()
+ * The extents_VAL is overridden in configure_command_option_values()
* according to the command being run. Different commands accept
* different signs with the value.
*/
@@ -1197,7 +1197,7 @@ arg(lvmpartition_ARG, 'l', "lvmpartition", 0, 0, 0,
"Only report PVs.\n")
/*
- * The sizemb_VAL is overriden in configure_command_option_values()
+ * The sizemb_VAL is overridden in configure_command_option_values()
* according to the command being run. Different commands accept
* different signs with the value.
*/
diff --git a/tools/command.c b/tools/command.c
index bb707d66f..38b11b8eb 100644
--- a/tools/command.c
+++ b/tools/command.c
@@ -1650,14 +1650,14 @@ int define_commands(struct cmd_context *cmdtool, const char *run_name)
*
* This function overrides default opt_names[] entries at run time according
* to the command name, adjusting the value types accepted by various options.
- * So, for lvresize, opt_names[sizemb_VAL] is overriden to accept
+ * So, for lvresize, opt_names[sizemb_VAL] is overridden to accept
* the relative (+ or -) value type ssizemb_VAL, instead of the default
* sizemb_VAL. This way, when lvresize processes the --size value, it
* will use the ssize_mb_arg() function which accepts relative size values.
* When lvcreate processes the --size value, it uses size_mb_arg() which
* rejects signed values.
*
- * The command defs in commands[] do not need to be overriden because
+ * The command defs in commands[] do not need to be overridden because
* the command-lines.in defs have the context of a command, and are
* described using the proper value type, e.g. this cmd def already
* uses the relative size value: "lvresize --size SSizeMB LV",
diff --git a/tools/toollib.c b/tools/toollib.c
index 67fbbdaa0..5ce2ff346 100644
--- a/tools/toollib.c
+++ b/tools/toollib.c
@@ -4827,7 +4827,7 @@ static void _check_pvcreate_prompt(struct cmd_context *cmd,
}
if (answer_yes && answer_no) {
- log_warn("WARNING: prompt answer yes is overriden by prompt answer no.");
+ log_warn("WARNING: prompt answer yes is overridden by prompt answer no.");
answer_yes = 0;
}
2 years, 8 months
main - man: show config options with comments
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=d5b0c72f40abc8caa19...
Commit: d5b0c72f40abc8caa199a0f484a9a0223f4a03dc
Parent: ff5776024f056aeff0f1dac9f028e55761e7c24b
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Mar 30 13:01:31 2021 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Mar 30 13:08:14 2021 +0200
man: show config options with comments
---
man/lvmvdo.7_main | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/man/lvmvdo.7_main b/man/lvmvdo.7_main
index 520a28ecf..55b9fa2a6 100644
--- a/man/lvmvdo.7_main
+++ b/man/lvmvdo.7_main
@@ -121,8 +121,8 @@ VDO allows to set a large variety of options. Lots of these settings
can be specified in lvm.conf or profile settings. You can prepare
a number of different profiles in the #DEFAULT_SYS_DIR#/profile directory
and just specify the profile file name.
-Check the output of \fBlvmconfig --type full\fP for a detailed description
-of all individual VDO settings.
+Check the output of \fBlvmconfig --type default --withcomments\fP
+for a detailed description of all individual VDO settings.
.I Example
.nf
2 years, 8 months
main - man: describe profile support lvmcache.7
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=ff5776024f056aeff0f...
Commit: ff5776024f056aeff0f1dac9f028e55761e7c24b
Parent: 2aaea13aaa2935905a6d1cb32db4e2cd477c22f4
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Mar 29 18:55:47 2021 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Mar 30 13:08:14 2021 +0200
man: describe profile support lvmcache.7
Add missing description for profile usage with cache pool.
List cache-pools as first option for dm-cache as it provides
better performance and more functionality over cachevols.
---
man/lvmcache.7_main | 160 ++++++++++++++++++++++++++++++++++++----------------
1 file changed, 112 insertions(+), 48 deletions(-)
diff --git a/man/lvmcache.7_main b/man/lvmcache.7_main
index 85d4d9e34..182dc0a79 100644
--- a/man/lvmcache.7_main
+++ b/man/lvmcache.7_main
@@ -63,17 +63,21 @@ To start caching the main LV, convert the main LV to the desired caching
type, and specify the fast LV to use as the cache:
.nf
-using dm-cache:
+using dm-cache (with cachepool):
+
+ $ lvconvert --type cache --cachepool fast vg/main
+
+using dm-cache (with cachevol):
$ lvconvert --type cache --cachevol fast vg/main
-using dm-writecache:
+using dm-writecache (with cachevol):
$ lvconvert --type writecache --cachevol fast vg/main
-using dm-cache (with cachepool):
-
- $ lvconvert --type cache --cachepool fast vg/main
+For more alteratives see:
+dm-cache command shortcut
+dm-cache with separate data and metadata LVs
.fi
.B 4. Display LVs
@@ -85,31 +89,31 @@ suffix. It is displayed by lvs -a. The _corig or _wcorig LV represents
the original LV without the cache.
.nf
-using dm-cache:
+using dm-cache (with cachepool):
- $ lvs -a
- LV Pool Type Devices
- main [fast_cvol] cache main_corig(0)
+ $ lvs -ao+devices
+ LV Pool Type Devices
+ main [fast_cpool] cache main_corig(0)
+ [fast_cpool] cache-pool fast_pool_cdata(0)
+ [fast_cpool_cdata] linear /dev/fast_ssd
+ [fast_cpool_cmeta] linear /dev/fast_ssd
+ [main_corig] linear /dev/slow_hhd
+
+using dm-cache (with cachevol):
+
+ $ lvs -ao+devices
+ LV Pool Type Devices
+ main [fast_cvol] cache main_corig(0)
[fast_cvol] linear /dev/fast_ssd
[main_corig] linear /dev/slow_hhd
-using dm-writecache:
+using dm-writecache (with cachevol):
- $ lvs -a
- LV Pool Type Devices
+ $ lvs -ao+devices
+ LV Pool Type Devices
main [fast_cvol] writecache main_wcorig(0)
[fast_cvol] linear /dev/fast_ssd
[main_wcorig] linear /dev/slow_hhd
-
-using dm-cache (with cachepool):
-
- $ lvs -a
- LV Pool Type Devices
- main [fast_cpool] cache main_corig(0)
- [fast_cpool] cache-pool fast_pool_cdata(0)
- [fast_cpool_cdata] linear /dev/fast_ssd
- [fast_cpool_cmeta] linear /dev/fast_ssd
- [main_corig] linear /dev/slow_hhd
.fi
.B 5. Use the main LV
@@ -118,26 +122,26 @@ Use the LV until the cache is no longer wanted, or needs to be changed.
.B 6. Stop caching
-To stop caching the main LV, separate the fast LV from the main LV. This
-changes the type of the main LV back to what it was before the cache was
-attached.
+To stop caching the main LV and also remove unneeded cache pool,
+use the --uncache:
.nf
- $ lvconvert --splitcache vg/main
+ $ lvconvert --uncache vg/main
$ lvs -a
- LV VG Attr Type Devices
- fast vg -wi------- linear /dev/fast_ssd
+ LV VG Attr Type Devices
main vg -wi------- linear /dev/slow_hhd
-To stop caching the main LV and also remove unneeded cache pool,
-use the --uncache:
+To stop caching the main LV, separate the fast LV from the main LV. This
+changes the type of the main LV back to what it was before the cache was
+attached.
.nf
- $ lvconvert --uncache vg/main
+ $ lvconvert --splitcache vg/main
$ lvs -a
LV VG Attr Type Devices
+ fast vg -wi------- linear /dev/fast_ssd
main vg -wi------- linear /dev/slow_hhd
.fi
@@ -167,14 +171,6 @@ for the fast LV.
\&
-.B --cachevol
-.I LV
-.br
-
-Pass this option a fast LV that should be used to hold the cache. With a
-cachevol, cache data and metadata are stored in different parts of the
-same fast LV. This option can be used with dm-writecache or dm-cache.
-
.B --cachepool
.IR CachePoolLV | LV
.br
@@ -189,6 +185,14 @@ that cannot be used directly. If a standard LV is passed with this
option, lvm will first convert it to a cache pool by combining it with
another LV to use for metadata. This option can be used with dm-cache.
+.B --cachevol
+.I LV
+.br
+
+Pass this option a fast LV that should be used to hold the cache. With a
+cachevol, cache data and metadata are stored in different parts of the
+same fast LV. This option can be used with dm-writecache or dm-cache.
+
.B --cachedevice
.I PV
.br
@@ -318,10 +322,25 @@ cleaner mode, and any required flushing is performed in device suspend.
\&
-When using dm-cache, the cache metadata and cache data can be stored on
-separate LVs. To do this, a "cache pool" is created, which is a special
+Preferred way of using dm-cache is to place the cache metadata and cache data
+on separate LVs. To do this, a "cache pool" is created, which is a special
LV that references two sub LVs, one for data and one for metadata.
+To create a cache pool of given data size and let lvm2 calculate appropriate
+metadata size:
+
+.nf
+$ lvcreate --type cache-pool -L DataSize -n fast vg /dev/fast_ssd1
+.fi
+
+To create a cache pool from separate LV and let lvm2 calculate
+appropriate cache metadata size:
+
+.nf
+$ lvcreate -n fast -L DataSize vg /dev/fast_ssd1
+$ lvconvert --type cache-pool vg/fast /dev/fast_ssd1
+.fi
+
To create a cache pool from two separate LVs:
.nf
@@ -374,8 +393,12 @@ mode can be displayed with the cache_mode reporting option:
defines the default cache mode.
.nf
-$ lvconvert --type cache --cachevol fast \\
- --cachemode writethrough vg/main
+$ lvconvert --type cache --cachemode writethrough \\
+ --cachepool fast vg/main
+
+
+$ lvconvert --type cache --cachemode writethrough \\
+ --cachevol fast vg/main
.nf
.SS dm-cache chunk size
@@ -480,6 +503,39 @@ defines the default cache policy.
.br
defines the default cache settings.
+.SS dm-cache using metadata profiles
+
+\&
+
+Cache pools allows to set a variety of options. Lots of these settings
+can be specified in lvm.conf or profile settings. You can prepare
+a number of different profiles in the #DEFAULT_SYS_DIR#/profile directory
+and just specify the metadata profile file name when caching LV or creating cache-pool.
+Check the output of \fBlvmconfig --type default --withcomments\fP
+for a detailed description of all individual cache settings.
+
+.I Example
+.nf
+# cat <<EOF > #DEFAULT_SYS_DIR#/profile/cache_big_chunk.profile
+allocation {
+ cache_pool_metadata_require_separate_pvs=0
+ cache_pool_chunk_size=512
+ cache_metadata_format=2
+ cache_mode="writethrough"
+ cache_policy="smq"
+ cache_settings {
+ smq {
+ migration_threshold=8192
+ random_threshold=4096
+ }
+ }
+}
+EOF
+
+# lvcreate --cache -L10G --metadataprofile cache_big_chunk vg/main /dev/fast_ssd
+# lvcreate --cache -L10G --config 'allocation/cache_pool_chunk_size=512' vg/main /dev/fast_ssd
+.fi
+
.SS dm-cache spare metadata LV
\&
@@ -518,16 +574,24 @@ $ lvconvert --type cache --cachevol fast vg/main
\&
-A single command can be used to create a cache pool and attach that new
-cache pool to a main LV:
+A single command can be used to cache main LV with automatic
+creation of a cache-pool:
+
+.nf
+$ lvcreate --cache --size CacheDataSize VG/LV [FastPVs]
+.fi
+
+or the longer variant
.nf
-$ lvcreate --type cache --name Name --size Size VG/LV [PV]
+$ lvcreate --type cache --size CacheDataSize \\
+ --name NameCachePool VG/LV [FastPVs]
.fi
In this command, the specified LV already exists, and is the main LV to be
-cached. The command creates a new cache pool with the given name and
-size, using the optionally specified PV (typically an ssd). Then it
+cached. The command creates a new cache pool with size and given name
+or the name is automatically selected from a sequence lvolX_cpool,
+using the optionally specified fast PV(s) (typically an ssd). Then it
attaches the new cache pool to the existing main LV to begin caching.
(Note: ensure that the specified main LV is a standard LV. If a cache
2 years, 8 months
main - man: writecache missed for --type
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=2aaea13aaa2935905a6...
Commit: 2aaea13aaa2935905a6d1cb32db4e2cd477c22f4
Parent: 648188df2a9ba7528f60a9362860d7615227061b
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Mar 30 11:22:27 2021 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Mar 30 13:08:14 2021 +0200
man: writecache missed for --type
Add missing writecache type into man pages.
---
man/lvconvert.8_pregen | 4 ++--
man/lvcreate.8_pregen | 4 ++--
man/lvextend.8_pregen | 6 +++---
man/lvresize.8_pregen | 6 +++---
tools/vals.h | 2 +-
5 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/man/lvconvert.8_pregen b/man/lvconvert.8_pregen
index 63fbc093c..5be4321c6 100644
--- a/man/lvconvert.8_pregen
+++ b/man/lvconvert.8_pregen
@@ -259,7 +259,7 @@ lvconvert - Change logical volume layout
.ad b
.br
.ad l
- \fB--type\fP \fBlinear\fP|\fBstriped\fP|\fBsnapshot\fP|\fBmirror\fP|\fBraid\fP|\fBthin\fP|\fBcache\fP|\fBvdo\fP|\fBthin-pool\fP|\fBcache-pool\fP|\fBvdo-pool\fP
+ \fB--type\fP \fBlinear\fP|\fBstriped\fP|\fBsnapshot\fP|\fBraid\fP|\fBmirror\fP|\fBthin\fP|\fBthin-pool\fP|\fBvdo\fP|\fBvdo-pool\fP|\fBcache\fP|\fBcache-pool\fP|\fBwritecache\fP
.ad b
.br
.ad l
@@ -1738,7 +1738,7 @@ the image (see --splitmirrors with --name.
.ad b
.HP
.ad l
-\fB--type\fP \fBlinear\fP|\fBstriped\fP|\fBsnapshot\fP|\fBmirror\fP|\fBraid\fP|\fBthin\fP|\fBcache\fP|\fBvdo\fP|\fBthin-pool\fP|\fBcache-pool\fP|\fBvdo-pool\fP
+\fB--type\fP \fBlinear\fP|\fBstriped\fP|\fBsnapshot\fP|\fBraid\fP|\fBmirror\fP|\fBthin\fP|\fBthin-pool\fP|\fBvdo\fP|\fBvdo-pool\fP|\fBcache\fP|\fBcache-pool\fP|\fBwritecache\fP
.br
The LV type, also known as "segment type" or "segtype".
See usage descriptions for the specific ways to use these types.
diff --git a/man/lvcreate.8_pregen b/man/lvcreate.8_pregen
index 8f548811e..79441c128 100644
--- a/man/lvcreate.8_pregen
+++ b/man/lvcreate.8_pregen
@@ -263,7 +263,7 @@ lvcreate - Create a logical volume
.ad b
.br
.ad l
- \fB--type\fP \fBlinear\fP|\fBstriped\fP|\fBsnapshot\fP|\fBmirror\fP|\fBraid\fP|\fBthin\fP|\fBcache\fP|\fBvdo\fP|\fBthin-pool\fP|\fBcache-pool\fP|\fBvdo-pool\fP
+ \fB--type\fP \fBlinear\fP|\fBstriped\fP|\fBsnapshot\fP|\fBraid\fP|\fBmirror\fP|\fBthin\fP|\fBthin-pool\fP|\fBvdo\fP|\fBvdo-pool\fP|\fBcache\fP|\fBcache-pool\fP|\fBwritecache\fP
.ad b
.br
.ad l
@@ -1845,7 +1845,7 @@ The name of a thin pool LV.
.ad b
.HP
.ad l
-\fB--type\fP \fBlinear\fP|\fBstriped\fP|\fBsnapshot\fP|\fBmirror\fP|\fBraid\fP|\fBthin\fP|\fBcache\fP|\fBvdo\fP|\fBthin-pool\fP|\fBcache-pool\fP|\fBvdo-pool\fP
+\fB--type\fP \fBlinear\fP|\fBstriped\fP|\fBsnapshot\fP|\fBraid\fP|\fBmirror\fP|\fBthin\fP|\fBthin-pool\fP|\fBvdo\fP|\fBvdo-pool\fP|\fBcache\fP|\fBcache-pool\fP|\fBwritecache\fP
.br
The LV type, also known as "segment type" or "segtype".
See usage descriptions for the specific ways to use these types.
diff --git a/man/lvextend.8_pregen b/man/lvextend.8_pregen
index 4ccfa809b..5e0a89ffd 100644
--- a/man/lvextend.8_pregen
+++ b/man/lvextend.8_pregen
@@ -119,7 +119,7 @@ lvextend - Add space to a logical volume
.ad b
.br
.ad l
- \fB--type\fP \fBlinear\fP|\fBstriped\fP|\fBsnapshot\fP|\fBmirror\fP|\fBraid\fP|\fBthin\fP|\fBcache\fP|\fBvdo\fP|\fBthin-pool\fP|\fBcache-pool\fP|\fBvdo-pool\fP
+ \fB--type\fP \fBlinear\fP|\fBstriped\fP|\fBsnapshot\fP|\fBraid\fP|\fBmirror\fP|\fBthin\fP|\fBthin-pool\fP|\fBvdo\fP|\fBvdo-pool\fP|\fBcache\fP|\fBcache-pool\fP|\fBwritecache\fP
.ad b
.br
.ad l
@@ -284,7 +284,7 @@ Common options for command:
.ad b
.br
.ad l
-[ \fB--type\fP \fBlinear\fP|\fBstriped\fP|\fBsnapshot\fP|\fBmirror\fP|\fBraid\fP|\fBthin\fP|\fBcache\fP|\fBvdo\fP|\fBthin-pool\fP|\fBcache-pool\fP|\fBvdo-pool\fP ]
+[ \fB--type\fP \fBlinear\fP|\fBstriped\fP|\fBsnapshot\fP|\fBraid\fP|\fBmirror\fP|\fBthin\fP|\fBthin-pool\fP|\fBvdo\fP|\fBvdo-pool\fP|\fBcache\fP|\fBcache-pool\fP|\fBwritecache\fP ]
.ad b
.RE
@@ -614,7 +614,7 @@ back metadata it believes has changed but hasn't.
.ad b
.HP
.ad l
-\fB--type\fP \fBlinear\fP|\fBstriped\fP|\fBsnapshot\fP|\fBmirror\fP|\fBraid\fP|\fBthin\fP|\fBcache\fP|\fBvdo\fP|\fBthin-pool\fP|\fBcache-pool\fP|\fBvdo-pool\fP
+\fB--type\fP \fBlinear\fP|\fBstriped\fP|\fBsnapshot\fP|\fBraid\fP|\fBmirror\fP|\fBthin\fP|\fBthin-pool\fP|\fBvdo\fP|\fBvdo-pool\fP|\fBcache\fP|\fBcache-pool\fP|\fBwritecache\fP
.br
The LV type, also known as "segment type" or "segtype".
See usage descriptions for the specific ways to use these types.
diff --git a/man/lvresize.8_pregen b/man/lvresize.8_pregen
index 528066154..bc0b440db 100644
--- a/man/lvresize.8_pregen
+++ b/man/lvresize.8_pregen
@@ -115,7 +115,7 @@ lvresize - Resize a logical volume
.ad b
.br
.ad l
- \fB--type\fP \fBlinear\fP|\fBstriped\fP|\fBsnapshot\fP|\fBmirror\fP|\fBraid\fP|\fBthin\fP|\fBcache\fP|\fBvdo\fP|\fBthin-pool\fP|\fBcache-pool\fP|\fBvdo-pool\fP
+ \fB--type\fP \fBlinear\fP|\fBstriped\fP|\fBsnapshot\fP|\fBraid\fP|\fBmirror\fP|\fBthin\fP|\fBthin-pool\fP|\fBvdo\fP|\fBvdo-pool\fP|\fBcache\fP|\fBcache-pool\fP|\fBwritecache\fP
.ad b
.br
.ad l
@@ -232,7 +232,7 @@ Common options for command:
.ad b
.br
.ad l
-[ \fB--type\fP \fBlinear\fP|\fBstriped\fP|\fBsnapshot\fP|\fBmirror\fP|\fBraid\fP|\fBthin\fP|\fBcache\fP|\fBvdo\fP|\fBthin-pool\fP|\fBcache-pool\fP|\fBvdo-pool\fP ]
+[ \fB--type\fP \fBlinear\fP|\fBstriped\fP|\fBsnapshot\fP|\fBraid\fP|\fBmirror\fP|\fBthin\fP|\fBthin-pool\fP|\fBvdo\fP|\fBvdo-pool\fP|\fBcache\fP|\fBcache-pool\fP|\fBwritecache\fP ]
.ad b
.RE
@@ -556,7 +556,7 @@ back metadata it believes has changed but hasn't.
.ad b
.HP
.ad l
-\fB--type\fP \fBlinear\fP|\fBstriped\fP|\fBsnapshot\fP|\fBmirror\fP|\fBraid\fP|\fBthin\fP|\fBcache\fP|\fBvdo\fP|\fBthin-pool\fP|\fBcache-pool\fP|\fBvdo-pool\fP
+\fB--type\fP \fBlinear\fP|\fBstriped\fP|\fBsnapshot\fP|\fBraid\fP|\fBmirror\fP|\fBthin\fP|\fBthin-pool\fP|\fBvdo\fP|\fBvdo-pool\fP|\fBcache\fP|\fBcache-pool\fP|\fBwritecache\fP
.br
The LV type, also known as "segment type" or "segtype".
See usage descriptions for the specific ways to use these types.
diff --git a/tools/vals.h b/tools/vals.h
index 70404436b..098dc9e4e 100644
--- a/tools/vals.h
+++ b/tools/vals.h
@@ -128,7 +128,7 @@ val(nextents_VAL, nextents_arg, "NExtents", "[-]Number[PERCENT]")
val(permission_VAL, permission_arg, "Permission", "rw|r")
val(metadatatype_VAL, metadatatype_arg, "MetadataType", "lvm2")
val(units_VAL, string_arg, "Units", "r|R|h|H|b|B|s|S|k|K|m|M|g|G|t|T|p|P|e|E")
-val(segtype_VAL, segtype_arg, "SegType", "linear|striped|snapshot|mirror|raid|thin|cache|vdo|thin-pool|cache-pool|vdo-pool")
+val(segtype_VAL, segtype_arg, "SegType", "linear|striped|snapshot|raid|mirror|thin|thin-pool|vdo|vdo-pool|cache|cache-pool|writecache")
val(alloc_VAL, alloc_arg, "Alloc", "contiguous|cling|cling_by_tags|normal|anywhere|inherit")
val(locktype_VAL, locktype_arg, "LockType", "sanlock|dlm|none")
val(readahead_VAL, readahead_arg, "Readahead", "auto|none|Number")
2 years, 8 months
main - libdm: use libdm header util.h
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=648188df2a9ba7528f6...
Commit: 648188df2a9ba7528f60a9362860d7615227061b
Parent: f1e8437c59882a71a9a6e005d188a12a35f0cf9b
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Mar 29 22:43:36 2021 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Mar 30 13:08:14 2021 +0200
libdm: use libdm header util.h
Avoid using lvm header for libdm build.
---
libdm/dm-tools/util.h | 41 +++++++++++++++++++++++++++++++++++++++++
libdm/misc/dmlib.h | 2 +-
2 files changed, 42 insertions(+), 1 deletion(-)
diff --git a/libdm/dm-tools/util.h b/libdm/dm-tools/util.h
index 730b90370..3925a7438 100644
--- a/libdm/dm-tools/util.h
+++ b/libdm/dm-tools/util.h
@@ -76,4 +76,45 @@
#define FMTVGID "%." DM_TO_STRING(ID_LEN) "s"
+/*
+ * GCC 3.4 adds a __builtin_clz, which uses the count leading zeros (clz)
+ * instruction on arches that have one. Provide a fallback using shifts
+ * and comparisons for older compilers.
+ */
+#ifdef HAVE___BUILTIN_CLZ
+#define clz(x) __builtin_clz((x))
+#else /* ifdef HAVE___BUILTIN_CLZ */
+static unsigned _dm_clz(unsigned x)
+{
+ int n;
+
+ if ((int)x <= 0) return (~x >> 26) & 32;
+
+ n = 1;
+
+ if ((x >> 16) == 0) {
+ n = n + 16;
+ x = x << 16;
+ }
+
+ if ((x >> 24) == 0) {
+ n = n + 8;
+ x = x << 8;
+ }
+
+ if ((x >> 28) == 0) {
+ n = n + 4;
+ x = x << 4;
+ }
+
+ if ((x >> 30) == 0) {
+ n = n + 2;
+ x = x << 2;
+ }
+ n = n - (x >> 31);
+ return n;
+}
+#define clz(x) _dm_clz((x))
+#endif /* ifdef HAVE___BUILTIN_CLZ */
+
#endif
diff --git a/libdm/misc/dmlib.h b/libdm/misc/dmlib.h
index 22328696b..85a22c50f 100644
--- a/libdm/misc/dmlib.h
+++ b/libdm/misc/dmlib.h
@@ -72,7 +72,7 @@
#define DM_EXPORT_SYMBOL_BASE(func)
#endif
-#include "lib/misc/util.h"
+#include "libdm/dm-tools/util.h"
#include "libdm/libdevmapper.h"
#include "libdm/misc/dm-logging.h"
2 years, 8 months
main - device_mapper: remove unused lines
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=f1e8437c59882a71a9a...
Commit: f1e8437c59882a71a9a6e005d188a12a35f0cf9b
Parent: 1cedbaf13778de02e38b5dc80a7af246b7ec83e5
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Mar 29 22:02:45 2021 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Mar 30 13:07:51 2021 +0200
device_mapper: remove unused lines
No need for versioning history in internal version.
---
device_mapper/datastruct/bitset.c | 15 -----------
device_mapper/ioctl/libdm-iface.c | 49 ----------------------------------
device_mapper/libdm-deptree.c | 55 ---------------------------------------
3 files changed, 119 deletions(-)
diff --git a/device_mapper/datastruct/bitset.c b/device_mapper/datastruct/bitset.c
index fc2c3c39c..c99927cc1 100644
--- a/device_mapper/datastruct/bitset.c
+++ b/device_mapper/datastruct/bitset.c
@@ -242,18 +242,3 @@ bad:
}
return NULL;
}
-
-#if defined(__GNUC__)
-/*
- * Maintain backward compatibility with older versions that did not
- * accept a 'min_num_bits' argument to dm_bitset_parse_list().
- */
-dm_bitset_t dm_bitset_parse_list_v1_02_129(const char *str, struct dm_pool *mem);
-dm_bitset_t dm_bitset_parse_list_v1_02_129(const char *str, struct dm_pool *mem)
-{
- return dm_bitset_parse_list(str, mem, 0);
-}
-
-#else /* if defined(__GNUC__) */
-
-#endif
diff --git a/device_mapper/ioctl/libdm-iface.c b/device_mapper/ioctl/libdm-iface.c
index 536e4b238..a2a56be45 100644
--- a/device_mapper/ioctl/libdm-iface.c
+++ b/device_mapper/ioctl/libdm-iface.c
@@ -2209,52 +2209,3 @@ void dm_lib_exit(void)
_version_ok = 1;
_version_checked = 0;
}
-
-#if defined(__GNUC__)
-/*
- * Maintain binary backward compatibility.
- * Version script mechanism works with 'gcc' compatible compilers only.
- */
-
-/*
- * This following code is here to retain ABI compatibility after adding
- * the field deferred_remove to struct dm_info in version 1.02.89.
- *
- * Binaries linked against version 1.02.88 of libdevmapper or earlier
- * will use this function that returns dm_info without the
- * deferred_remove field.
- *
- * Binaries compiled against version 1.02.89 onwards will use
- * the new function dm_task_get_info_with_deferred_remove due to the
- * #define.
- *
- * N.B. Keep this function at the end of the file to make sure that
- * no code in this file accidentally calls it.
- */
-
-int dm_task_get_info_base(struct dm_task *dmt, struct dm_info *info);
-int dm_task_get_info_base(struct dm_task *dmt, struct dm_info *info)
-{
- struct dm_info new_info;
-
- if (!dm_task_get_info(dmt, &new_info))
- return 0;
-
- memcpy(info, &new_info, offsetof(struct dm_info, deferred_remove));
-
- return 1;
-}
-
-int dm_task_get_info_with_deferred_remove(struct dm_task *dmt, struct dm_info *info);
-int dm_task_get_info_with_deferred_remove(struct dm_task *dmt, struct dm_info *info)
-{
- struct dm_info new_info;
-
- if (!dm_task_get_info(dmt, &new_info))
- return 0;
-
- memcpy(info, &new_info, offsetof(struct dm_info, internal_suspend));
-
- return 1;
-}
-#endif
diff --git a/device_mapper/libdm-deptree.c b/device_mapper/libdm-deptree.c
index ede75ef77..70acfb093 100644
--- a/device_mapper/libdm-deptree.c
+++ b/device_mapper/libdm-deptree.c
@@ -4328,61 +4328,6 @@ void dm_tree_node_set_callback(struct dm_tree_node *dnode,
dnode->callback_data = data;
}
-#if defined(__GNUC__)
-/*
- * Backward compatible implementations.
- *
- * Keep these at the end of the file to make sure that
- * no code in this file accidentally calls it.
- */
-
-/* Backward compatible dm_tree_node_size_changed() implementations. */
-int dm_tree_node_size_changed_base(const struct dm_tree_node *dnode);
-int dm_tree_node_size_changed_base(const struct dm_tree_node *dnode)
-{
- /* Base does not make difference between smaller and bigger */
- return dm_tree_node_size_changed(dnode) ? 1 : 0;
-}
-
-/*
- * Retain ABI compatibility after adding the DM_CACHE_FEATURE_METADATA2
- * in version 1.02.138.
- *
- * Binaries compiled against version 1.02.138 onwards will use
- * the new function dm_tree_node_add_cache_target which detects unknown
- * feature flags and returns error for them.
- */
-int dm_tree_node_add_cache_target_base(struct dm_tree_node *node,
- uint64_t size,
- uint64_t feature_flags, /* DM_CACHE_FEATURE_* */
- const char *metadata_uuid,
- const char *data_uuid,
- const char *origin_uuid,
- const char *policy_name,
- const struct dm_config_node *policy_settings,
- uint32_t data_block_size);
-int dm_tree_node_add_cache_target_base(struct dm_tree_node *node,
- uint64_t size,
- uint64_t feature_flags,
- const char *metadata_uuid,
- const char *data_uuid,
- const char *origin_uuid,
- const char *policy_name,
- const struct dm_config_node *policy_settings,
- uint32_t data_block_size)
-{
- /* Old version supported only these FEATURE bits, others were ignored so masked them */
- static const uint64_t _mask =
- DM_CACHE_FEATURE_WRITEBACK |
- DM_CACHE_FEATURE_WRITETHROUGH |
- DM_CACHE_FEATURE_PASSTHROUGH;
-
- return dm_tree_node_add_cache_target(node, size, feature_flags & _mask,
- metadata_uuid, data_uuid, origin_uuid,
- policy_name, policy_settings, 0, 0, 0, 0, data_block_size);
-}
-#endif
-
int dm_tree_node_add_vdo_target(struct dm_tree_node *node,
uint64_t size,
const char *vdo_pool_name,
2 years, 8 months
main - configure: support builds without versioning
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=1cedbaf13778de02e38...
Commit: 1cedbaf13778de02e38b5dc80a7af246b7ec83e5
Parent: 1a17a5ab80b1699ac086ad34852116e7728cc378
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Mar 29 21:46:12 2021 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Mar 30 13:06:19 2021 +0200
configure: support builds without versioning
Not all libc (like musl, uclibc dietlibc) libraries support full symbol
version resolution in runtime like glibc.
Add support to not generate symbol versions when compiling against them.
Additionally libdevmapper.so was broken when compiled against
uclibc. Runtime linker loader caused calling dm_task_get_info_base()
function recursively, leading to segmentation fault.
Introduce --with-symvers=STYLE option, which allows to choose
between gnu and disabled symbol versioning. By default gnu symbol
versioning is used.
__GNUC__ check is replaced now with GNU_SYMVER.
Additionally ld version script is included only in
case of gnu option, which slightly reduces output size.
Providing --without-symvers to configure script when building against
uclibc library fixes segmentation fault error described above, due to
lack of several versions of the same symbol in libdevmapper.so
library.
Based on:
https://patchwork.kernel.org/project/dm-devel/patch/20180831144817.31207-...
Suggested-by: Marcin Niestroj <m.niestroj(a)grinn-global.com>
---
WHATS_NEW | 1 +
configure | 35 ++++++++++++++++++++++++++++++++---
configure.ac | 26 +++++++++++++++++++++++---
include/configure.h.in | 3 +++
lib/misc/lib.h | 4 ++--
libdm/datastruct/bitset.c | 4 +---
libdm/ioctl/libdm-iface.c | 2 +-
libdm/libdm-deptree.c | 2 +-
libdm/libdm-stats.c | 2 +-
libdm/misc/dmlib.h | 4 ++--
10 files changed, 67 insertions(+), 16 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 3e086f951..c08864bae 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.03.12 -
===================================
+ Add configure option --with/out-symvers for non-glibc builds.
Report error when the filesystem is missing on fsadm resized volume.
Handle better blockdev with --getsize64 support for fsadm.
Do not include editline/history.h when using editline library.
diff --git a/configure b/configure
index ff363b046..9fe0c8ddf 100755
--- a/configure
+++ b/configure
@@ -934,6 +934,7 @@ enable_cmirrord
with_cmirrord_pidfile
enable_debug
with_optimisation
+with_symvers
enable_profiling
enable_valgrind_pool
enable_devmapper
@@ -1749,6 +1750,8 @@ Optional Packages:
--with-cmirrord-pidfile=PATH
cmirrord pidfile [PID_DIR/cmirrord.pid]
--with-optimisation=OPT C optimisation flag [OPT=-O2]
+ --with-symvers=STYLE use symbol versioning of the shared library
+ [default=gnu]
--with-lvmlockd-pidfile=PATH
lvmlockd pidfile [PID_DIR/lvmlockd.pid]
--with-lvmpolld-pidfile=PATH
@@ -3103,13 +3106,11 @@ if test -z "$CFLAGS"; then :
fi
case "$host_os" in
linux*)
- CLDFLAGS="${CLDFLAGS-"$LDFLAGS"} -Wl,--version-script,.export.sym"
# equivalent to -rdynamic
ELDFLAGS="-Wl,--export-dynamic"
# FIXME Generate list and use --dynamic-list=.dlopen.sym
CLDWHOLEARCHIVE="-Wl,-whole-archive"
CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive"
- LDDEPS="$LDDEPS .export.sym"
LIB_SUFFIX=so
DEVMAPPER=yes
BUILD_LVMPOLLD=no
@@ -3124,7 +3125,6 @@ case "$host_os" in
;;
darwin*)
CFLAGS="$CFLAGS -no-cpp-precomp -fno-common"
- CLDFLAGS="${CLDFLAGS-"$LDFLAGS"}"
ELDFLAGS=
CLDWHOLEARCHIVE="-all_load"
CLDNOWHOLEARCHIVE=
@@ -10393,6 +10393,35 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COPTIMISE_FLAG" >&5
$as_echo "$COPTIMISE_FLAG" >&6; }
+################################################################################
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use symbol versioning" >&5
+$as_echo_n "checking whether to use symbol versioning... " >&6; }
+
+# Check whether --with-symvers was given.
+if test "${with_symvers+set}" = set; then :
+ withval=$with_symvers; case "$withval" in
+ gnu|no) symvers=$withval ;;
+ *) as_fn_error $? "Unknown argument to with-symvers" "$LINENO" 5 ;;
+ esac
+else
+ symvers=gnu
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $symvers" >&5
+$as_echo "$symvers" >&6; }
+
+if test "$GCC" = "yes" && test "$symvers" = "gnu" ; then
+
+$as_echo "#define GNU_SYMVER 1" >>confdefs.h
+
+ case "$host_os" in
+ linux*)
+ CLDFLAGS="${CLDFLAGS-"$LDFLAGS"} -Wl,--version-script,.export.sym"
+ LDDEPS="$LDDEPS .export.sym"
+ ;;
+ esac
+fi
+
################################################################################
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to gather gcov profiling data" >&5
$as_echo_n "checking whether to gather gcov profiling data... " >&6; }
diff --git a/configure.ac b/configure.ac
index b92be0db3..21a1d311e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -30,13 +30,11 @@ AC_CANONICAL_TARGET([])
AS_IF([test -z "$CFLAGS"], [COPTIMISE_FLAG="-O2"])
case "$host_os" in
linux*)
- CLDFLAGS="${CLDFLAGS-"$LDFLAGS"} -Wl,--version-script,.export.sym"
# equivalent to -rdynamic
ELDFLAGS="-Wl,--export-dynamic"
# FIXME Generate list and use --dynamic-list=.dlopen.sym
CLDWHOLEARCHIVE="-Wl,-whole-archive"
CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive"
- LDDEPS="$LDDEPS .export.sym"
LIB_SUFFIX=so
DEVMAPPER=yes
BUILD_LVMPOLLD=no
@@ -51,7 +49,6 @@ case "$host_os" in
;;
darwin*)
CFLAGS="$CFLAGS -no-cpp-precomp -fno-common"
- CLDFLAGS="${CLDFLAGS-"$LDFLAGS"}"
ELDFLAGS=
CLDWHOLEARCHIVE="-all_load"
CLDNOWHOLEARCHIVE=
@@ -825,6 +822,29 @@ AC_ARG_WITH(optimisation,
COPTIMISE_FLAG=$withval)
AC_MSG_RESULT($COPTIMISE_FLAG)
+################################################################################
+dnl -- Symbol versioning
+AC_MSG_CHECKING(whether to use symbol versioning)
+AC_ARG_WITH(symvers,
+ AC_HELP_STRING([--with-symvers=STYLE],
+ [use symbol versioning of the shared library [default=gnu]]),
+ [ case "$withval" in
+ gnu|no) symvers=$withval ;;
+ *) AC_MSG_ERROR(Unknown argument to with-symvers) ;;
+ esac], symvers=gnu)
+AC_MSG_RESULT($symvers)
+
+if test "$GCC" = "yes" && test "$symvers" = "gnu" ; then
+ AC_DEFINE(GNU_SYMVER, 1,
+ [Define to use GNU versioning in the shared library.])
+ case "$host_os" in
+ linux*)
+ CLDFLAGS="${CLDFLAGS-"$LDFLAGS"} -Wl,--version-script,.export.sym"
+ LDDEPS="$LDDEPS .export.sym"
+ ;;
+ esac
+fi
+
################################################################################
dnl -- Enable profiling
AC_MSG_CHECKING(whether to gather gcov profiling data)
diff --git a/include/configure.h.in b/include/configure.h.in
index b8d95833a..671d201b2 100644
--- a/include/configure.h.in
+++ b/include/configure.h.in
@@ -132,6 +132,9 @@
/* Path to fsadm binary. */
#undef FSADM_PATH
+/* Define to use GNU versioning in the shared library. */
+#undef GNU_SYMVER
+
/* Define to 1 if you have the `alarm' function. */
#undef HAVE_ALARM
diff --git a/lib/misc/lib.h b/lib/misc/lib.h
index c14f437a0..a4d109fb4 100644
--- a/lib/misc/lib.h
+++ b/lib/misc/lib.h
@@ -37,7 +37,7 @@
* specified version string.
*
* Since versioning is only available when compiling with GCC the entire
- * compatibility version should be enclosed in '#if defined(__GNUC__)',
+ * compatibility version should be enclosed in '#if defined(GNU_SYMVER)',
* for example:
*
* int dm_foo(int bar)
@@ -62,7 +62,7 @@
* versions of library symbols prior to the introduction of symbol
* versioning: it must never be used for new symbols.
*/
-#if defined(__GNUC__)
+#if defined(GNU_SYMVER)
#define DM_EXPORT_SYMBOL(func, ver) \
__asm__(".symver " #func "_v" #ver ", " #func "@DM_" #ver )
#define DM_EXPORT_SYMBOL_BASE(func) \
diff --git a/libdm/datastruct/bitset.c b/libdm/datastruct/bitset.c
index 06bd31a9d..8f36ec715 100644
--- a/libdm/datastruct/bitset.c
+++ b/libdm/datastruct/bitset.c
@@ -242,7 +242,7 @@ bad:
return NULL;
}
-#if defined(__GNUC__)
+#if defined(GNU_SYMVER)
/*
* Maintain backward compatibility with older versions that did not
* accept a 'min_num_bits' argument to dm_bitset_parse_list().
@@ -254,6 +254,4 @@ dm_bitset_t dm_bitset_parse_list_v1_02_129(const char *str, struct dm_pool *mem)
}
DM_EXPORT_SYMBOL(dm_bitset_parse_list, 1_02_129);
-#else /* if defined(__GNUC__) */
-
#endif
diff --git a/libdm/ioctl/libdm-iface.c b/libdm/ioctl/libdm-iface.c
index f35ddeb07..e459db88d 100644
--- a/libdm/ioctl/libdm-iface.c
+++ b/libdm/ioctl/libdm-iface.c
@@ -2188,7 +2188,7 @@ void dm_lib_exit(void)
_version_checked = 0;
}
-#if defined(__GNUC__)
+#if defined(GNU_SYMVER)
/*
* Maintain binary backward compatibility.
* Version script mechanism works with 'gcc' compatible compilers only.
diff --git a/libdm/libdm-deptree.c b/libdm/libdm-deptree.c
index bf027ee81..e4cb6e5c0 100644
--- a/libdm/libdm-deptree.c
+++ b/libdm/libdm-deptree.c
@@ -3849,7 +3849,7 @@ void dm_tree_node_set_callback(struct dm_tree_node *dnode,
dnode->callback_data = data;
}
-#if defined(__GNUC__)
+#if defined(GNU_SYMVER)
/*
* Backward compatible implementations.
*
diff --git a/libdm/libdm-stats.c b/libdm/libdm-stats.c
index f8d79d807..49d06802e 100644
--- a/libdm/libdm-stats.c
+++ b/libdm/libdm-stats.c
@@ -5069,7 +5069,7 @@ int dm_stats_start_filemapd(int fd, uint64_t group_id, const char *path,
* current dm_stats_create_region() version.
*/
-#if defined(__GNUC__)
+#if defined(GNU_SYMVER)
int dm_stats_create_region_v1_02_106(struct dm_stats *dms, uint64_t *region_id,
uint64_t start, uint64_t len, int64_t step,
int precise, const char *program_id,
diff --git a/libdm/misc/dmlib.h b/libdm/misc/dmlib.h
index 2ea05c1fa..22328696b 100644
--- a/libdm/misc/dmlib.h
+++ b/libdm/misc/dmlib.h
@@ -37,7 +37,7 @@
* specified version string.
*
* Since versioning is only available when compiling with GCC the entire
- * compatibility version should be enclosed in '#if defined(__GNUC__)',
+ * compatibility version should be enclosed in '#if defined(GNU_SYMVER)',
* for example:
*
* int dm_foo(int bar)
@@ -62,7 +62,7 @@
* versions of library symbols prior to the introduction of symbol
* versioning: it must never be used for new symbols.
*/
-#if defined(__GNUC__)
+#if defined(GNU_SYMVER)
#define DM_EXPORT_SYMBOL(func, ver) \
__asm__(".symver " #func "_v" #ver ", " #func "@DM_" #ver )
#define DM_EXPORT_SYMBOL_BASE(func) \
2 years, 8 months
main - tests: sleep tunning
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=1a17a5ab80b1699ac08...
Commit: 1a17a5ab80b1699ac086ad34852116e7728cc378
Parent: d9b97510324e7c16cf8ec61f511b6f5d71bff767
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sun Mar 28 12:18:40 2021 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Sun Mar 28 14:22:11 2021 +0200
tests: sleep tunning
Check different sleep properties for lvmpolld.
Use aux remove_dm_devs.
---
test/shell/pvcreate-md-fake-hdr.sh | 3 +--
test/shell/pvmove-resume-1.sh | 21 ++++-----------------
test/shell/pvmove-resume-2.sh | 22 ++++------------------
test/shell/pvmove-resume-multiseg.sh | 22 +++++++---------------
4 files changed, 16 insertions(+), 52 deletions(-)
diff --git a/test/shell/pvcreate-md-fake-hdr.sh b/test/shell/pvcreate-md-fake-hdr.sh
index 73846ed71..f610d6fb3 100644
--- a/test/shell/pvcreate-md-fake-hdr.sh
+++ b/test/shell/pvcreate-md-fake-hdr.sh
@@ -49,12 +49,11 @@ dd if="$dev3" of="$dev2" bs=64k count=1 conv=fdatasync
# remove VG on PV3 & PV4
vgremove -f $vg
-sleep 3
aux udev_wait
# too bad 'dd' wakes up md array reassembling
mdadm --detail "$mddev" || true
mdadm --stop "$mddev" || true
-sleep 3
+sleep 1
# print what blkid thinks about each PV
for i in "$dev1" "$dev2" "$dev3" "$dev4"
diff --git a/test/shell/pvmove-resume-1.sh b/test/shell/pvmove-resume-1.sh
index 7b9fc0f39..00a8f2dcd 100644
--- a/test/shell/pvmove-resume-1.sh
+++ b/test/shell/pvmove-resume-1.sh
@@ -20,7 +20,8 @@ SKIP_WITH_CLVMD=1
. lib/inittest
-aux throttle_dm_mirror 50 || :
+test -e LOCAL_LVMPOLLD && aux throttle_dm_mirror 20 || :
+
aux prepare_pvs 4 30
vgcreate -s 128k $vg "$dev1"
@@ -49,24 +50,10 @@ test_pvmove_resume() {
aux wait_pvmove_lv_ready "$vg1-pvmove0" 300
kill -9 $PVMOVE
- if test -e LOCAL_LVMPOLLD ; then
- aux prepare_lvmpolld
- fi
-
+ aux remove_dm_devs "$vg-$lv1" "$vg1-$lv1" "$vg-pvmove0" "$vg1-pvmove0"
+ test -e LOCAL_LVMPOLLD && aux prepare_lvmpolld
wait
- local finished
- for i in {1..100}; do
- finished=1
- for d in "$vg-$lv1" "$vg1-$lv1" "$vg-pvmove0" "$vg1-pvmove0" ; do
- dmsetup status "$d" 2>/dev/null && {
- dmsetup remove "$d" || finished=0
- }
- done
- test "$finished" -eq 0 || break
- done
- test "$finished" -eq 0 && die "Can't remove device"
-
check lv_attr_bit type $vg/pvmove0 "p"
check lv_attr_bit type $vg1/pvmove0 "p"
diff --git a/test/shell/pvmove-resume-2.sh b/test/shell/pvmove-resume-2.sh
index 92b0070c0..233aec3c1 100644
--- a/test/shell/pvmove-resume-2.sh
+++ b/test/shell/pvmove-resume-2.sh
@@ -20,14 +20,14 @@ SKIP_WITH_CLVMD=1
. lib/inittest
+test -e LOCAL_LVMPOLLD && aux throttle_dm_mirror 20 || :
+
aux prepare_pvs 2 30
vgcreate -s 128k $vg "$dev1"
pvcreate --metadatacopies 0 "$dev2"
vgextend $vg "$dev2"
-aux throttle_dm_mirror 50 || :
-
test_pvmove_resume() {
# 2 LVs on same device
lvcreate -an -Zn -l15 -n $lv1 $vg "$dev1"
@@ -40,24 +40,10 @@ test_pvmove_resume() {
aux wait_pvmove_lv_ready "$vg-pvmove0" 300
kill -9 $PVMOVE
- if test -e LOCAL_LVMPOLLD ; then
- aux prepare_lvmpolld
- fi
-
+ aux remove_dm_devs "$vg-$lv1" "$vg-$lv2" "$vg-pvmove0"
+ test -e LOCAL_LVMPOLLD && aux prepare_lvmpolld
wait
- local finished
- for i in {1..100}; do
- finished=1
- for d in "$vg-$lv1" "$vg-$lv2" "$vg-pvmove0" ; do
- dmsetup status "$d" 2>/dev/null && {
- dmsetup remove "$d" || finished=0
- }
- done
- test "$finished" -eq 0 || break
- done
- test "$finished" -eq 0 && die "Can't remove device"
-
check lv_attr_bit type $vg/pvmove0 "p"
if test -e LOCAL_CLVMD ; then
diff --git a/test/shell/pvmove-resume-multiseg.sh b/test/shell/pvmove-resume-multiseg.sh
index cdb426b66..73c7cf354 100644
--- a/test/shell/pvmove-resume-multiseg.sh
+++ b/test/shell/pvmove-resume-multiseg.sh
@@ -19,8 +19,9 @@ SKIP_WITH_LVMLOCKD=1
. lib/inittest
+test -e LOCAL_LVMPOLLD && aux throttle_dm_mirror 20 || :
+
aux prepare_pvs 5 40
-aux throttle_dm_mirror 60 || :
vgcreate -s 128k $vg "$dev1" "$dev2" "$dev3"
pvcreate --metadatacopies 0 "$dev4" "$dev5"
@@ -48,15 +49,8 @@ test_pvmove_resume() {
aux wait_pvmove_lv_ready "$vg-pvmove1" 300
kill -9 $PVMOVE
- while dmsetup status "$vg-$lv1"; do dmsetup remove "$vg-$lv1" || true; done
- while dmsetup status "$vg-$lv2"; do dmsetup remove "$vg-$lv2" || true; done
- while dmsetup status "$vg-pvmove0"; do dmsetup remove "$vg-pvmove0" || true; done
- while dmsetup status "$vg-pvmove1"; do dmsetup remove "$vg-pvmove1" || true; done
-
- if test -e LOCAL_LVMPOLLD ; then
- aux prepare_lvmpolld
- fi
-
+ aux remove_dm_devs "$vg-$lv1" "$vg-$lv2" "$vg-pvmove0" "$vg-pvmove1"
+ test -e LOCAL_LVMPOLLD && aux prepare_lvmpolld
wait
check lv_attr_bit type $vg/pvmove0 "p"
@@ -90,13 +84,11 @@ test_pvmove_resume() {
aux enable_dev "$dev4"
aux enable_dev "$dev5"
- i=0
- while get lv_field $vg name -a | grep -E "^\[?pvmove"; do
- # wait for 30 secs at max
- test $i -ge 300 && die "Pvmove is too slow or does not progress."
+ for i in {0..300} ; do # wait for 30 secs at max
+ get lv_field $vg name -a | grep -E "^\[?pvmove" || break
sleep .1
- i=$((i + 1))
done
+ test $i -ge 300 && die "Pvmove is too slow or does not progress."
aux kill_tagged_processes
2 years, 8 months
main - tests: add aux remove_dm_devs
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=d9b97510324e7c16cf8...
Commit: d9b97510324e7c16cf8ec61f511b6f5d71bff767
Parent: 0ddbc4c5cdbef0cc57b79c164b22b34c0bc6a27a
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sun Mar 28 13:29:44 2021 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Sun Mar 28 14:22:11 2021 +0200
tests: add aux remove_dm_devs
Add function to remove DM devices and dies
if some device can't be removed.
---
test/lib/aux.sh | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index 38191842d..6177de4d4 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -1110,6 +1110,28 @@ enable_dev() {
finish_udev_transaction
}
+# Try to remove list of DM device from table
+remove_dm_devs() {
+ local remove=( "$@" )
+ local held
+ local i
+
+ for i in {1..50}; do
+ held=()
+ for d in "${remove[@]}" ; do
+ dmsetup remove "$d" 2>/dev/null || {
+ dmsetup info -c "$d" 2>/dev/null && {
+ held+=( "$d" )
+ dmsetup status "$d"
+ }
+ }
+ done
+ test ${#held[@]} -eq 0 && return
+ remove=( "${held[@]}" )
+ done
+ die "Can't remove device(s) ${held[@]}"
+}
+
# Throttle down performance of kcopyd when mirroring i.e. disk image
throttle_sys="/sys/module/dm_mirror/parameters/raid1_resync_throttle"
throttle_dm_mirror() {
2 years, 8 months
main - tests: bash quotes
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=0ddbc4c5cdbef0cc57b...
Commit: 0ddbc4c5cdbef0cc57b79c164b22b34c0bc6a27a
Parent: 8a550fa3e8747fe01517c1c4c1d81e9406d000ea
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sun Mar 28 01:09:42 2021 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Sun Mar 28 11:39:58 2021 +0200
tests: bash quotes
---
test/shell/devicesfile-basic.sh | 637 ++++++++++++++++++------------------
test/shell/devicesfile-devname.sh | 570 ++++++++++++++++----------------
test/shell/hints.sh | 4 +-
test/shell/lvconvert-repair-raid.sh | 2 +-
test/shell/lvdisplay-raid.sh | 39 ++-
test/shell/pvscan-autoactivate.sh | 5 +-
6 files changed, 627 insertions(+), 630 deletions(-)
diff --git a/test/shell/devicesfile-basic.sh b/test/shell/devicesfile-basic.sh
index 352f75575..8ad96e37d 100644
--- a/test/shell/devicesfile-basic.sh
+++ b/test/shell/devicesfile-basic.sh
@@ -43,8 +43,8 @@ wipe_all() {
# The tests run with system dir of "/etc" but lvm when running
# normally has cmd->system_dir set to "/etc/lvm".
DFDIR="$LVM_SYSTEM_DIR/devices"
-mkdir -p $DFDIR || true
-DF=$DFDIR/system.devices
+mkdir -p "$DFDIR" || true
+DF="$DFDIR/system.devices"
#
# Test with use_devicesfile=0 (no devices file is being applied by default)
@@ -53,268 +53,268 @@ DF=$DFDIR/system.devices
aux lvmconf 'devices/use_devicesfile = 0'
wipe_all
-rm -f $DF
-pvcreate $dev1
-not ls $DF
+rm -f "$DF"
+pvcreate "$dev1"
+not ls "$DF"
wipe_all
-rm -f $DF
-vgcreate $vg1 $dev1
-not ls $DF
+rm -f "$DF"
+vgcreate $vg1 "$dev1"
+not ls "$DF"
wipe_all
-rm -f $DF
+rm -f "$DF"
# create one VG in a non-system devices file
-vgcreate --devicesfile test.devices $vg1 $dev1
-vgextend --devicesfile test.devices $vg1 $dev2
-cat $DFDIR/test.devices
-grep $dev1 $DFDIR/test.devices
-grep $dev2 $DFDIR/test.devices
-not ls $DFDIR/system.devices
+vgcreate --devicesfile test.devices $vg1 "$dev1"
+vgextend --devicesfile test.devices $vg1 "$dev2"
+cat "$DFDIR/test.devices"
+grep "$dev1" "$DFDIR/test.devices"
+grep "$dev2" "$DFDIR/test.devices"
+not ls "$DFDIR/system.devices"
# create two VGs outside the special devices file
-vgcreate $vg2 $dev3 $dev4
-vgcreate $vg3 $dev5 $dev6
-not grep $dev3 $DFDIR/test.devices
-not grep $dev5 $DFDIR/test.devices
-not ls $DFDIR/system.devices
-
-PVID1=`pvs $dev1 --noheading -o uuid | tr -d - | awk '{print $1}'`
-PVID2=`pvs $dev2 --noheading -o uuid | tr -d - | awk '{print $1}'`
-PVID3=`pvs $dev3 --noheading -o uuid | tr -d - | awk '{print $1}'`
-PVID4=`pvs $dev4 --noheading -o uuid | tr -d - | awk '{print $1}'`
-PVID5=`pvs $dev5 --noheading -o uuid | tr -d - | awk '{print $1}'`
-PVID6=`pvs $dev6 --noheading -o uuid | tr -d - | awk '{print $1}'`
+vgcreate $vg2 "$dev3" "$dev4"
+vgcreate $vg3 "$dev5" "$dev6"
+not grep "$dev3" "$DFDIR/test.devices"
+not grep "$dev5" "$DFDIR/test.devices"
+not ls "$DFDIR/system.devices"
+
+PVID1=`pvs "$dev1" --noheading -o uuid | tr -d - | awk '{print $1}'`
+PVID2=`pvs "$dev2" --noheading -o uuid | tr -d - | awk '{print $1}'`
+PVID3=`pvs "$dev3" --noheading -o uuid | tr -d - | awk '{print $1}'`
+PVID4=`pvs "$dev4" --noheading -o uuid | tr -d - | awk '{print $1}'`
+PVID5=`pvs "$dev5" --noheading -o uuid | tr -d - | awk '{print $1}'`
+PVID6=`pvs "$dev6" --noheading -o uuid | tr -d - | awk '{print $1}'`
lvcreate -l4 -an -i2 -n $lv1 $vg1
lvcreate -l4 -an -i2 -n $lv2 $vg2
lvcreate -l4 -an -i2 -n $lv3 $vg3
-cat $DFDIR/test.devices
-grep $PVID1 $DFDIR/test.devices
-grep $PVID2 $DFDIR/test.devices
-not grep $PVID3 $DFDIR/test.devices
-not grep $PVID4 $DFDIR/test.devices
-not grep $PVID5 $DFDIR/test.devices
-not grep $PVID6 $DFDIR/test.devices
-not ls $DFDIR/system.devices
+cat "$DFDIR/test.devices"
+grep "$PVID1" "$DFDIR/test.devices"
+grep "$PVID2" "$DFDIR/test.devices"
+not grep "$PVID3" "$DFDIR/test.devices"
+not grep "$PVID4" "$DFDIR/test.devices"
+not grep "$PVID5" "$DFDIR/test.devices"
+not grep "$PVID6" "$DFDIR/test.devices"
+not ls "$DFDIR/system.devices"
# verify devices file is working
vgs --devicesfile test.devices $vg1
not vgs --devicesfile test.devices $vg2
# devicesfile and devices cannot be used together
-not vgs --devicesfile test.devices --devices $dev1,$dev1 $vg1
+not vgs --devicesfile test.devices --devices "$dev1","$dev1" $vg1
# verify correct vgs are seen / not seen when devices are specified
-vgs --devices $dev1,$dev2 $vg1
-vgs --devices $dev3,$dev4 $vg2
-vgs --devices $dev5,$dev6 $vg3
-not vgs --devices $dev1,$dev2 $vg2
-not vgs --devices $dev1,$dev2 $vg3
-not vgs --devices $dev1,$dev2 $vg2
-not vgs --devices $dev5,$dev6 $vg2
-not vgs --devices $dev1,$dev2 $vg3
-not vgs --devices $dev3,$dev4 $vg3
-
-vgs --devices $dev1,$dev2 |tee out
+vgs --devices "$dev1","$dev2" $vg1
+vgs --devices "$dev3","$dev4" $vg2
+vgs --devices "$dev5","$dev6" $vg3
+not vgs --devices "$dev1","$dev2" $vg2
+not vgs --devices "$dev1","$dev2" $vg3
+not vgs --devices "$dev1","$dev2" $vg2
+not vgs --devices "$dev5","$dev6" $vg2
+not vgs --devices "$dev1","$dev2" $vg3
+not vgs --devices "$dev3","$dev4" $vg3
+
+vgs --devices "$dev1","$dev2" |tee out
grep $vg1 out
not grep $vg2 out
not grep $vg3 out
-vgs --devices $dev3,$dev4 |tee out
+vgs --devices "$dev3","$dev4" |tee out
not grep $vg1 out
grep $vg2 out
not grep $vg3 out
# verify correct pvs are seen / not seen when devices are specified
-pvs --devices $dev1,$dev2 $dev1 $dev2
-pvs --devices $dev3,$dev4 $dev3 $dev4
-pvs --devices $dev5,$dev6 $dev5 $dev6
-not pvs --devices $dev1,$dev2 $dev3 $dev4
-not pvs --devices $dev1,$dev2 $dev5 $dev6
-not pvs --devices $dev3,$dev4 $dev1 $dev2 $dev5 $dev6
-
-pvs --devices $dev1,$dev2 |tee out
-grep $dev1 out
-grep $dev2 out
-not grep $dev3 out
-not grep $dev4 out
-not grep $dev5 out
-not grep $dev6 out
-pvs --devices $dev3,$dev4 |tee out
-not grep $dev1 out
-not grep $dev2 out
-grep $dev3 out
-grep $dev4 out
-not grep $dev5 out
-not grep $dev6 out
+pvs --devices "$dev1","$dev2" "$dev1" "$dev2"
+pvs --devices "$dev3","$dev4" "$dev3" "$dev4"
+pvs --devices "$dev5","$dev6" "$dev5" "$dev6"
+not pvs --devices "$dev1","$dev2" "$dev3" "$dev4"
+not pvs --devices "$dev1","$dev2" "$dev5" "$dev6"
+not pvs --devices "$dev3","$dev4" "$dev1" "$dev2" "$dev5" "$dev6"
+
+pvs --devices "$dev1","$dev2" |tee out
+grep "$dev1" out
+grep "$dev2" out
+not grep "$dev3" out
+not grep "$dev4" out
+not grep "$dev5" out
+not grep "$dev6" out
+pvs --devices "$dev3","$dev4" |tee out
+not grep "$dev1" out
+not grep "$dev2" out
+grep "$dev3" out
+grep "$dev4" out
+not grep "$dev5" out
+not grep "$dev6" out
# verify correct lvs are activated / not activated when devices are specified
-vgchange --devices $dev1,$dev2 -ay
+vgchange --devices "$dev1","$dev2" -ay
check lv_field $vg1/$lv1 lv_active "active"
check lv_field $vg2/$lv2 lv_active ""
check lv_field $vg3/$lv3 lv_active ""
-vgchange --devices $dev1,$dev2 -an
+vgchange --devices "$dev1","$dev2" -an
check lv_field $vg1/$lv1 lv_active ""
-vgchange --devices $dev3,$dev4 -ay
+vgchange --devices "$dev3","$dev4" -ay
check lv_field $vg1/$lv1 lv_active ""
check lv_field $vg2/$lv2 lv_active "active"
check lv_field $vg3/$lv3 lv_active ""
-vgchange --devices $dev3,$dev4 -an
+vgchange --devices "$dev3","$dev4" -an
check lv_field $vg2/$lv2 lv_active ""
# verify devices covering multiple vgs
-vgs --devices $dev1,$dev2,$dev3,$dev4 $vg1 $vg2 |tee out
+vgs --devices "$dev1","$dev2","$dev3","$dev4" $vg1 $vg2 |tee out
grep $vg1 out
grep $vg2 out
not grep $vg3 out
-vgs --devices $dev1,$dev2,$dev3,$dev4,$dev5,$dev6 $vg1 $vg2 $vg3 |tee out
+vgs --devices "$dev1","$dev2","$dev3","$dev4","$dev5","$dev6" $vg1 $vg2 $vg3 |tee out
grep $vg1 out
grep $vg2 out
grep $vg3 out
# verify vgs seen when incomplete devices are specified
-vgs --devices $dev1 $vg1
-vgs --devices $dev3 $vg2
-vgs --devices $dev5 $vg3
+vgs --devices "$dev1" $vg1
+vgs --devices "$dev3" $vg2
+vgs --devices "$dev5" $vg3
# incomplete vg because of --devices is the same as vg incomplete because
# of missing device
-not lvcreate --devices $dev1 -l1 $vg1
-not lvchange --devices $dev1 -ay $vg1/$lv1
-not lvextend --devices $dev1 -l+1 $vg1/$lv1
-not vgremove --devices $dev1 $vg1
-not lvcreate --devices $dev3 -l1 $vg2
-not lvchange --devices $dev3 -ay $vg2/$lv2
-not lvextend --devices $dev3 -l+1 $vg2/$lv2
-not vgremove --devices $dev3 $vg2
+not lvcreate --devices "$dev1" -l1 $vg1
+not lvchange --devices "$dev1" -ay $vg1/$lv1
+not lvextend --devices "$dev1" -l+1 $vg1/$lv1
+not vgremove --devices "$dev1" $vg1
+not lvcreate --devices "$dev3" -l1 $vg2
+not lvchange --devices "$dev3" -ay $vg2/$lv2
+not lvextend --devices "$dev3" -l+1 $vg2/$lv2
+not vgremove --devices "$dev3" $vg2
# verify various commands with --devices for vg in a devicesfile
-not lvcreate --devices $dev1,$dev2 -l1 -n $lv2 -an $vg1 $dev7
-lvcreate --devices $dev1,$dev2 -l1 -n $lv2 -an $vg1
-lvs --devices $dev1,$dev2 $vg1/$lv2
-lvextend --devices $dev1,$dev2 -l2 $vg1/$lv2
-lvchange --devices $dev1,$dev2 -ay $vg1/$lv2
-lvchange --devices $dev1,$dev2 -an $vg1/$lv2
-lvremove --devices $dev1,$dev2 $vg1/$lv2
-vgchange --devices $dev1,$dev2 -ay $vg1
-vgchange --devices $dev1,$dev2 -an $vg1
-not vgextend --devices $dev1,$dev2 $vg1 $dev7
-vgextend --devices $dev1,$dev2,$dev7 $vg1 $dev7
-vgreduce --devices $dev1,$dev2,$dev7 $vg1 $dev7
-vgexport --devices $dev1,$dev2 $vg1
-vgimport --devices $dev1,$dev2 $vg1
-not pvremove --devices $dev1,$dev2 $dev7
-not pvcreate --devices $dev1,$dev2 $dev7
-not vgcreate --devices $dev1,$dev2 $vg7 $dev7
-pvremove --devices $dev7 $dev7
-pvcreate --devices $dev7 $dev7
-vgcreate --devices $dev7 $vg7 $dev7
-vgremove --devices $dev7 $vg7
-pvremove --devices $dev7 $dev7
+not lvcreate --devices "$dev1","$dev2" -l1 -n $lv2 -an $vg1 "$dev7"
+lvcreate --devices "$dev1","$dev2" -l1 -n $lv2 -an $vg1
+lvs --devices "$dev1","$dev2" $vg1/$lv2
+lvextend --devices "$dev1","$dev2" -l2 $vg1/$lv2
+lvchange --devices "$dev1","$dev2" -ay $vg1/$lv2
+lvchange --devices "$dev1","$dev2" -an $vg1/$lv2
+lvremove --devices "$dev1","$dev2" $vg1/$lv2
+vgchange --devices "$dev1","$dev2" -ay $vg1
+vgchange --devices "$dev1","$dev2" -an $vg1
+not vgextend --devices "$dev1","$dev2" $vg1 "$dev7"
+vgextend --devices "$dev1","$dev2","$dev7" $vg1 "$dev7"
+vgreduce --devices "$dev1","$dev2","$dev7" $vg1 "$dev7"
+vgexport --devices "$dev1","$dev2" $vg1
+vgimport --devices "$dev1","$dev2" $vg1
+not pvremove --devices "$dev1","$dev2" "$dev7"
+not pvcreate --devices "$dev1","$dev2" "$dev7"
+not vgcreate --devices "$dev1","$dev2" $vg7 "$dev7"
+pvremove --devices "$dev7" "$dev7"
+pvcreate --devices "$dev7" "$dev7"
+vgcreate --devices "$dev7" $vg7 "$dev7"
+vgremove --devices "$dev7" $vg7
+pvremove --devices "$dev7" "$dev7"
# verify various commands with --devices for vg not in a devicesfile
-not lvcreate --devices $dev3,$dev4 -l1 -n $lv4 -an $vg2 $dev7
-lvcreate --devices $dev3,$dev4 -l1 -n $lv4 -an $vg2
-lvs --devices $dev3,$dev4 $vg2/$lv4
-lvextend --devices $dev3,$dev4 -l2 $vg2/$lv4
-lvchange --devices $dev3,$dev4 -ay $vg2/$lv4
-lvchange --devices $dev3,$dev4 -an $vg2/$lv4
-lvremove --devices $dev3,$dev4 $vg2/$lv4
-vgchange --devices $dev3,$dev4 -ay $vg2
-vgchange --devices $dev3,$dev4 -an $vg2
-not vgextend --devices $dev3,$dev4 $vg2 $dev7
-vgextend --devices $dev3,$dev4,$dev7 $vg2 $dev7
-vgreduce --devices $dev3,$dev4,$dev7 $vg2 $dev7
-vgexport --devices $dev3,$dev4 $vg2
-vgimport --devices $dev3,$dev4 $vg2
-not pvremove --devices $dev3,$dev4 $dev7
-not pvcreate --devices $dev3,$dev4 $dev7
-not vgcreate --devices $dev3,$dev4 $vg7 $dev7
-pvremove --devices $dev7 $dev7
-pvcreate --devices $dev7 $dev7
-vgcreate --devices $dev7 $vg7 $dev7
-vgremove --devices $dev7 $vg7
-pvremove --devices $dev7 $dev7
+not lvcreate --devices "$dev3","$dev4" -l1 -n $lv4 -an $vg2 "$dev7"
+lvcreate --devices "$dev3","$dev4" -l1 -n $lv4 -an $vg2
+lvs --devices "$dev3","$dev4" $vg2/$lv4
+lvextend --devices "$dev3","$dev4" -l2 $vg2/$lv4
+lvchange --devices "$dev3","$dev4" -ay $vg2/$lv4
+lvchange --devices "$dev3","$dev4" -an $vg2/$lv4
+lvremove --devices "$dev3","$dev4" $vg2/$lv4
+vgchange --devices "$dev3","$dev4" -ay $vg2
+vgchange --devices "$dev3","$dev4" -an $vg2
+not vgextend --devices "$dev3","$dev4" $vg2 "$dev7"
+vgextend --devices "$dev3","$dev4","$dev7" $vg2 "$dev7"
+vgreduce --devices "$dev3","$dev4","$dev7" $vg2 "$dev7"
+vgexport --devices "$dev3","$dev4" $vg2
+vgimport --devices "$dev3","$dev4" $vg2
+not pvremove --devices "$dev3","$dev4" "$dev7"
+not pvcreate --devices "$dev3","$dev4" "$dev7"
+not vgcreate --devices "$dev3","$dev4" $vg7 "$dev7"
+pvremove --devices "$dev7" "$dev7"
+pvcreate --devices "$dev7" "$dev7"
+vgcreate --devices "$dev7" $vg7 "$dev7"
+vgremove --devices "$dev7" $vg7
+pvremove --devices "$dev7" "$dev7"
# verify pvscan with devices file and devices list
# arg not in devices file
_clear_online_files
-pvscan --devicesfile test.devices --cache -aay $dev3
+pvscan --devicesfile test.devices --cache -aay "$dev3"
not ls "$RUNDIR/lvm/pvs_online/$PVID3"
-pvscan --devicesfile test.devices --cache -aay $dev4
+pvscan --devicesfile test.devices --cache -aay "$dev4"
not ls "$RUNDIR/lvm/pvs_online/$PVID4"
check lv_field $vg1/$lv1 lv_active ""
check lv_field $vg2/$lv2 lv_active ""
# arg in devices file
_clear_online_files
-pvscan --devicesfile test.devices --cache $dev1
-pvscan --devicesfile test.devices --cache $dev2
+pvscan --devicesfile test.devices --cache "$dev1"
+pvscan --devicesfile test.devices --cache "$dev2"
ls "$RUNDIR/lvm/pvs_online/$PVID1"
ls "$RUNDIR/lvm/pvs_online/$PVID2"
# autoactivate with devices file
_clear_online_files
-pvscan --devicesfile test.devices --cache -aay $dev1
-pvscan --devicesfile test.devices --cache -aay $dev2
+pvscan --devicesfile test.devices --cache -aay "$dev1"
+pvscan --devicesfile test.devices --cache -aay "$dev2"
check lv_field $vg1/$lv1 lv_active "active"
vgchange -an $vg1
# autoactivate with no devices file
_clear_online_files
-pvscan --cache -aay $dev3
-pvscan --cache -aay $dev4
+pvscan --cache -aay "$dev3"
+pvscan --cache -aay "$dev4"
check lv_field $vg2/$lv2 lv_active "active"
vgchange -an $vg2
# arg not in devices list
_clear_online_files
-pvscan --devices $dev1,$dev2 --cache $dev3
+pvscan --devices "$dev1","$dev2" --cache "$dev3"
not ls "$RUNDIR/lvm/pvs_online/$PVID3"
-pvscan --devices $dev4 --cache $dev3
+pvscan --devices "$dev4" --cache "$dev3"
not ls "$RUNDIR/lvm/pvs_online/$PVID3"
-pvscan --devices $dev5 --cache $dev3
+pvscan --devices "$dev5" --cache "$dev3"
not ls "$RUNDIR/lvm/pvs_online/$PVID3"
# arg in devices list
_clear_online_files
-pvscan --devices $dev3 --cache -aay $dev3
-pvscan --devices $dev4 --cache -aay $dev4
+pvscan --devices "$dev3" --cache -aay "$dev3"
+pvscan --devices "$dev4" --cache -aay "$dev4"
check lv_field $vg2/$lv2 lv_active "active"
vgchange -an $vg2
# verify --devicesfile and --devices are not affected by a filter
# hide_dev excludes using existing filter
-aux hide_dev $dev2
-aux hide_dev $dev4
-pvs --devicesfile test.devices $dev1
-pvs --devicesfile test.devices $dev2
-not pvs --devicesfile test.devices $dev3
-not pvs --devicesfile test.devices $dev4
-pvs --devices $dev1 $dev1
-pvs --devices $dev2 $dev2
-pvs --devices $dev3 $dev3
-pvs --devices $dev4 $dev4
-pvs --devices $dev5 $dev5
-pvs --devices $dev1,$dev2,$dev3,$dev4,$dev5 $dev1 $dev2 $dev3 $dev4 $dev5 | tee out
-grep $dev1 out
-grep $dev2 out
-grep $dev3 out
-grep $dev4 out
-grep $dev5 out
-vgchange --devices $dev1,$dev2 -ay $vg1
+aux hide_dev "$dev2"
+aux hide_dev "$dev4"
+pvs --devicesfile test.devices "$dev1"
+pvs --devicesfile test.devices "$dev2"
+not pvs --devicesfile test.devices "$dev3"
+not pvs --devicesfile test.devices "$dev4"
+pvs --devices "$dev1" "$dev1"
+pvs --devices "$dev2" "$dev2"
+pvs --devices "$dev3" "$dev3"
+pvs --devices "$dev4" "$dev4"
+pvs --devices "$dev5" "$dev5"
+pvs --devices "$dev1","$dev2","$dev3","$dev4","$dev5" "$dev1" "$dev2" "$dev3" "$dev4" "$dev5" | tee out
+grep "$dev1" out
+grep "$dev2" out
+grep "$dev3" out
+grep "$dev4" out
+grep "$dev5" out
+vgchange --devices "$dev1","$dev2" -ay $vg1
check lv_field $vg1/$lv1 lv_active "active"
-lvchange --devices $dev1,$dev2 -an $vg1/$lv1
-vgchange --devices $dev3,$dev4 -ay $vg2
+lvchange --devices "$dev1","$dev2" -an $vg1/$lv1
+vgchange --devices "$dev3","$dev4" -ay $vg2
check lv_field $vg2/$lv2 lv_active "active"
-lvchange --devices $dev3,$dev4 -an $vg2/$lv2
-aux unhide_dev $dev2
-aux unhide_dev $dev4
+lvchange --devices "$dev3","$dev4" -an $vg2/$lv2
+aux unhide_dev "$dev2"
+aux unhide_dev "$dev4"
vgchange --devicesfile "" -an
vgremove --devicesfile "" -y $vg1
@@ -328,16 +328,16 @@ vgremove --devicesfile "" -y $vg3
aux lvmconf 'devices/use_devicesfile = 1'
DF="$DFDIR/system.devices"
-touch $DF
+touch "$DF"
# create one VG in a non-system devices file
-vgcreate --devicesfile test.devices $vg1 $dev1 $dev2
+vgcreate --devicesfile test.devices $vg1 "$dev1" "$dev2"
# create one VG in the default system devices file
-vgcreate $vg2 $dev3 $dev4
+vgcreate $vg2 "$dev3" "$dev4"
# create one VG in neither devices file
-vgcreate --devicesfile "" $vg3 $dev5 $dev6
+vgcreate --devicesfile "" $vg3 "$dev5" "$dev6"
lvcreate --devicesfile test.devices -l4 -an -i2 -n $lv1 $vg1
lvcreate -l4 -an -i2 -n $lv2 $vg2
@@ -352,12 +352,12 @@ not vgs $vg1
vgs $vg2
not vgs $vg3
pvs |tee out
-not grep $dev1 out
-not grep $dev2 out
-grep $dev3 out
-grep $dev4 out
-not grep $dev5 out
-not grep $dev6 out
+not grep "$dev1" out
+not grep "$dev2" out
+grep "$dev3" out
+grep "$dev4" out
+not grep "$dev5" out
+not grep "$dev6" out
# test.devices only sees vg1
vgs --devicesfile test.devices |tee out
@@ -365,12 +365,12 @@ grep $vg1 out
not grep $vg2 out
not grep $vg3 out
pvs --devicesfile test.devices |tee out
-grep $dev1 out
-grep $dev2 out
-not grep $dev3 out
-not grep $dev4 out
-not grep $dev5 out
-not grep $dev6 out
+grep "$dev1" out
+grep "$dev2" out
+not grep "$dev3" out
+not grep "$dev4" out
+not grep "$dev5" out
+not grep "$dev6" out
# no devices file sees all
vgs --devicesfile "" |tee out
@@ -381,12 +381,12 @@ vgs --devicesfile "" $vg1
vgs --devicesfile "" $vg2
vgs --devicesfile "" $vg3
pvs --devicesfile "" |tee out
-grep $dev1 out
-grep $dev2 out
-grep $dev3 out
-grep $dev4 out
-grep $dev5 out
-grep $dev6 out
+grep "$dev1" out
+grep "$dev2" out
+grep "$dev3" out
+grep "$dev4" out
+grep "$dev5" out
+grep "$dev6" out
vgchange -ay
lvs --devicesfile test.devices -o active $vg1/$lv1 |tee out
@@ -414,145 +414,145 @@ not grep active out
# always gives access to the specified devices
# always denies access to unspecified devices
-vgs --devices $dev1,$dev2 $vg1
-vgs --devices $dev3,$dev4 $vg2
-vgs --devices $dev5,$dev6 $vg3
-
-pvs --devices $dev1 $dev1
-pvs --devices $dev3 $dev3
-pvs --devices $dev5 $dev5
-
-not pvs --devices $dev1 $dev1 $dev2 |tee out
-grep $dev1 out
-not grep $dev2 out
-
-not pvs --devices $dev3 $dev3 $dev4 |tee out
-grep $dev3 out
-not grep $dev4 out
-
-not pvs --devices $dev5 $dev1 $dev2 $dev3 $dev4 $dev5 |tee out
-grep $dev5 out
-not grep $dev1 out
-not grep $dev2 out
-not grep $dev3 out
-not grep $dev4 out
-not grep $dev6 out
-
-pvs --devices $dev1,$dev2,$dev3,$dev4,$dev5 $dev5 |tee out
-grep $dev5 out
-not grep $dev1 out
-not grep $dev2 out
-not grep $dev3 out
-not grep $dev4 out
-not grep $dev6 out
-
-pvs --devices $dev1,$dev2,$dev3,$dev4,$dev5 $dev1 $dev2 $dev3 $dev4 $dev5 |tee out
-grep $dev1 out
-grep $dev2 out
-grep $dev3 out
-grep $dev4 out
-grep $dev5 out
-
-vgchange --devices $dev1,$dev2 -ay
-lvs --devices $dev1,$dev2,$dev3,$dev4,$dev5,$dev6 -o name,active | grep active |tee out
+vgs --devices "$dev1","$dev2" $vg1
+vgs --devices "$dev3","$dev4" $vg2
+vgs --devices "$dev5","$dev6" $vg3
+
+pvs --devices "$dev1" "$dev1"
+pvs --devices "$dev3" "$dev3"
+pvs --devices "$dev5" "$dev5"
+
+not pvs --devices "$dev1" "$dev1" "$dev2" |tee out
+grep "$dev1" out
+not grep "$dev2" out
+
+not pvs --devices "$dev3" "$dev3" "$dev4" |tee out
+grep "$dev3" out
+not grep "$dev4" out
+
+not pvs --devices "$dev5" "$dev1" "$dev2" "$dev3" "$dev4" "$dev5" |tee out
+grep "$dev5" out
+not grep "$dev1" out
+not grep "$dev2" out
+not grep "$dev3" out
+not grep "$dev4" out
+not grep "$dev6" out
+
+pvs --devices "$dev1","$dev2","$dev3","$dev4","$dev5" "$dev5" |tee out
+grep "$dev5" out
+not grep "$dev1" out
+not grep "$dev2" out
+not grep "$dev3" out
+not grep "$dev4" out
+not grep "$dev6" out
+
+pvs --devices "$dev1","$dev2","$dev3","$dev4","$dev5" "$dev1" "$dev2" "$dev3" "$dev4" "$dev5" |tee out
+grep "$dev1" out
+grep "$dev2" out
+grep "$dev3" out
+grep "$dev4" out
+grep "$dev5" out
+
+vgchange --devices "$dev1","$dev2" -ay
+lvs --devices "$dev1","$dev2","$dev3","$dev4","$dev5","$dev6" -o name,active | grep active |tee out
grep $lv1 out
not grep $lv2 out
not grep $lv3 out
-vgchange --devices $dev1,$dev2 -an
-lvs --devices $dev1,$dev2,$dev3,$dev4,$dev5,$dev6 -o name,active | tee out
+vgchange --devices "$dev1","$dev2" -an
+lvs --devices "$dev1","$dev2","$dev3","$dev4","$dev5","$dev6" -o name,active | tee out
not grep active out
-vgchange --devices $dev3,$dev4 -ay
-lvs --devices $dev1,$dev2,$dev3,$dev4,$dev5,$dev6 -o name,active | grep active |tee out
+vgchange --devices "$dev3","$dev4" -ay
+lvs --devices "$dev1","$dev2","$dev3","$dev4","$dev5","$dev6" -o name,active | grep active |tee out
not grep $lv1 out
grep $lv2 out
not grep $lv3 out
-vgchange --devices $dev3,$dev4 -an
-lvs --devices $dev1,$dev2,$dev3,$dev4,$dev5,$dev6 -o name,active |tee out
+vgchange --devices "$dev3","$dev4" -an
+lvs --devices "$dev1","$dev2","$dev3","$dev4","$dev5","$dev6" -o name,active |tee out
not grep active out
-vgchange --devices $dev5,$dev6 -ay
-lvs --devices $dev1,$dev2,$dev3,$dev4,$dev5,$dev6 -o name,active | grep active |tee out
+vgchange --devices "$dev5","$dev6" -ay
+lvs --devices "$dev1","$dev2","$dev3","$dev4","$dev5","$dev6" -o name,active | grep active |tee out
not grep $lv1 out
not grep $lv2 out
grep $lv3 out
-vgchange --devices $dev5,$dev6 -an
-lvs --devices $dev1,$dev2,$dev3,$dev4,$dev5,$dev6 -o name,active |tee out
+vgchange --devices "$dev5","$dev6" -an
+lvs --devices "$dev1","$dev2","$dev3","$dev4","$dev5","$dev6" -o name,active |tee out
not grep active out
-lvcreate --devices $dev1,$dev2 -l1 -an -n $lv4 $vg1
-lvremove --devices $dev1,$dev2 $vg1/$lv4
-lvcreate --devices $dev3,$dev4 -l1 -an -n $lv4 $vg2
-lvremove --devices $dev3,$dev4 $vg2/$lv4
-lvcreate --devices $dev5,$dev6 -l1 -an -n $lv4 $vg3
-lvremove --devices $dev5,$dev6 $vg3/$lv4
-
-not vgchange --devices $dev1,$dev2 -ay $vg2
-not vgchange --devices $dev1,$dev2 -ay $vg3
-not vgchange --devices $dev3,$dev4 -ay $vg1
-not vgchange --devices $dev3,$dev4 -ay $vg3
-not vgchange --devices $dev5,$dev6 -ay $vg1
-not vgchange --devices $dev5,$dev6 -ay $vg2
-
-not lvcreate --devices $dev1,$dev2 -an -l1 $vg2
-not lvcreate --devices $dev1,$dev2 -an -l1 $vg3
-not lvcreate --devices $dev3,$dev4 -an -l1 $vg1
-not lvcreate --devices $dev3,$dev4 -an -l1 $vg3
-not lvcreate --devices $dev5,$dev6 -an -l1 $vg1
-not lvcreate --devices $dev5,$dev6 -an -l1 $vg2
+lvcreate --devices "$dev1","$dev2" -l1 -an -n $lv4 $vg1
+lvremove --devices "$dev1","$dev2" $vg1/$lv4
+lvcreate --devices "$dev3","$dev4" -l1 -an -n $lv4 $vg2
+lvremove --devices "$dev3","$dev4" $vg2/$lv4
+lvcreate --devices "$dev5","$dev6" -l1 -an -n $lv4 $vg3
+lvremove --devices "$dev5","$dev6" $vg3/$lv4
+
+not vgchange --devices "$dev1","$dev2" -ay $vg2
+not vgchange --devices "$dev1","$dev2" -ay $vg3
+not vgchange --devices "$dev3","$dev4" -ay $vg1
+not vgchange --devices "$dev3","$dev4" -ay $vg3
+not vgchange --devices "$dev5","$dev6" -ay $vg1
+not vgchange --devices "$dev5","$dev6" -ay $vg2
+
+not lvcreate --devices "$dev1","$dev2" -an -l1 $vg2
+not lvcreate --devices "$dev1","$dev2" -an -l1 $vg3
+not lvcreate --devices "$dev3","$dev4" -an -l1 $vg1
+not lvcreate --devices "$dev3","$dev4" -an -l1 $vg3
+not lvcreate --devices "$dev5","$dev6" -an -l1 $vg1
+not lvcreate --devices "$dev5","$dev6" -an -l1 $vg2
# autoactivate devs in default devices file
_clear_online_files
-pvscan --cache -aay $dev3
-pvscan --cache -aay $dev4
+pvscan --cache -aay "$dev3"
+pvscan --cache -aay "$dev4"
check lv_field $vg2/$lv2 lv_active "active"
vgchange -an $vg2
-pvscan --cache -aay $dev1
+pvscan --cache -aay "$dev1"
not ls "$RUNDIR/lvm/pvs_online/$PVID1"
-pvscan --cache -aay $dev2
+pvscan --cache -aay "$dev2"
not ls "$RUNDIR/lvm/pvs_online/$PVID2"
-pvscan --cache -aay $dev5
+pvscan --cache -aay "$dev5"
not ls "$RUNDIR/lvm/pvs_online/$PVID5"
_clear_online_files
-pvscan --devices $dev3 --cache -aay $dev3
-pvscan --devices $dev3,$dev4 --cache -aay $dev4
-lvs --devices $dev3,$dev4 -o active $vg2/$lv2 | grep active
-vgchange --devices $dev3,$dev4 -an $vg2
+pvscan --devices "$dev3" --cache -aay "$dev3"
+pvscan --devices "$dev3","$dev4" --cache -aay "$dev4"
+lvs --devices "$dev3","$dev4" -o active $vg2/$lv2 | grep active
+vgchange --devices "$dev3","$dev4" -an $vg2
not vgchange -ay $vg1
vgchange --devicesfile test.devices -ay $vg1
-lvs --devices $dev1,$dev2,$dev3,$dev4,$dev5,$dev6 -o name,active | grep active |tee out
+lvs --devices "$dev1","$dev2","$dev3","$dev4","$dev5","$dev6" -o name,active | grep active |tee out
grep $lv1 out
not grep $lv2 out
not grep $lv3 out
vgchange -ay $vg2
-lvs --devices $dev1,$dev2,$dev3,$dev4,$dev5,$dev6 -o name,active | grep active |tee out
+lvs --devices "$dev1","$dev2","$dev3","$dev4","$dev5","$dev6" -o name,active | grep active |tee out
grep $lv1 out
grep $lv2 out
not grep $lv3 out
not vgchange -ay $vg3
vgchange --devicesfile "" -ay $vg3
-lvs --devices $dev1,$dev2,$dev3,$dev4,$dev5,$dev6 -o name,active | grep active |tee out
+lvs --devices "$dev1","$dev2","$dev3","$dev4","$dev5","$dev6" -o name,active | grep active |tee out
grep $lv1 out
grep $lv2 out
grep $lv3 out
vgchange -an
-lvs --devices $dev1,$dev2,$dev3,$dev4,$dev5,$dev6 -o name,active | grep active |tee out
+lvs --devices "$dev1","$dev2","$dev3","$dev4","$dev5","$dev6" -o name,active | grep active |tee out
grep $lv1 out
not grep $lv2 out
grep $lv3 out
vgchange -ay
-lvs --devices $dev1,$dev2,$dev3,$dev4,$dev5,$dev6 -o name,active | grep active |tee out
+lvs --devices "$dev1","$dev2","$dev3","$dev4","$dev5","$dev6" -o name,active | grep active |tee out
grep $lv1 out
grep $lv2 out
grep $lv3 out
vgchange --devicesfile "" -an
-lvs --devices $dev1,$dev2,$dev3,$dev4,$dev5,$dev6 -o name,active |tee out
+lvs --devices "$dev1","$dev2","$dev3","$dev4","$dev5","$dev6" -o name,active |tee out
not grep active out
not vgremove $vg1
@@ -568,72 +568,71 @@ vgremove --devicesfile "" -y $vg3
# no pvs exist, pvcreate creates DF, e.g. system installation
wipe_all
-rm -f $DF
-pvcreate $dev1
-ls $DF
-grep $dev1 $DF
+rm -f "$DF"
+pvcreate "$dev1"
+ls "$DF"
+grep "$dev1" "$DF"
# no pvs exist, vgcreate creates DF, e.g. system installation
wipe_all
-rm -f $DF
-vgcreate $vg1 $dev1
-ls $DF
-grep $dev1 $DF
+rm -f "$DF"
+vgcreate $vg1 "$dev1"
+ls "$DF"
+grep "$dev1" "$DF"
# no pvs exist, touch DF, pvcreate uses it
wipe_all
-rm -f $DF
-touch $DF
-pvcreate $dev1
-grep $dev1 $DF
+rm -f "$DF"
+touch "$DF"
+pvcreate "$dev1"
+grep "$dev1" "$DF"
# no vgs exist, touch DF, vgcreate uses it
wipe_all
-rm -f $DF
-touch $DF
-vgcreate $vg1 $dev1
-grep $dev1 $DF
+rm -f "$DF"
+touch "$DF"
+vgcreate $vg1 "$dev1"
+grep "$dev1" "$DF"
# vgs exist, pvcreate/vgcreate do not create DF
wipe_all
-rm -f $DF
-vgcreate $vg1 $dev1
-ls $DF
-rm $DF
-pvcreate $dev2
-not ls $DF
-vgcreate $vg3 $dev3
-not ls $DF
+rm -f "$DF"
+vgcreate $vg1 "$dev1"
+ls "$DF"
+rm "$DF"
+pvcreate "$dev2"
+not ls "$DF"
+vgcreate $vg3 "$dev3"
+not ls "$DF"
# vgs exist, pvcreate/vgcreate --devicesfile system.devices creates DF
wipe_all
-rm -f $DF
-vgcreate $vg1 $dev1
-ls $DF
-rm $DF
-pvcreate --devicesfile system.devices $dev2
-ls $DF
-grep $dev2 $DF
-rm $DF
-vgcreate --devicesfile system.devices $vg3 $dev3
-ls $DF
-grep $dev3 $DF
+rm -f "$DF"
+vgcreate $vg1 "$dev1"
+ls "$DF"
+rm "$DF"
+pvcreate --devicesfile system.devices "$dev2"
+ls "$DF"
+grep "$dev2" "$DF"
+rm "$DF"
+vgcreate --devicesfile system.devices $vg3 "$dev3"
+ls "$DF"
+grep "$dev3" "$DF"
# pvcreate/vgcreate always create non-system DF if it doesn't exist
wipe_all
-rm -f $DF
-vgcreate $vg1 $dev1
-rm $DF
-rm $DFDIR/test.devices
-pvcreate --devicesfile test.devices $dev2
-grep $dev2 $DFDIR/test.devices
-rm $DFDIR/test.devices
-vgcreate --devicesfile test.devices $vg3 $dev3
-grep $dev3 $DFDIR/test.devices
-
+rm -f "$DF"
+vgcreate $vg1 "$dev1"
+rm "$DF"
+rm "$DFDIR/test.devices"
+pvcreate --devicesfile test.devices "$dev2"
+grep "$dev2" "$DFDIR/test.devices"
+rm "$DFDIR/test.devices"
+vgcreate --devicesfile test.devices $vg3 "$dev3"
+grep "$dev3" "$DFDIR/test.devices"
diff --git a/test/shell/devicesfile-devname.sh b/test/shell/devicesfile-devname.sh
index 2ef0be13a..c3add303b 100644
--- a/test/shell/devicesfile-devname.sh
+++ b/test/shell/devicesfile-devname.sh
@@ -31,41 +31,41 @@ _clear_online_files() {
}
DFDIR="$LVM_SYSTEM_DIR/devices"
-mkdir $DFDIR || true
+mkdir "$DFDIR" || true
DF="$DFDIR/system.devices"
ORIG="$DFDIR/orig.devices"
aux lvmconf 'devices/use_devicesfile = 1'
-pvcreate $dev1
-ls $DF
-grep $dev1 $DF
+pvcreate "$dev1"
+ls "$DF"
+grep "$dev1" "$DF"
-pvcreate $dev2
-grep $dev2 $DF
+pvcreate "$dev2"
+grep "$dev2" "$DF"
-pvcreate $dev3
-grep $dev3 $DF
+pvcreate "$dev3"
+grep "$dev3" "$DF"
-vgcreate $vg1 $dev1 $dev2
+vgcreate $vg1 "$dev1" "$dev2"
# PVID with dashes for matching pvs -o+uuid output
-OPVID1=`pvs $dev1 --noheading -o uuid | awk '{print $1}'`
-OPVID2=`pvs $dev2 --noheading -o uuid | awk '{print $1}'`
-OPVID3=`pvs $dev3 --noheading -o uuid | awk '{print $1}'`
+OPVID1=`pvs "$dev1" --noheading -o uuid | awk '{print $1}'`
+OPVID2=`pvs "$dev2" --noheading -o uuid | awk '{print $1}'`
+OPVID3=`pvs "$dev3" --noheading -o uuid | awk '{print $1}'`
# PVID without dashes for matching devices file fields
-PVID1=`pvs $dev1 --noheading -o uuid | tr -d - | awk '{print $1}'`
-PVID2=`pvs $dev2 --noheading -o uuid | tr -d - | awk '{print $1}'`
-PVID3=`pvs $dev3 --noheading -o uuid | tr -d - | awk '{print $1}'`
+PVID1=`pvs "$dev1" --noheading -o uuid | tr -d - | awk '{print $1}'`
+PVID2=`pvs "$dev2" --noheading -o uuid | tr -d - | awk '{print $1}'`
+PVID3=`pvs "$dev3" --noheading -o uuid | tr -d - | awk '{print $1}'`
-lvmdevices --deldev $dev3
+lvmdevices --deldev "$dev3"
-not grep $dev3 $DF
-not grep $PVID3 $DF
-not pvs $dev3
+not grep "$dev3" "$DF"
+not grep "$PVID3" "$DF"
+not pvs "$dev3"
-cp $DF $ORIG
+cp "$DF" "$ORIG"
lvcreate -l4 -an -i2 -n $lv1 $vg1
@@ -98,150 +98,150 @@ lvcreate -l4 -an -i2 -n $lv1 $vg1
# edit DF idname, s/dev1/dev3/, where new dev is not in DF
-sed -e "s|IDNAME=$dev1|IDNAME=$dev3|" $ORIG > $DF
-cat $DF
+sed -e "s|IDNAME=$dev1|IDNAME=$dev3|" "$ORIG" > "$DF"
+cat "$DF"
# pvs reports correct info
pvs -o+uuid | tee pvs.out
grep $vg1 pvs.out > out
-not grep $OPVID3 out
-not grep $dev3 out
-grep $OPVID1 out |tee out2
-grep $dev1 out2
+not grep "$OPVID3" out
+not grep "$dev3" out
+grep "$OPVID1" out |tee out2
+grep "$dev1" out2
# pvs fixed the DF
-not grep $PVID3 $DF
-not grep $dev3 $DF
-grep $PVID1 $DF |tee out
-grep IDNAME=$dev1 out
-cat $DF
-
-sed -e "s|IDNAME=$dev1|IDNAME=$dev3|" $ORIG > $DF
-cat $DF
+not grep "$PVID3" "$DF"
+not grep "$dev3" "$DF"
+grep "$PVID1" "$DF" |tee out
+grep "IDNAME=$dev1" out
+cat "$DF"
+
+sed -e "s|IDNAME=$dev1|IDNAME=$dev3|" "$ORIG" > "$DF"
+cat "$DF"
# lvcreate uses correct dev
-lvcreate -l1 -n $lv2 -an $vg1 $dev1
+lvcreate -l1 -n $lv2 -an $vg1 "$dev1"
# lvcreate fixed the DF
-not grep $PVID3 $DF
-not grep $dev3 $DF
-grep $PVID1 $DF |tee out
-grep IDNAME=$dev1 out
+not grep "$PVID3" "$DF"
+not grep "$dev3" "$DF"
+grep "$PVID1" "$DF" |tee out
+grep "IDNAME=$dev1" out
# pvs reports correct dev
pvs -o+uuid | tee pvs.out
grep $vg1 pvs.out > out
-not grep $OPVID3 out
-not grep $dev3 out
-grep $OPVID1 out |tee out2
-grep $dev1 out2
+not grep "$OPVID3" out
+not grep "$dev3" out
+grep "$OPVID1" out |tee out2
+grep "$dev1" out2
lvremove $vg1/$lv2
-cat $DF
+cat "$DF"
-sed -e "s|IDNAME=$dev1|IDNAME=$dev3|" $ORIG > $DF
-cat $DF
+sed -e "s|IDNAME=$dev1|IDNAME=$dev3|" "$ORIG" > "$DF"
+cat "$DF"
# lvmdevices fixes the DF
lvmdevices --update
-not grep $PVID3 $DF
-not grep $dev3 $DF
-grep $PVID1 $DF |tee out
-grep IDNAME=$dev1 out
-cat $DF
+not grep "$PVID3" "$DF"
+not grep "$dev3" "$DF"
+grep "$PVID1" "$DF" |tee out
+grep "IDNAME=$dev1" out
+cat "$DF"
# edit DF idname, s/dev1/dev2/, creating two entries with same idname
-sed -e "s|IDNAME=$dev1|IDNAME=$dev2|" $ORIG > $DF
-cat $DF
+sed -e "s|IDNAME=$dev1|IDNAME=$dev2|" "$ORIG" > "$DF"
+cat "$DF"
# pvs reports correct info
pvs -o+uuid | tee pvs.out
grep $vg1 pvs.out > out
-grep $OPVID1 out |tee out2
-grep $dev1 out2
-grep $OPVID2 out |tee out2
-grep $dev2 out2
+grep "$OPVID1" out |tee out2
+grep "$dev1" out2
+grep "$OPVID2" out |tee out2
+grep "$dev2" out2
# pvs fixed the DF
-grep $PVID1 $DF |tee out
-grep IDNAME=$dev1 out
-grep $PVID2 $DF |tee out
-grep IDNAME=$dev2 out
-cat $DF
-
-sed -e "s|IDNAME=$dev1|IDNAME=$dev2|" $ORIG > $DF
-cat $DF
+grep "$PVID1" "$DF" |tee out
+grep "IDNAME=$dev1" out
+grep "$PVID2" "$DF" |tee out
+grep "IDNAME=$dev2" out
+cat "$DF"
+
+sed -e "s|IDNAME=$dev1|IDNAME=$dev2|" "$ORIG" > "$DF"
+cat "$DF"
# lvcreate uses correct dev
-lvcreate -l1 -n $lv2 -an $vg1 $dev1
+lvcreate -l1 -n $lv2 -an $vg1 "$dev1"
# lvcreate fixed the DF
-grep $PVID1 $DF |tee out
-grep IDNAME=$dev1 out
-grep $PVID2 $DF |tee out
-grep IDNAME=$dev2 out
+grep "$PVID1" "$DF" |tee out
+grep "IDNAME=$dev1" out
+grep "$PVID2" "$DF" |tee out
+grep "IDNAME=$dev2" out
# pvs reports correct info
pvs -o+uuid | tee pvs.out
grep $vg1 pvs.out > out
-grep $OPVID1 out |tee out2
-grep $dev1 out2
-grep $OPVID2 out |tee out2
-grep $dev2 out2
+grep "$OPVID1" out |tee out2
+grep "$dev1" out2
+grep "$OPVID2" out |tee out2
+grep "$dev2" out2
lvremove $vg1/$lv2
-cat $DF
+cat "$DF"
-sed -e "s|IDNAME=$dev1|IDNAME=$dev2|" $ORIG > $DF
-cat $DF
+sed -e "s|IDNAME=$dev1|IDNAME=$dev2|" "$ORIG" > "$DF"
+cat "$DF"
# lvmdevices fixes the DF
lvmdevices --update
-grep $PVID1 $DF |tee out
-grep IDNAME=$dev1 out
-grep $PVID2 $DF |tee out
-grep IDNAME=$dev2 out
-cat $DF
+grep "$PVID1" "$DF" |tee out
+grep "IDNAME=$dev1" out
+grep "$PVID2" "$DF" |tee out
+grep "IDNAME=$dev2" out
+cat "$DF"
# edit DF idname, swap dev1 and dev2
-sed -e "s|IDNAME=$dev1|IDNAME=tmpname|" $ORIG > tmp1.devices
+sed -e "s|IDNAME=$dev1|IDNAME=tmpname|" "$ORIG" > tmp1.devices
sed -e "s|IDNAME=$dev2|IDNAME=$dev1|" tmp1.devices > tmp2.devices
-sed -e "s|IDNAME=tmpname|IDNAME=$dev2|" tmp2.devices > $DF
-cat $DF
+sed -e "s|IDNAME=tmpname|IDNAME=$dev2|" tmp2.devices > "$DF"
+cat "$DF"
# pvs reports correct info
pvs -o+uuid | tee pvs.out
grep $vg1 pvs.out > out
-grep $OPVID1 out |tee out2
-grep $dev1 out2
-grep $OPVID2 out |tee out2
-grep $dev2 out2
+grep "$OPVID1" out |tee out2
+grep "$dev1" out2
+grep "$OPVID2" out |tee out2
+grep "$dev2" out2
# pvs fixed the DF
-grep $PVID1 $DF |tee out
-grep IDNAME=$dev1 out
-grep $PVID2 $DF |tee out
-grep IDNAME=$dev2 out
-cat $DF
+grep "$PVID1" "$DF" |tee out
+grep "IDNAME=$dev1" out
+grep "$PVID2" "$DF" |tee out
+grep "IDNAME=$dev2" out
+cat "$DF"
-sed -e "s|IDNAME=$dev1|IDNAME=tmpname|" $ORIG > tmp1.devices
+sed -e "s|IDNAME=$dev1|IDNAME=tmpname|" "$ORIG" > tmp1.devices
sed -e "s|IDNAME=$dev2|IDNAME=$dev1|" tmp1.devices > tmp2.devices
-sed -e "s|IDNAME=tmpname|IDNAME=$dev2|" tmp2.devices > $DF
-cat $DF
+sed -e "s|IDNAME=tmpname|IDNAME=$dev2|" tmp2.devices > "$DF"
+cat "$DF"
# lvcreate uses correct dev
-lvcreate -l1 -n $lv2 -an $vg1 $dev1
+lvcreate -l1 -n $lv2 -an $vg1 "$dev1"
# lvcreate fixed the DF
-grep $PVID1 $DF |tee out
-grep IDNAME=$dev1 out
-grep $PVID2 $DF |tee out
-grep IDNAME=$dev2 out
+grep "$PVID1" "$DF" |tee out
+grep "IDNAME=$dev1" out
+grep "$PVID2" "$DF" |tee out
+grep "IDNAME=$dev2" out
# pvs reports correct info
pvs -o+uuid | tee pvs.out
grep $vg1 pvs.out > out
-grep $OPVID1 out |tee out2
-grep $dev1 out2
-grep $OPVID2 out |tee out2
-grep $dev2 out2
+grep "$OPVID1" out |tee out2
+grep "$dev1" out2
+grep "$OPVID2" out |tee out2
+grep "$dev2" out2
lvremove $vg1/$lv2
-cat $DF
+cat "$DF"
-sed -e "s|IDNAME=$dev1|IDNAME=tmpname|" $ORIG > tmp1.devices
+sed -e "s|IDNAME=$dev1|IDNAME=tmpname|" "$ORIG" > tmp1.devices
sed -e "s|IDNAME=$dev2|IDNAME=$dev1|" tmp1.devices > tmp2.devices
-sed -e "s|IDNAME=tmpname|IDNAME=$dev2|" tmp2.devices > $DF
-cat $DF
+sed -e "s|IDNAME=tmpname|IDNAME=$dev2|" tmp2.devices > "$DF"
+cat "$DF"
# lvmdevices fixes the DF
lvmdevices --update
-grep $PVID1 $DF |tee out
-grep IDNAME=$dev1 out
-grep $PVID2 $DF |tee out
-grep IDNAME=$dev2 out
-cat $DF
+grep "$PVID1" "$DF" |tee out
+grep "IDNAME=$dev1" out
+grep "$PVID2" "$DF" |tee out
+grep "IDNAME=$dev2" out
+cat "$DF"
#
@@ -253,91 +253,91 @@ cat $DF
# edit DF devname, s/dev1/dev3/, where new dev is not in DF
-sed -e "s|DEVNAME=$dev1|DEVNAME=$dev3|" $ORIG > $DF
-cat $DF
+sed -e "s|DEVNAME=$dev1|DEVNAME=$dev3|" "$ORIG" > "$DF"
+cat "$DF"
# pvs reports correct info
pvs -o+uuid | tee pvs.out
grep $vg1 pvs.out > out
-not grep $OPVID3 out
-not grep $dev3 out
-grep $OPVID1 out |tee out2
-grep $dev1 out2
+not grep "$OPVID3" out
+not grep "$dev3" out
+grep "$OPVID1" out |tee out2
+grep "$dev1" out2
# pvs fixed the DF
-not grep $PVID3 $DF
-not grep $dev3 $DF
-grep $PVID1 $DF |tee out
-grep DEVNAME=$dev1 out
-cat $DF
-
-sed -e "s|DEVNAME=$dev1|DEVNAME=$dev3|" $ORIG > $DF
-cat $DF
+not grep "$PVID3" "$DF"
+not grep "$dev3" "$DF"
+grep "$PVID1" "$DF" |tee out
+grep "DEVNAME=$dev1" out
+cat "$DF"
+
+sed -e "s|DEVNAME=$dev1|DEVNAME=$dev3|" "$ORIG" > "$DF"
+cat "$DF"
# lvmdevices fixes the DF
lvmdevices --update
-not grep $PVID3 $DF
-not grep $dev3 $DF
-grep $PVID1 $DF |tee out
-grep IDNAME=$dev1 out
-cat $DF
+not grep "$PVID3" "$DF"
+not grep "$dev3" "$DF"
+grep "$PVID1" "$DF" |tee out
+grep "IDNAME=$dev1" out
+cat "$DF"
# edit DF devname, s/dev1/dev2/, creating two entries with same devname
-sed -e "s|DEVNAME=$dev1|DEVNAME=$dev2|" $ORIG > $DF
-cat $DF
+sed -e "s|DEVNAME=$dev1|DEVNAME=$dev2|" "$ORIG" > "$DF"
+cat "$DF"
# pvs reports correct info
pvs -o+uuid | tee pvs.out
grep $vg1 pvs.out > out
-grep $OPVID1 out |tee out2
-grep $dev1 out2
-grep $OPVID2 out |tee out2
-grep $dev2 out2
+grep "$OPVID1" out |tee out2
+grep "$dev1" out2
+grep "$OPVID2" out |tee out2
+grep "$dev2" out2
# pvs fixed the DF
-grep $PVID1 $DF |tee out
-grep DEVNAME=$dev1 out
-grep $PVID2 $DF |tee out
-grep DEVNAME=$dev2 out
-cat $DF
-
-sed -e "s|DEVNAME=$dev1|DEVNAME=$dev2|" $ORIG > $DF
-cat $DF
+grep "$PVID1" "$DF" |tee out
+grep "DEVNAME=$dev1" out
+grep "$PVID2" "$DF" |tee out
+grep "DEVNAME=$dev2" out
+cat "$DF"
+
+sed -e "s|DEVNAME=$dev1|DEVNAME=$dev2|" "$ORIG" > "$DF"
+cat "$DF"
# lvmdevices fixes the DF
lvmdevices --update
-grep $PVID1 $DF |tee out
-grep IDNAME=$dev1 out
-grep $PVID2 $DF |tee out
-grep IDNAME=$dev2 out
-cat $DF
+grep "$PVID1" "$DF" |tee out
+grep "IDNAME=$dev1" out
+grep "$PVID2" "$DF" |tee out
+grep "IDNAME=$dev2" out
+cat "$DF"
# edit DF devname, swap dev1 and dev2
-sed -e "s|DEVNAME=$dev1|DEVNAME=tmpname|" $ORIG > tmp1.devices
+sed -e "s|DEVNAME=$dev1|DEVNAME=tmpname|" "$ORIG" > tmp1.devices
sed -e "s|DEVNAME=$dev2|DEVNAME=$dev1|" tmp1.devices > tmp2.devices
-sed -e "s|DEVNAME=tmpname|DEVNAME=$dev2|" tmp2.devices > $DF
-cat $DF
+sed -e "s|DEVNAME=tmpname|DEVNAME=$dev2|" tmp2.devices > "$DF"
+cat "$DF"
# pvs reports correct info
pvs -o+uuid | tee pvs.out
grep $vg1 pvs.out > out
-grep $OPVID1 out |tee out2
-grep $dev1 out2
-grep $OPVID2 out |tee out2
-grep $dev2 out2
+grep "$OPVID1" out |tee out2
+grep "$dev1" out2
+grep "$OPVID2" out |tee out2
+grep "$dev2" out2
# pvs fixed the DF
-grep $PVID1 $DF |tee out
-grep DEVNAME=$dev1 out
-grep $PVID2 $DF |tee out
-grep DEVNAME=$dev2 out
-cat $DF
+grep "$PVID1" "$DF" |tee out
+grep "DEVNAME=$dev1" out
+grep "$PVID2" "$DF" |tee out
+grep "DEVNAME=$dev2" out
+cat "$DF"
-sed -e "s|DEVNAME=$dev1|DEVNAME=tmpname|" $ORIG > tmp1.devices
+sed -e "s|DEVNAME=$dev1|DEVNAME=tmpname|" "$ORIG" > tmp1.devices
sed -e "s|DEVNAME=$dev2|DEVNAME=$dev1|" tmp1.devices > tmp2.devices
-sed -e "s|DEVNAME=tmpname|DEVNAME=$dev2|" tmp2.devices > $DF
-cat $DF
+sed -e "s|DEVNAME=tmpname|DEVNAME=$dev2|" tmp2.devices > "$DF"
+cat "$DF"
# lvmdevices fixes the DF
lvmdevices --update
-grep $PVID1 $DF |tee out
-grep IDNAME=$dev1 out
-grep $PVID2 $DF |tee out
-grep IDNAME=$dev2 out
-cat $DF
+grep "$PVID1" "$DF" |tee out
+grep "IDNAME=$dev1" out
+grep "$PVID2" "$DF" |tee out
+grep "IDNAME=$dev2" out
+cat "$DF"
#
@@ -349,111 +349,111 @@ cat $DF
# edit DF idname&devname, s/dev1/dev3/, where new dev is not in DF
-sed -e "s|DEVNAME=$dev1|DEVNAME=$dev3|" $ORIG > tmp1.devices
-sed -e "s|IDNAME=$dev1|IDNAME=$dev3|" tmp1.devices > $DF
-cat $DF
+sed -e "s|DEVNAME=$dev1|DEVNAME=$dev3|" "$ORIG" > tmp1.devices
+sed -e "s|IDNAME=$dev1|IDNAME=$dev3|" tmp1.devices > "$DF"
+cat "$DF"
# pvs reports correct info
pvs -o+uuid | tee pvs.out
grep $vg1 pvs.out > out
-not grep $OPVID3 out
-not grep $dev3 out
-grep $OPVID1 out |tee out2
-grep $dev1 out2
+not grep "$OPVID3" out
+not grep "$dev3" out
+grep "$OPVID1" out |tee out2
+grep "$dev1" out2
# pvs fixed the DF
-not grep $PVID3 $DF
-not grep $dev3 $DF
-grep $PVID1 $DF |tee out
-grep DEVNAME=$dev1 out
-grep IDNAME=$dev1 out
-cat $DF
-
-sed -e "s|DEVNAME=$dev1|DEVNAME=$dev3|" $ORIG > tmp1.devices
-sed -e "s|IDNAME=$dev1|IDNAME=$dev3|" tmp1.devices > $DF
-cat $DF
+not grep "$PVID3" "$DF"
+not grep "$dev3" "$DF"
+grep "$PVID1" "$DF" |tee out
+grep "DEVNAME=$dev1" out
+grep "IDNAME=$dev1" out
+cat "$DF"
+
+sed -e "s|DEVNAME=$dev1|DEVNAME=$dev3|" "$ORIG" > tmp1.devices
+sed -e "s|IDNAME=$dev1|IDNAME=$dev3|" tmp1.devices > "$DF"
+cat "$DF"
# lvmdevices fixes the DF
lvmdevices --update
-not grep $PVID3 $DF
-not grep $dev3 $DF
-grep $PVID1 $DF |tee out
-grep DEVNAME=$dev1 out
-grep IDNAME=$dev1 out
-cat $DF
+not grep "$PVID3" "$DF"
+not grep "$dev3" "$DF"
+grep "$PVID1" "$DF" |tee out
+grep "DEVNAME=$dev1" out
+grep "IDNAME=$dev1" out
+cat "$DF"
# edit DF idname&devname, s/dev1/dev2/, creating two entries with same devname
-sed -e "s|DEVNAME=$dev1|DEVNAME=$dev2|" tmp1.devices > $DF
-sed -e "s|IDNAME=$dev1|IDNAME=$dev2|" tmp1.devices > $DF
-cat $DF
+sed -e "s|DEVNAME=$dev1|DEVNAME=$dev2|" tmp1.devices > "$DF"
+sed -e "s|IDNAME=$dev1|IDNAME=$dev2|" tmp1.devices > "$DF"
+cat "$DF"
# pvs reports correct info
pvs -o+uuid | tee pvs.out
grep $vg1 pvs.out > out
-grep $OPVID1 out |tee out2
-grep $dev1 out2
-grep $OPVID2 out |tee out2
-grep $dev2 out2
+grep "$OPVID1" out |tee out2
+grep "$dev1" out2
+grep "$OPVID2" out |tee out2
+grep "$dev2" out2
# pvs fixed the DF
-grep $PVID1 $DF |tee out
-grep DEVNAME=$dev1 out
-grep IDNAME=$dev1 out
-grep $PVID2 $DF |tee out
-grep DEVNAME=$dev2 out
-grep IDNAME=$dev2 out
-cat $DF
-
-sed -e "s|DEVNAME=$dev1|DEVNAME=$dev2|" tmp1.devices > $DF
-sed -e "s|IDNAME=$dev1|IDNAME=$dev2|" tmp1.devices > $DF
-cat $DF
+grep "$PVID1" "$DF" |tee out
+grep "DEVNAME=$dev1" out
+grep "IDNAME=$dev1" out
+grep "$PVID2" "$DF" |tee out
+grep "DEVNAME=$dev2" out
+grep "IDNAME=$dev2" out
+cat "$DF"
+
+sed -e "s|DEVNAME=$dev1|DEVNAME=$dev2|" tmp1.devices > "$DF"
+sed -e "s|IDNAME=$dev1|IDNAME=$dev2|" tmp1.devices > "$DF"
+cat "$DF"
# lvmdevices fixes the DF
lvmdevices --update
-grep $PVID1 $DF |tee out
-grep DEVNAME=$dev1 out
-grep IDNAME=$dev1 out
-grep $PVID2 $DF |tee out
-grep DEVNAME=$dev2 out
-grep IDNAME=$dev2 out
-cat $DF
+grep "$PVID1" "$DF" |tee out
+grep "DEVNAME=$dev1" out
+grep "IDNAME=$dev1" out
+grep "$PVID2" "$DF" |tee out
+grep "DEVNAME=$dev2" out
+grep "IDNAME=$dev2" out
+cat "$DF"
# edit DF devname, swap dev1 and dev2
-sed -e "s|DEVNAME=$dev1|DEVNAME=tmpname|" $ORIG > tmp1.devices
+sed -e "s|DEVNAME=$dev1|DEVNAME=tmpname|" "$ORIG" > tmp1.devices
sed -e "s|DEVNAME=$dev2|DEVNAME=$dev1|" tmp1.devices > tmp2.devices
sed -e "s|DEVNAME=tmpname|DEVNAME=$dev2|" tmp2.devices > tmp3.devices
sed -e "s|IDNAME=$dev1|IDNAME=tmpname|" tmp3.devices > tmp4.devices
sed -e "s|IDNAME=$dev2|IDNAME=$dev1|" tmp4.devices > tmp5.devices
-sed -e "s|IDNAME=tmpname|IDNAME=$dev2|" tmp5.devices > $DF
-cat $DF
+sed -e "s|IDNAME=tmpname|IDNAME=$dev2|" tmp5.devices > "$DF"
+cat "$DF"
# pvs reports correct info
pvs -o+uuid | tee pvs.out
grep $vg1 pvs.out > out
-grep $OPVID1 out |tee out2
-grep $dev1 out2
-grep $OPVID2 out |tee out2
-grep $dev2 out2
+grep "$OPVID1" out |tee out2
+grep "$dev1" out2
+grep "$OPVID2" out |tee out2
+grep "$dev2" out2
# pvs fixed the DF
-grep $PVID1 $DF |tee out
-grep DEVNAME=$dev1 out
-grep IDNAME=$dev1 out
-grep $PVID2 $DF |tee out
-grep DEVNAME=$dev2 out
-grep IDNAME=$dev2 out
-cat $DF
-
-sed -e "s|DEVNAME=$dev1|DEVNAME=tmpname|" $ORIG > tmp1.devices
+grep "$PVID1" "$DF" |tee out
+grep "DEVNAME=$dev1" out
+grep "IDNAME=$dev1" out
+grep "$PVID2" "$DF" |tee out
+grep "DEVNAME=$dev2" out
+grep "IDNAME=$dev2" out
+cat "$DF"
+
+sed -e "s|DEVNAME=$dev1|DEVNAME=tmpname|" "$ORIG" > tmp1.devices
sed -e "s|DEVNAME=$dev2|DEVNAME=$dev1|" tmp1.devices > tmp2.devices
sed -e "s|DEVNAME=tmpname|DEVNAME=$dev2|" tmp2.devices > tmp3.devices
sed -e "s|IDNAME=$dev1|IDNAME=tmpname|" tmp3.devices > tmp4.devices
sed -e "s|IDNAME=$dev2|IDNAME=$dev1|" tmp4.devices > tmp5.devices
-sed -e "s|IDNAME=tmpname|IDNAME=$dev2|" tmp5.devices > $DF
-cat $DF
+sed -e "s|IDNAME=tmpname|IDNAME=$dev2|" tmp5.devices > "$DF"
+cat "$DF"
# lvmdevices fixes the DF
lvmdevices --update
-grep $PVID1 $DF |tee out
-grep DEVNAME=$dev1 out
-grep IDNAME=$dev1 out
-grep $PVID2 $DF |tee out
-grep DEVNAME=$dev2 out
-grep IDNAME=$dev2 out
-cat $DF
+grep "$PVID1" "$DF" |tee out
+grep "DEVNAME=$dev1" out
+grep "IDNAME=$dev1" out
+grep "$PVID2" "$DF" |tee out
+grep "DEVNAME=$dev2" out
+grep "IDNAME=$dev2" out
+cat "$DF"
#
# check that pvscan --cache -aay does the right thing:
@@ -465,52 +465,52 @@ cat $DF
# edit DF idname&devname, s/dev1/dev3/, where new dev is not in DF
-sed -e "s|DEVNAME=$dev1|DEVNAME=$dev3|" $ORIG > tmp1.devices
-sed -e "s|IDNAME=$dev1|IDNAME=$dev3|" tmp1.devices > $DF
-cat $DF
+sed -e "s|DEVNAME=$dev1|DEVNAME=$dev3|" "$ORIG" > tmp1.devices
+sed -e "s|IDNAME=$dev1|IDNAME=$dev3|" tmp1.devices > "$DF"
+cat "$DF"
_clear_online_files
-pvscan --cache -aay $dev1
-pvscan --cache -aay $dev2
-pvscan --cache -aay $dev3
-cat $DF
+pvscan --cache -aay "$dev1"
+pvscan --cache -aay "$dev2"
+pvscan --cache -aay "$dev3"
+cat "$DF"
# pvscan does not fix DF
-grep $dev3 $DF
-not grep $dev1 $DF
-ls "$RUNDIR/lvm/pvs_online/$PVID1"
+grep "$dev3" "$DF"
+not grep "$dev1" "$DF"
+ls "$RUNDIR/lvm/pvs_online/"$PVID1""
ls "$RUNDIR/lvm/pvs_online/$PVID2"
-not ls "$RUNDIR/lvm/pvs_online/$PVID3"
+not ls "$RUNDIR/lvm/pvs_online/"$PVID3""
check lv_field $vg1/$lv1 lv_active "active"
# pvs updates the DF
pvs |tee out
-grep $dev1 out
-grep $dev2 out
-not grep $dev3 out
-grep $dev1 $DF
-grep $dev2 $DF
-not grep $dev3 $DF
+grep "$dev1" out
+grep "$dev2" out
+not grep "$dev3" out
+grep "$dev1" "$DF"
+grep "$dev2" "$DF"
+not grep "$dev3" "$DF"
vgchange -an $vg1
# edit DF idname&devname, swap dev1 and dev2
vgremove -y $vg1
-vgcreate $vg1 $dev1
+vgcreate $vg1 "$dev1"
lvcreate -n $lv1 -l1 -an $vg1
-vgcreate $vg2 $dev2
+vgcreate $vg2 "$dev2"
lvcreate -n $lv2 -l1 -an $vg2
-cat $DF
-sed -e "s|DEVNAME=$dev1|DEVNAME=tmpname|" $ORIG > tmp1.devices
+cat "$DF"
+sed -e "s|DEVNAME=$dev1|DEVNAME=tmpname|" "$ORIG" > tmp1.devices
sed -e "s|DEVNAME=$dev2|DEVNAME=$dev1|" tmp1.devices > tmp2.devices
sed -e "s|DEVNAME=tmpname|DEVNAME=$dev2|" tmp2.devices > tmp3.devices
sed -e "s|IDNAME=$dev1|IDNAME=tmpname|" tmp3.devices > tmp4.devices
sed -e "s|IDNAME=$dev2|IDNAME=$dev1|" tmp4.devices > tmp5.devices
-sed -e "s|IDNAME=tmpname|IDNAME=$dev2|" tmp5.devices > $DF
-cat $DF
+sed -e "s|IDNAME=tmpname|IDNAME=$dev2|" tmp5.devices > "$DF"
+cat "$DF"
_clear_online_files
# pvscan creates the correct online files and activates correct vg
-pvscan --cache -aay $dev1
+pvscan --cache -aay "$dev1"
ls "$RUNDIR/lvm/pvs_online/$PVID1"
ls "$RUNDIR/lvm/vgs_online/$vg1"
not ls "$RUNDIR/lvm/pvs_online/$PVID2"
@@ -519,30 +519,30 @@ not ls "$RUNDIR/lvm/vgs_online/$vg2"
dmsetup status $vg1-$lv1
not dmsetup status $vg2-$lv2
-pvscan --cache -aay $dev2
+pvscan --cache -aay "$dev2"
ls "$RUNDIR/lvm/pvs_online/$PVID2"
ls "$RUNDIR/lvm/vgs_online/$vg2"
dmsetup status $vg2-$lv2
-pvscan --cache -aay $dev3
+pvscan --cache -aay "$dev3"
not ls "$RUNDIR/lvm/pvs_online/$PVID3"
# pvscan did not correct DF
-cat $DF
-grep $PVID1 $DF |tee out
-grep $dev2 out
-not grep $dev1 out
-grep $PVID2 $DF |tee out
-grep $dev1 out
-not grep $dev2 out
+cat "$DF"
+grep "$PVID1" "$DF" |tee out
+grep "$dev2" out
+not grep "$dev1" out
+grep "$PVID2" "$DF" |tee out
+grep "$dev1" out
+not grep "$dev2" out
# pvs corrects DF
pvs
-grep $PVID1 $DF |tee out
-grep $dev1 out
-not grep $dev2 out
-grep $PVID2 $DF |tee out
-grep $dev2 out
-not grep $dev1 out
+grep "$PVID1" "$DF" |tee out
+grep "$dev1" out
+not grep "$dev2" out
+grep "$PVID2" "$DF" |tee out
+grep "$dev2" out
+not grep "$dev1" out
vgremove -ff $vg1
diff --git a/test/shell/hints.sh b/test/shell/hints.sh
index a11aeec23..3df875418 100644
--- a/test/shell/hints.sh
+++ b/test/shell/hints.sh
@@ -146,7 +146,7 @@ not pvs "$dev5"
# create a new temp device that will cause hint hash to change
DEVNAME=${PREFIX}pv99
-echo "0 `blockdev --getsize $dev5` linear $dev5 0" | dmsetup create $DEVNAME
+echo "0 $(blockdev --getsize "$dev5") linear $dev5 0" | dmsetup create $DEVNAME
dmsetup status $DEVNAME
cp $HINTS $PREV
@@ -391,7 +391,7 @@ rm tmp-old tmp-new tmp-newuuid
#
# this vgcreate invalidates current hints
-vgcreate $vg3 $dev4
+vgcreate $vg3 "$dev4"
# this pvs creates new hints
pvs
cp $HINTS tmp-old
diff --git a/test/shell/lvconvert-repair-raid.sh b/test/shell/lvconvert-repair-raid.sh
index 711f386fd..de0c9ba8e 100644
--- a/test/shell/lvconvert-repair-raid.sh
+++ b/test/shell/lvconvert-repair-raid.sh
@@ -25,7 +25,7 @@ aux lvmconf 'allocation/maximise_cling = 0' \
aux prepare_vg 8 80
get_devs
-offset=$(get first_extent_sector $dev1)
+offset=$(get first_extent_sector "$dev1")
function delay
{
diff --git a/test/shell/lvdisplay-raid.sh b/test/shell/lvdisplay-raid.sh
index 95205ba81..32c3f3478 100644
--- a/test/shell/lvdisplay-raid.sh
+++ b/test/shell/lvdisplay-raid.sh
@@ -21,61 +21,60 @@ SKIP_WITH_LVMPOLLD=1
aux have_raid 1 7 0 || skip
aux prepare_vg 6
-get_devs
# raid0 loosing a leg
lvcreate -aey --type raid0 -i5 -l5 -n $lv $vg
lvdisplay $vg/$lv|grep "LV Status *available"
-aux disable_dev $dev1
+aux disable_dev "$dev1"
lvdisplay $vg/$lv|grep "LV Status *NOT available (partial)"
-aux enable_dev $dev1
+aux enable_dev "$dev1"
lvremove -y $vg/$lv
# raid1 loosing a leg/all legs
-lvcreate -aey --type raid1 -m1 -l5 -n $lv $vg $dev1 $dev2
+lvcreate -aey --type raid1 -m1 -l5 -n $lv $vg "$dev1" "$dev2"
lvdisplay $vg/$lv|grep "LV Status *available"
-aux disable_dev $dev1
+aux disable_dev "$dev1"
lvdisplay $vg/$lv|grep "LV Status *available (partial)"
-aux disable_dev $dev2
+aux disable_dev "$dev2"
lvdisplay $vg/$lv|grep "LV Status *NOT available (partial)"
-aux enable_dev $dev1 $dev2
+aux enable_dev "$dev1" "$dev2"
lvremove -y $vg/$lv
# raid5 loosing a leg/2 legs
lvcreate -aey --type raid5 -i3 -l5 -n $lv $vg
lvdisplay $vg/$lv|grep "LV Status *available"
-aux disable_dev $dev1
+aux disable_dev "$dev1"
lvdisplay $vg/$lv|grep "LV Status *available (partial)"
-aux disable_dev $dev2
+aux disable_dev "$dev2"
lvdisplay $vg/$lv|grep "LV Status *NOT available (partial)"
-aux enable_dev $dev1 $dev2
+aux enable_dev "$dev1" "$dev2"
lvremove -y $vg/$lv
# raid6 loosing a leg/2 legs/3 legs
lvcreate -aey --type raid6 -i3 -l5 -n $lv $vg
lvdisplay $vg/$lv|grep "LV Status *available"
-aux disable_dev $dev1
+aux disable_dev "$dev1"
lvdisplay $vg/$lv|grep "LV Status *available (partial)"
-aux disable_dev $dev2
+aux disable_dev "$dev2"
lvdisplay $vg/$lv|grep "LV Status *available (partial)"
-aux disable_dev $dev3
+aux disable_dev "$dev3"
lvdisplay $vg/$lv|grep "LV Status *NOT available (partial)"
-aux enable_dev $dev1 $dev2 $dev3
+aux enable_dev "$dev1" "$dev2" "$dev3"
lvremove -y $vg/$lv
# raid10 loosing a leg per mirror group / a complete mirror group
lvcreate -aey --type raid10 -i3 -l3 -n $lv $vg
lvdisplay $vg/$lv|grep "LV Status *available"
-aux disable_dev $dev1
+aux disable_dev "$dev1"
lvdisplay $vg/$lv|grep "LV Status *available (partial)"
-aux disable_dev $dev3
+aux disable_dev "$dev3"
lvdisplay $vg/$lv|grep "LV Status *available (partial)"
-aux disable_dev $dev6
+aux disable_dev "$dev6"
lvdisplay $vg/$lv|grep "LV Status *available (partial)"
-aux enable_dev $dev1 $dev3 $dev6
+aux enable_dev "$dev1" "$dev3" "$dev6"
lvdisplay $vg/$lv|grep "LV Status *available"
-aux disable_dev $dev1 $dev2
+aux disable_dev "$dev1" "$dev2"
lvdisplay $vg/$lv|grep "LV Status *NOT available (partial)"
-aux enable_dev $dev1 $dev2
+aux enable_dev "$dev1" "$dev2"
vgremove -y -f $vg
diff --git a/test/shell/pvscan-autoactivate.sh b/test/shell/pvscan-autoactivate.sh
index 153939d34..297ceb96d 100644
--- a/test/shell/pvscan-autoactivate.sh
+++ b/test/shell/pvscan-autoactivate.sh
@@ -125,7 +125,7 @@ vgremove -f $vg1
pvcreate "$dev3"
-PVID3=`pvs $dev3 --noheading -o uuid | tr -d - | awk '{print $1}'`
+PVID3=$(pvs "$dev3" --noheading -o uuid | tr -d - | awk '{print $1}')
echo $PVID3
not ls "$RUNDIR/lvm/pvs_online/$PVID3"
@@ -220,7 +220,7 @@ vgremove -ff $vg3
pvremove "$dev8"
pvcreate -y --setphysicalvolumesize 8M "$dev8"
-PVID8=`pvs $dev8 --noheading -o uuid | tr -d - | awk '{print $1}'`
+PVID8=$(pvs "$dev8" --noheading -o uuid | tr -d - | awk '{print $1}')
echo $PVID8
vgcreate $vg3 "$dev8"
@@ -238,4 +238,3 @@ ls "$RUNDIR/lvm/vgs_online/$vg3"
vgchange -an $vg3
vgremove -ff $vg3
-
2 years, 8 months