diff options
author | Heinz Mauelshagen <heinzm@redhat.com> | 2017-03-27 16:45:48 +0200 |
---|---|---|
committer | Heinz Mauelshagen <heinzm@redhat.com> | 2017-03-27 16:49:39 +0200 |
commit | 36cac41115cca875f5d120631933b5dfb3c3c524 (patch) | |
tree | 17655c869a2acd7e4c1843c1ddbe2541d03e2cd6 /man/lvmraid.7_main | |
parent | 6165e092215c795eafa297268cddbd9dade3a82c (diff) | |
download | lvm2-36cac41115cca875f5d120631933b5dfb3c3c524.tar.gz |
man-generator/man/help: simplify hyphen escaping
Commits a29bb6a14b5e920092495fb9a1623e527d22daac
... 5c199d99f4dc9911d62673baba7643ea649ffe64
narrowed down on addressing the escaping of hyphens
in the dynamic creation of manuals whilst avoiding
them in creating help texts. This lead to a sequence
of slipping through hyphens adrressed by additional
patches in aforementioned commit series.
On the other hand, postprocessing dynamically man-generator
created and statically provided manuals catches all hyphens
in need of escaping.
Changes:
- revert the above commits whilst keeping man-generator
streamlining and the detection of any '\' when generating
help texts in order to avoid escapes to slip in
- Dynamically escape hyphens in manaual pages using sed(1)
in the respective Makefile targets
- remove any manually added escaping on hyphens from any
static manual sources or headers
Diffstat (limited to 'man/lvmraid.7_main')
-rw-r--r-- | man/lvmraid.7_main | 518 |
1 files changed, 259 insertions, 259 deletions
diff --git a/man/lvmraid.7_main b/man/lvmraid.7_main index 98630f009..3cbc84bf6 100644 --- a/man/lvmraid.7_main +++ b/man/lvmraid.7_main @@ -31,12 +31,12 @@ The LV type corresponds to a RAID level. The basic RAID levels that can be used are: .B raid0, raid1, raid4, raid5, raid6, raid10. -.B lvcreate \-\-type +.B lvcreate --type .I RaidLevel [\fIOPTIONS\fP] -.B \-\-name +.B --name .I Name -.B \-\-size +.B --size .I Size .I VG [\fIPVs\fP] @@ -58,17 +58,17 @@ Also called striping, raid0 spreads LV data across multiple devices in units of stripe size. This is used to increase performance. LV data will be lost if any of the devices fail. -.B lvcreate \-\-type raid0 -[\fB\-\-stripes\fP \fINumber\fP \fB\-\-stripesize\fP \fISize\fP] +.B lvcreate --type raid0 +[\fB--stripes\fP \fINumber\fP \fB--stripesize\fP \fISize\fP] \fIVG\fP [\fIPVs\fP] .HP -.B \-\-stripes +.B --stripes specifies the number of devices to spread the LV across. .HP -.B \-\-stripesize +.B --stripesize specifies the size of each stripe in kilobytes. This is the amount of data that is written to one device before moving to the next. .P @@ -85,15 +85,15 @@ Also called mirroring, raid1 uses multiple devices to duplicate LV data. The LV data remains available if all but one of the devices fail. The minimum number of devices (i.e. sub LV pairs) required is 2. -.B lvcreate \-\-type raid1 -[\fB\-\-mirrors\fP \fINumber\fP] +.B lvcreate --type raid1 +[\fB--mirrors\fP \fINumber\fP] \fIVG\fP [\fIPVs\fP] .HP -.B \-\-mirrors +.B --mirrors specifies the number of mirror images in addition to the original LV -image, e.g. \-\-mirrors 1 means there are two images of the data, the +image, e.g. --mirrors 1 means there are two images of the data, the original and one mirror image. .P @@ -109,20 +109,20 @@ storing parity blocks. The LV data remains available if one device fails. The parity is used to recalculate data that is lost from a single device. The minimum number of devices required is 3. -.B lvcreate \-\-type raid4 -[\fB\-\-stripes\fP \fINumber\fP \fB\-\-stripesize\fP \fISize\fP] +.B lvcreate --type raid4 +[\fB--stripes\fP \fINumber\fP \fB--stripesize\fP \fISize\fP] \fIVG\fP [\fIPVs\fP] .HP -.B \-\-stripes +.B --stripes specifies the number of devices to use for LV data. This does not include the extra device lvm adds for storing parity blocks. A raid4 LV with \fINumber\fP stripes requires \fINumber\fP+1 devices. \fINumber\fP must be 2 or more. .HP -.B \-\-stripesize +.B --stripesize specifies the size of each stripe in kilobytes. This is the amount of data that is written to one device before moving to the next. .P @@ -130,7 +130,7 @@ data that is written to one device before moving to the next. \fIPVs\fP specifies the devices to use. If not specified, lvm will choose \fINumber\fP+1 separate devices. -raid4 is called non\-rotating parity because the parity blocks are always +raid4 is called non-rotating parity because the parity blocks are always stored on the same device. .SS raid5 @@ -143,20 +143,20 @@ a rotating pattern for performance reasons. The LV data remains available if one device fails. The parity is used to recalculate data that is lost from a single device. The minimum number of devices required is 3. -.B lvcreate \-\-type raid5 -[\fB\-\-stripes\fP \fINumber\fP \fB\-\-stripesize\fP \fISize\fP] +.B lvcreate --type raid5 +[\fB--stripes\fP \fINumber\fP \fB--stripesize\fP \fISize\fP] \fIVG\fP [\fIPVs\fP] .HP -.B \-\-stripes +.B --stripes specifies the number of devices to use for LV data. This does not include the extra device lvm adds for storing parity blocks. A raid5 LV with \fINumber\fP stripes requires \fINumber\fP+1 devices. \fINumber\fP must be 2 or more. .HP -.B \-\-stripesize +.B --stripesize specifies the size of each stripe in kilobytes. This is the amount of data that is written to one device before moving to the next. .P @@ -165,7 +165,7 @@ data that is written to one device before moving to the next. \fINumber\fP+1 separate devices. raid5 is called rotating parity because the parity blocks are placed on -different devices in a round\-robin sequence. There are variations of +different devices in a round-robin sequence. There are variations of raid5 with different algorithms for placing the parity blocks. The default variant is raid5_ls (raid5 left symmetric, which is a rotating parity 0 with data restart.) See \fBRAID5 variants\fP below. @@ -181,20 +181,20 @@ 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. -.B lvcreate \-\-type raid6 -[\fB\-\-stripes\fP \fINumber\fP \fB\-\-stripesize\fP \fISize\fP] +.B lvcreate --type raid6 +[\fB--stripes\fP \fINumber\fP \fB--stripesize\fP \fISize\fP] \fIVG\fP [\fIPVs\fP] .HP -.B \-\-stripes +.B --stripes specifies the number of devices to use for LV data. This does not include the extra two devices lvm adds for storing parity blocks. A raid6 LV with \fINumber\fP stripes requires \fINumber\fP+2 devices. \fINumber\fP must be 3 or more. .HP -.B \-\-stripesize +.B --stripesize specifies the size of each stripe in kilobytes. This is the amount of data that is written to one device before moving to the next. .P @@ -215,24 +215,24 @@ raid10 is a combination of raid1 and raid0, striping data across mirrored devices. LV data remains available if one or more devices remains in each mirror set. The minimum number of devices required is 4. -.B lvcreate \-\-type raid10 +.B lvcreate --type raid10 .RS -[\fB\-\-mirrors\fP \fINumberMirrors\fP] +[\fB--mirrors\fP \fINumberMirrors\fP] .br -[\fB\-\-stripes\fP \fINumberStripes\fP \fB\-\-stripesize\fP \fISize\fP] +[\fB--stripes\fP \fINumberStripes\fP \fB--stripesize\fP \fISize\fP] .br \fIVG\fP [\fIPVs\fP] .RE .HP -.B \-\-mirrors +.B --mirrors specifies the number of mirror images within each stripe. e.g. -\-\-mirrors 1 means there are two images of the data, the original and one +--mirrors 1 means there are two images of the data, the original and one mirror image. .HP -.B \-\-stripes +.B --stripes specifies the total number of devices to use in all raid1 images (not the number of raid1 devices to spread the LV across, even though that is the effective result). The number of devices in each raid1 mirror will be @@ -240,7 +240,7 @@ NumberStripes/(NumberMirrors+1), e.g. mirrors 1 and stripes 4 will stripe data across two raid1 mirrors, where each mirror is devices. .HP -.B \-\-stripesize +.B --stripesize specifies the size of each stripe in kilobytes. This is the amount of data that is written to one device before moving to the next. .P @@ -296,17 +296,17 @@ Scrubbing assumes that RAID metadata and bitmaps may be inaccurate, so it verifies all RAID metadata, LV data, and parity blocks. Scrubbing can find inconsistencies caused by hardware errors or degradation. These kinds of problems may be undetected by automatic synchronization which -excludes areas outside of the RAID write\-intent bitmap. +excludes areas outside of the RAID write-intent bitmap. The command to scrub a RAID LV can operate in two different modes: -.B lvchange \-\-syncaction +.B lvchange --syncaction .BR check | repair .IR VG / LV .HP .B check -Check mode is read\-only and only detects inconsistent areas in the RAID +Check mode is read-only and only detects inconsistent areas in the RAID LV, it does not correct them. .HP @@ -320,7 +320,7 @@ Scrubbing can consume a lot of bandwidth and slow down application I/O on the RAID LV. To control the I/O rate used for scrubbing, use: .HP -.B \-\-maxrecoveryrate +.B --maxrecoveryrate .BR \fIRate [ b | B | s | S | k | K | m | M | g | G ] .br Sets the maximum recovery rate for a RAID LV. \fIRate\fP is specified as @@ -329,7 +329,7 @@ then KiB/sec/device is assumed. Setting the recovery rate to \fB0\fP means it will be unbounded. .HP -.BR \-\-minrecoveryrate +.BR --minrecoveryrate .BR \fIRate [ b | B | s | S | k | K | m | M | g | G ] .br Sets the minimum recovery rate for a RAID LV. \fIRate\fP is specified as @@ -355,7 +355,7 @@ Also, if mismatches were found, the lvs attr field will display the letter .nf # lvs -o name,vgname,segtype,attr vg/lvol0 LV VG Type Attr - lvol0 vg raid1 Rwi\-a\-r\-m\- + lvol0 vg raid1 Rwi-a-r-m- .fi @@ -371,7 +371,7 @@ 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, -lvchange \-\-rebuild can be used in place of scrubbing to reconstruct the +lvchange --rebuild can be used in place of scrubbing to reconstruct the data on the bad device. Future developments might include: @@ -381,7 +381,7 @@ Allowing a user to choose the correct version of data during repair. Using a majority of devices to determine the correct version of data to use in a 3-way RAID1 or RAID6 LV. -Using a checksumming device to pin\-point when and where an error occurs, +Using a checksumming device to pin-point when and where an error occurs, allowing it to be rewritten. @@ -390,7 +390,7 @@ allowing it to be rewritten. An LV is often a combination of other hidden LVs called SubLVs. The SubLVs either use physical devices, or are built from other SubLVs themselves. SubLVs hold LV data blocks, RAID parity blocks, and RAID -metadata. SubLVs are generally hidden, so the lvs \-a option is required +metadata. SubLVs are generally hidden, so the lvs -a option is required to display them: .B lvs -a -o name,segtype,devices @@ -423,7 +423,7 @@ Each rimage SubLV holds a portion of LV data. No parity is used. No RAID metadata is used. .nf -lvcreate \-\-type raid0 \-\-stripes 2 \-\-name lvr0 ... +lvcreate --type raid0 --stripes 2 --name lvr0 ... lvs -a -o name,segtype,devices lvr0 raid0 lvr0_rimage_0(0),lvr0_rimage_1(0) @@ -437,7 +437,7 @@ Each rimage SubLV holds a complete copy of LV data. No parity is used. Each rmeta SubLV holds RAID metadata. .nf -lvcreate \-\-type raid1 \-\-mirrors 1 \-\-name lvr1 ... +lvcreate --type raid1 --mirrors 1 --name lvr1 ... lvs -a -o name,segtype,devices lvr1 raid1 lvr1_rimage_0(0),lvr1_rimage_1(0) @@ -453,7 +453,7 @@ Two rimage SubLVs each hold a portion of LV data and one rimage SubLV holds parity. Each rmeta SubLV holds RAID metadata. .nf -lvcreate \-\-type raid4 \-\-stripes 2 \-\-name lvr4 ... +lvcreate --type raid4 --stripes 2 --name lvr4 ... lvs -a -o name,segtype,devices lvr4 raid4 lvr4_rimage_0(0),\\ @@ -473,7 +473,7 @@ Three rimage SubLVs each hold a portion of LV data and parity. Each rmeta SubLV holds RAID metadata. .nf -lvcreate \-\-type raid5 \-\-stripes 2 \-\-name lvr5 ... +lvcreate --type raid5 --stripes 2 --name lvr5 ... lvs -a -o name,segtype,devices lvr5 raid5 lvr5_rimage_0(0),\\ @@ -493,7 +493,7 @@ Six rimage SubLVs each hold a portion of LV data and parity. Each rmeta SubLV holds RAID metadata. .nf -lvcreate \-\-type raid6 \-\-stripes 3 \-\-name lvr6 +lvcreate --type raid6 --stripes 3 --name lvr6 lvs -a -o name,segtype,devices lvr6 raid6 lvr6_rimage_0(0),\\ @@ -521,7 +521,7 @@ Four rimage SubLVs each hold a portion of LV data. No parity is used. Each rmeta SubLV holds RAID metadata. .nf -lvcreate \-\-type raid10 \-\-stripes 2 \-\-mirrors 1 \-\-name lvr10 +lvcreate --type raid10 --stripes 2 --mirrors 1 --name lvr10 lvs -a -o name,segtype,devices lvr10 raid10 lvr10_rimage_0(0),\\ @@ -568,7 +568,7 @@ is composed of a raid1 set, without LV data loss. .P -If a RAID LV is missing devices, or has other device\-related problems, lvs +If a RAID LV is missing devices, or has other device-related problems, lvs reports this in the health_status (and attr) fields: .B lvs -o name,lv_health_status @@ -596,11 +596,11 @@ See Most commands will also print a warning if a device is missing, e.g. .br .nf -WARNING: Device for PV uItL3Z\-wBME\-DQy0-... not found or rejected ... +WARNING: Device for PV uItL3Z-wBME-DQy0-... not found or rejected ... .fi This warning will go away if the device returns or is removed from the -VG (see \fBvgreduce \-\-removemissing\fP). +VG (see \fBvgreduce --removemissing\fP). .SS Activating an LV with missing devices @@ -608,7 +608,7 @@ VG (see \fBvgreduce \-\-removemissing\fP). A RAID LV that is missing devices may be activated or not, depending on the "activation mode" used in lvchange: -.B lvchange \-ay \-\-activationmode +.B lvchange -ay --activationmode .RB { complete | degraded | partial } .IR VG / LV @@ -634,32 +634,32 @@ controls the activation mode when not specified by the command. The default value is printed by: .nf -lvmconfig \-\-type default activation/activation_mode +lvmconfig --type default activation/activation_mode .fi .SS Replacing Devices Devices in a RAID LV can be replaced by other devices in the VG. When replacing devices that are no longer visible on the system, use lvconvert -\-\-repair. When replacing devices that are still visible, use lvconvert -\-\-replace. The repair command will attempt to restore the same number +--repair. When replacing devices that are still visible, use lvconvert +--replace. The repair command will attempt to restore the same number of data LVs that were previously in the LV. The replace option can be repeated to replace multiple PVs. Replacement devices can be optionally listed with either option. -.B lvconvert \-\-repair +.B lvconvert --repair .IR VG / LV [\fINewPVs\fP] -.B lvconvert \-\-replace +.B lvconvert --replace \fIOldPV\fP .IR VG / LV [\fINewPV\fP] .B lvconvert -.B \-\-replace +.B --replace \fIOldPV1\fP -.B \-\-replace +.B --replace \fIOldPV2\fP ... .IR VG / LV @@ -677,24 +677,24 @@ Restoring a device will usually require at least partial synchronization in the RAID LV operating in degraded mode until it is reactivated. Use the lvchange command to refresh an LV: -.B lvchange \-\-refresh +.B lvchange --refresh .IR VG / LV .nf # lvs -o name,vgname,segtype,attr,size vg LV VG Type Attr LSize - raid1 vg raid1 Rwi\-a\-r\-r\- 100.00g + raid1 vg raid1 Rwi-a-r-r- 100.00g -# lvchange \-\-refresh vg/raid1 +# lvchange --refresh vg/raid1 # lvs -o name,vgname,segtype,attr,size vg LV VG Type Attr LSize - raid1 vg raid1 Rwi\-a\-r\-\-\- 100.00g + raid1 vg raid1 Rwi-a-r--- 100.00g .fi .SS Automatic repair -If a device in a RAID LV fails, device\-mapper in the kernel notifies the +If a device in a RAID LV fails, device-mapper in the kernel notifies the .BR dmeventd (8) monitoring process (see \fBMonitoring\fP). dmeventd can be configured to automatically respond using: @@ -719,7 +719,7 @@ synchronization is started. The specific command run by dmeventd to warn or repair is: .br -.B lvconvert \-\-repair \-\-use\-policies +.B lvconvert --repair --use-policies .IR VG / LV @@ -735,7 +735,7 @@ This should be rare, and can be detected (see \fBScrubbing\fP). If specific PVs in a RAID LV are known to have corrupt data, the data on those PVs can be reconstructed with: -.B lvchange \-\-rebuild PV +.B lvchange --rebuild PV .IR VG / LV The rebuild option can be repeated with different PVs to replace the data @@ -746,7 +746,7 @@ on multiple PVs. When a RAID LV is activated the \fBdmeventd\fP(8) process is started to monitor the health of the LV. Various events detected in the kernel can -cause a notification to be sent from device\-mapper to the monitoring +cause a notification to be sent from device-mapper to the monitoring process, including device failures and synchronization completion (e.g. for initialization or scrubbing). @@ -781,7 +781,7 @@ A RAID1 LV can be tuned so that certain devices are avoided for reading while all devices are still written to. .B lvchange -.BR \-\- [ raid ] writemostly +.BR -- [ raid ] writemostly .BR \fIPhysicalVolume [ : { y | n | t }] .IR VG / LV @@ -808,7 +808,7 @@ further writes become synchronous. When synchronous, a write to the LV will not complete until writes to all the mirror images are complete. .B lvchange -.BR \-\- [ raid ] writebehind +.BR -- [ raid ] writebehind .IR IOCount .IR VG / LV @@ -827,7 +827,7 @@ raid5 to raid6. Changing the RAID level is usually done to increase or decrease resilience to device failures or to restripe LVs. This is done using lvconvert and specifying the new RAID level as the LV type: -.B lvconvert \-\-type +.B lvconvert --type .I RaidLevel \fIVG\fP/\fILV\fP [\fIPVs\fP] @@ -850,7 +850,7 @@ striped volume results in raid4/5/6. .P Unnatural conversions that are not recommended include converting between -striped and non\-striped types. This is because file systems often +striped and non-striped types. This is because file systems often optimize I/O patterns based on device striping values. If those values change, it can decrease performance. @@ -865,7 +865,7 @@ blocks to a new image on a new device. Converting to a parity RAID level requires reading all LV data blocks, calculating parity, and writing the new parity blocks. Synchronization can take a long time and degrade performance (rate controls also apply to conversion, see -\fB\-\-maxrecoveryrate\fP.) +\fB--maxrecoveryrate\fP.) Warning: though it is possible to create \fBstriped\fP LVs with up to 128 stripes, a maximum of 64 stripes can be converted to \fBraid0\fP, 63 to \fBraid4/5\fP and @@ -906,7 +906,7 @@ between striped/raid0 and raid10. LV Type LSize lv linear 300.00g -# lvconvert \-\-type raid1 \-\-mirrors 1 vg/lv +# lvconvert --type raid1 --mirrors 1 vg/lv # lvs -a -o name,segtype,size vg LV Type LSize @@ -938,7 +938,7 @@ between striped and raid4. LV Type LSize lv linear 300.00g -# lvconvert \-\-type raid1 \-\-mirrors 1 vg/lv +# lvconvert --type raid1 --mirrors 1 vg/lv # lvs -a -o name,segtype,size vg LV Type LSize @@ -959,7 +959,7 @@ between striped and raid4. [lv_mimage_1] linear 100.00g [lv_mlog] linear 3.00m -# lvconvert \-\-type raid1 vg/lv +# lvconvert --type raid1 vg/lv # lvs -a -o name,segtype,size vg LV Type LSize @@ -980,7 +980,7 @@ Start with a linear LV: Convert the linear LV to raid1 with three images (original linear image plus 2 mirror images): -# lvconvert \-\-type raid1 \-\-mirrors 2 vg/lv +# lvconvert --type raid1 --mirrors 2 vg/lv .fi 4. Converting an LV from \fBstriped\fP (with 4 stripes) to \fBraid6_nc\fP. @@ -988,11 +988,11 @@ Convert the linear LV to raid1 with three images .nf Start with a striped LV: -# lvcreate \-\-stripes 4 -L64M -n lv vg +# lvcreate --stripes 4 -L64M -n lv vg Convert the striped LV to raid6_n_6: -# lvconvert \-\-type raid6 vg/lv +# lvconvert --type raid6 vg/lv # lvs -a -o lv_name,segtype,sync_percent,data_copies LV Type Cpy%Sync #Cpy @@ -1061,7 +1061,7 @@ traditional RAID6. [lv_rmeta_4] linear [lv_rmeta_5] linear -# lvconvert \-\-type raid6_nr vg/lv +# lvconvert --type raid6_nr vg/lv # lvs -a -o lv_name,segtype,sync_percent,data_copies LV Type Cpy%Sync #Cpy @@ -1085,7 +1085,7 @@ traditional RAID6. .fi The DataLVs are larger (additional segment in each) which provides space -for out\-of\-place reshaping. The result is: +for out-of-place reshaping. The result is: .nf # lvs -a -o lv_name,segtype,seg_pe_ranges,dataoffset @@ -1106,15 +1106,15 @@ for out\-of\-place reshaping. The result is: [lv_rmeta_3] linear /dev/sdac:0-0 .fi -All segments with PE ranges '33-33' provide the out\-of\-place reshape space. +All segments with PE ranges '33-33' provide the out-of-place reshape space. The dataoffset column shows that the data was moved from initial offset 0 to 2048 sectors on each component DataLV. For performance reasons the raid6_nr RaidLV can be restriped. -Convert it from 3-way striped to 5-way\-striped. +Convert it from 3-way striped to 5-way-striped. .nf -# lvconvert \-\-stripes 5 -y tb/lv +# lvconvert --stripes 5 -y tb/lv Using default stripesize 64.00 KiB. WARNING: Adding stripes to active logical volume tb/lv will grow it from 99 to 165 extents! Run "lvresize -l99 tb/lv" to shrink it or use the additional capacity. @@ -1122,67 +1122,67 @@ Convert it from 3-way striped to 5-way\-striped. # lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert - root fedora -wi\-ao\-\-\-\- 15.00g - swap fedora -wi\-ao\-\-\-\- 3.99g - lv tb rwi\-a\-r\-s\- 652.00m 52.94 + root fedora -wi-ao---- 15.00g + swap fedora -wi-ao---- 3.99g + lv tb rwi-a-r-s- 652.00m 52.94 # lvs -a -o lv_name,attr,segtype,seg_pe_ranges,dataoffset tb LV Attr Type PE Ranges DOff - lv rwi\-a\-r\-\-\- raid6_nr lv_rimage_0:0-33 lv_rimage_1:0-33 lv_rimage_2:0-33 ... lv_rimage_5:0-33 lv_rimage_6:0-33 0 - [lv_rimage_0] iwi\-aor\-\-\- linear /dev/sda:0-32 0 - [lv_rimage_0] iwi\-aor\-\-\- linear /dev/sda:34-34 - [lv_rimage_1] iwi\-aor\-\-\- linear /dev/sdaa:0-32 0 - [lv_rimage_1] iwi\-aor\-\-\- linear /dev/sdaa:34-34 - [lv_rimage_2] iwi\-aor\-\-\- linear /dev/sdab:0-32 0 - [lv_rimage_2] iwi\-aor\-\-\- linear /dev/sdab:34-34 - [lv_rimage_3] iwi\-aor\-\-\- linear /dev/sdac:1-34 0 - [lv_rimage_4] iwi\-aor\-\-\- linear /dev/sdad:1-34 0 - [lv_rimage_5] iwi\-aor\-\-\- linear /dev/sdae:1-34 0 - [lv_rimage_6] iwi\-aor\-\-\- linear /dev/sdaf:1-34 0 - [lv_rmeta_0] ewi\-aor\-\-\- linear /dev/sda:33-33 - [lv_rmeta_1] ewi\-aor\-\-\- linear /dev/sdaa:33-33 - [lv_rmeta_2] ewi\-aor\-\-\- linear /dev/sdab:33-33 - [lv_rmeta_3] ewi\-aor\-\-\- linear /dev/sdac:0-0 - [lv_rmeta_4] ewi\-aor\-\-\- linear /dev/sdad:0-0 - [lv_rmeta_5] ewi\-aor\-\-\- linear /dev/sdae:0-0 - [lv_rmeta_6] ewi\-aor\-\-\- linear /dev/sdaf:0-0 + lv rwi-a-r--- raid6_nr lv_rimage_0:0-33 lv_rimage_1:0-33 lv_rimage_2:0-33 ... lv_rimage_5:0-33 lv_rimage_6:0-33 0 + [lv_rimage_0] iwi-aor--- linear /dev/sda:0-32 0 + [lv_rimage_0] iwi-aor--- linear /dev/sda:34-34 + [lv_rimage_1] iwi-aor--- linear /dev/sdaa:0-32 0 + [lv_rimage_1] iwi-aor--- linear /dev/sdaa:34-34 + [lv_rimage_2] iwi-aor--- linear /dev/sdab:0-32 0 + [lv_rimage_2] iwi-aor--- linear /dev/sdab:34-34 + [lv_rimage_3] iwi-aor--- linear /dev/sdac:1-34 0 + [lv_rimage_4] iwi-aor--- linear /dev/sdad:1-34 0 + [lv_rimage_5] iwi-aor--- linear /dev/sdae:1-34 0 + [lv_rimage_6] iwi-aor--- linear /dev/sdaf:1-34 0 + [lv_rmeta_0] ewi-aor--- linear /dev/sda:33-33 + [lv_rmeta_1] ewi-aor--- linear /dev/sdaa:33-33 + [lv_rmeta_2] ewi-aor--- linear /dev/sdab:33-33 + [lv_rmeta_3] ewi-aor--- linear /dev/sdac:0-0 + [lv_rmeta_4] ewi-aor--- linear /dev/sdad:0-0 + [lv_rmeta_5] ewi-aor--- linear /dev/sdae:0-0 + [lv_rmeta_6] ewi-aor--- linear /dev/sdaf:0-0 .fi Stripes also can be removed from raid5 and 6. -Convert the 5-way striped raid6_nr LV to 4-way\-striped. +Convert the 5-way striped raid6_nr LV to 4-way-striped. The force option needs to be used, because removing stripes (i.e. image SubLVs) from a RaidLV will shrink its size. .nf -# lvconvert \-\-stripes 4 \-\-force -y tb/lv +# lvconvert --stripes 4 --force -y tb/lv Using default stripesize 64.00 KiB. WARNING: Removing stripes from active logical volume tb/lv will shrink it from 660.00 MiB to 528.00 MiB! THIS MAY DESTROY (PARTS OF) YOUR DATA! If that leaves the logical volume larger than 206 extents due to stripe rounding, you may want to grow the content afterwards (filesystem etc.) - WARNING: too remove freed stripes after the conversion has finished, you have to run "lvconvert \-\-stripes 4 tb/lv" + WARNING: too remove freed stripes after the conversion has finished, you have to run "lvconvert --stripes 4 tb/lv" Logical volume tb/lv successfully converted. # lvs -a -o lv_name,attr,segtype,seg_pe_ranges,dataoffset tb LV Attr Type PE Ranges DOff - lv rwi\-a\-r\-s\- raid6_nr lv_rimage_0:0-33 lv_rimage_1:0-33 lv_rimage_2:0-33 ... lv_rimage_5:0-33 lv_rimage_6:0-33 0 - [lv_rimage_0] Iwi\-aor\-\-\- linear /dev/sda:0-32 0 - [lv_rimage_0] Iwi\-aor\-\-\- linear /dev/sda:34-34 - [lv_rimage_1] Iwi\-aor\-\-\- linear /dev/sdaa:0-32 0 - [lv_rimage_1] Iwi\-aor\-\-\- linear /dev/sdaa:34-34 - [lv_rimage_2] Iwi\-aor\-\-\- linear /dev/sdab:0-32 0 - [lv_rimage_2] Iwi\-aor\-\-\- linear /dev/sdab:34-34 - [lv_rimage_3] Iwi\-aor\-\-\- linear /dev/sdac:1-34 0 - [lv_rimage_4] Iwi\-aor\-\-\- linear /dev/sdad:1-34 0 - [lv_rimage_5] Iwi\-aor\-\-\- linear /dev/sdae:1-34 0 - [lv_rimage_6] Iwi\-aor\-R\- linear /dev/sdaf:1-34 0 - [lv_rmeta_0] ewi\-aor\-\-\- linear /dev/sda:33-33 - [lv_rmeta_1] ewi\-aor\-\-\- linear /dev/sdaa:33-33 - [lv_rmeta_2] ewi\-aor\-\-\- linear /dev/sdab:33-33 - [lv_rmeta_3] ewi\-aor\-\-\- linear /dev/sdac:0-0 - [lv_rmeta_4] ewi\-aor\-\-\- linear /dev/sdad:0-0 - [lv_rmeta_5] ewi\-aor\-\-\- linear /dev/sdae:0-0 - [lv_rmeta_6] ewi\-aor\-R\- linear /dev/sdaf:0-0 + lv rwi-a-r-s- raid6_nr lv_rimage_0:0-33 lv_rimage_1:0-33 lv_rimage_2:0-33 ... lv_rimage_5:0-33 lv_rimage_6:0-33 0 + [lv_rimage_0] Iwi-aor--- linear /dev/sda:0-32 0 + [lv_rimage_0] Iwi-aor--- linear /dev/sda:34-34 + [lv_rimage_1] Iwi-aor--- linear /dev/sdaa:0-32 0 + [lv_rimage_1] Iwi-aor--- linear /dev/sdaa:34-34 + [lv_rimage_2] Iwi-aor--- linear /dev/sdab:0-32 0 + [lv_rimage_2] Iwi-aor--- linear /dev/sdab:34-34 + [lv_rimage_3] Iwi-aor--- linear /dev/sdac:1-34 0 + [lv_rimage_4] Iwi-aor--- linear /dev/sdad:1-34 0 + [lv_rimage_5] Iwi-aor--- linear /dev/sdae:1-34 0 + [lv_rimage_6] Iwi-aor-R- linear /dev/sdaf:1-34 0 + [lv_rmeta_0] ewi-aor--- linear /dev/sda:33-33 + [lv_rmeta_1] ewi-aor--- linear /dev/sdaa:33-33 + [lv_rmeta_2] ewi-aor--- linear /dev/sdab:33-33 + [lv_rmeta_3] ewi-aor--- linear /dev/sdac:0-0 + [lv_rmeta_4] ewi-aor--- linear /dev/sdad:0-0 + [lv_rmeta_5] ewi-aor--- linear /dev/sdae:0-0 + [lv_rmeta_6] ewi-aor-R- linear /dev/sdaf:0-0 .fi The 's' in column 9 of the attribute field shows the RaidLV is still reshaping. @@ -1191,7 +1191,7 @@ The 'R' in the same column of the attribute field shows the freed image Sub LVs .nf # lvs -o lv_name,attr,segtype,seg_pe_ranges,dataoffset tb LV Attr Type PE Ranges DOff - lv rwi\-a\-r\-R\- raid6_nr lv_rimage_0:0-33 lv_rimage_1:0-33 lv_rimage_2:0-33 ... lv_rimage_5:0-33 lv_rimage_6:0-33 8192 + lv rwi-a-r-R- raid6_nr lv_rimage_0:0-33 lv_rimage_1:0-33 lv_rimage_2:0-33 ... lv_rimage_5:0-33 lv_rimage_6:0-33 8192 .fi Now that the reshape is finished the 'R' atribute on the RaidLV shows images can be removed. @@ -1199,87 +1199,87 @@ Now that the reshape is finished the 'R' atribute on the RaidLV shows images can .nf # lvs -o lv_name,attr,segtype,seg_pe_ranges,dataoffset tb LV Attr Type PE Ranges DOff - lv rwi\-a\-r\-R\- raid6_nr lv_rimage_0:0-33 lv_rimage_1:0-33 lv_rimage_2:0-33 ... lv_rimage_5:0-33 lv_rimage_6:0-33 8192 + lv rwi-a-r-R- raid6_nr lv_rimage_0:0-33 lv_rimage_1:0-33 lv_rimage_2:0-33 ... lv_rimage_5:0-33 lv_rimage_6:0-33 8192 .fi -This is achieved by repeating the command ("lvconvert \-\-stripes 4 tb/lv" would be sufficient). +This is achieved by repeating the command ("lvconvert --stripes 4 tb/lv" would be sufficient). .nf -# lvconvert \-\-stripes 4 \-\-force -y tb/lv +# lvconvert --stripes 4 --force -y tb/lv Using default stripesize 64.00 KiB. Logical volume tb/lv successfully converted. # lvs -a -o lv_name,attr,segtype,seg_pe_ranges,dataoffset tb LV Attr Type PE Ranges DOff - lv rwi\-a\-r\-\-\- raid6_nr lv_rimage_0:0-33 lv_rimage_1:0-33 lv_rimage_2:0-33 ... lv_rimage_5:0-33 8192 - [lv_rimage_0] iwi\-aor\-\-\- linear /dev/sda:0-32 8192 - [lv_rimage_0] iwi\-aor\-\-\- linear /dev/sda:34-34 - [lv_rimage_1] iwi\-aor\-\-\- linear /dev/sdaa:0-32 8192 - [lv_rimage_1] iwi\-aor\-\-\- linear /dev/sdaa:34-34 - [lv_rimage_2] iwi\-aor\-\-\- linear /dev/sdab:0-32 8192 - [lv_rimage_2] iwi\-aor\-\-\- linear /dev/sdab:34-34 - [lv_rimage_3] iwi\-aor\-\-\- linear /dev/sdac:1-34 8192 - [lv_rimage_4] iwi\-aor\-\-\- linear /dev/sdad:1-34 8192 - [lv_rimage_5] iwi\-aor\-\-\- linear /dev/sdae:1-34 8192 - [lv_rmeta_0] ewi\-aor\-\-\- linear /dev/sda:33-33 - [lv_rmeta_1] ewi\-aor\-\-\- linear /dev/sdaa:33-33 - [lv_rmeta_2] ewi\-aor\-\-\- linear /dev/sdab:33-33 - [lv_rmeta_3] ewi\-aor\-\-\- linear /dev/sdac:0-0 - [lv_rmeta_4] ewi\-aor\-\-\- linear /dev/sdad:0-0 - [lv_rmeta_5] ewi\-aor\-\-\- linear /dev/sdae:0-0 + lv rwi-a-r--- raid6_nr lv_rimage_0:0-33 lv_rimage_1:0-33 lv_rimage_2:0-33 ... lv_rimage_5:0-33 8192 + [lv_rimage_0] iwi-aor--- linear /dev/sda:0-32 8192 + [lv_rimage_0] iwi-aor--- linear /dev/sda:34-34 + [lv_rimage_1] iwi-aor--- linear /dev/sdaa:0-32 8192 + [lv_rimage_1] iwi-aor--- linear /dev/sdaa:34-34 + [lv_rimage_2] iwi-aor--- linear /dev/sdab:0-32 8192 + [lv_rimage_2] iwi-aor--- linear /dev/sdab:34-34 + [lv_rimage_3] iwi-aor--- linear /dev/sdac:1-34 8192 + [lv_rimage_4] iwi-aor--- linear /dev/sdad:1-34 8192 + [lv_rimage_5] iwi-aor--- linear /dev/sdae:1-34 8192 + [lv_rmeta_0] ewi-aor--- linear /dev/sda:33-33 + [lv_rmeta_1] ewi-aor--- linear /dev/sdaa:33-33 + [lv_rmeta_2] ewi-aor--- linear /dev/sdab:33-33 + [lv_rmeta_3] ewi-aor--- linear /dev/sdac:0-0 + [lv_rmeta_4] ewi-aor--- linear /dev/sdad:0-0 + [lv_rmeta_5] ewi-aor--- linear /dev/sdae:0-0 # lvs -a -o lv_name,attr,segtype,reshapelen tb LV Attr Type RSize - lv rwi\-a\-r\-\-\- raid6_nr 24.00m - [lv_rimage_0] iwi\-aor\-\-\- linear 4.00m - [lv_rimage_0] iwi\-aor\-\-\- linear - [lv_rimage_1] iwi\-aor\-\-\- linear 4.00m - [lv_rimage_1] iwi\-aor\-\-\- linear - [lv_rimage_2] iwi\-aor\-\-\- linear 4.00m - [lv_rimage_2] iwi\-aor\-\-\- linear - [lv_rimage_3] iwi\-aor\-\-\- linear 4.00m - [lv_rimage_4] iwi\-aor\-\-\- linear 4.00m - [lv_rimage_5] iwi\-aor\-\-\- linear 4.00m - [lv_rmeta_0] ewi\-aor\-\-\- linear - [lv_rmeta_1] ewi\-aor\-\-\- linear - [lv_rmeta_2] ewi\-aor\-\-\- linear - [lv_rmeta_3] ewi\-aor\-\-\- linear - [lv_rmeta_4] ewi\-aor\-\-\- linear - [lv_rmeta_5] ewi\-aor\-\-\- linear + lv rwi-a-r--- raid6_nr 24.00m + [lv_rimage_0] iwi-aor--- linear 4.00m + [lv_rimage_0] iwi-aor--- linear + [lv_rimage_1] iwi-aor--- linear 4.00m + [lv_rimage_1] iwi-aor--- linear + [lv_rimage_2] iwi-aor--- linear 4.00m + [lv_rimage_2] iwi-aor--- linear + [lv_rimage_3] iwi-aor--- linear 4.00m + [lv_rimage_4] iwi-aor--- linear 4.00m + [lv_rimage_5] iwi-aor--- linear 4.00m + [lv_rmeta_0] ewi-aor--- linear + [lv_rmeta_1] ewi-aor--- linear + [lv_rmeta_2] ewi-aor--- linear + [lv_rmeta_3] ewi-aor--- linear + [lv_rmeta_4] ewi-aor--- linear + [lv_rmeta_5] ewi-aor--- linear .fi If the reshape space shall be removed any lvconvert command not changing the layout can be used: .nf -# lvconvert \-\-stripes 4 tb/lv +# lvconvert --stripes 4 tb/lv Using default stripesize 64.00 KiB. No change in RAID LV tb/lv layout, freeing reshape space. Logical volume tb/lv successfully converted. # lvs -a -o lv_name,attr,segtype,reshapelen tb LV Attr Type RSize - lv rwi\-a\-r\-\-\- raid6_nr 0 - [lv_rimage_0] iwi\-aor\-\-\- linear 0 - [lv_rimage_0] iwi\-aor\-\-\- linear - [lv_rimage_1] iwi\-aor\-\-\- linear 0 - [lv_rimage_1] iwi\-aor\-\-\- linear - [lv_rimage_2] iwi\-aor\-\-\- linear 0 - [lv_rimage_2] iwi\-aor\-\-\- linear - [lv_rimage_3] iwi\-aor\-\-\- linear 0 - [lv_rimage_4] iwi\-aor\-\-\- linear 0 - [lv_rimage_5] iwi\-aor\-\-\- linear 0 - [lv_rmeta_0] ewi\-aor\-\-\- linear - [lv_rmeta_1] ewi\-aor\-\-\- linear - [lv_rmeta_2] ewi\-aor\-\-\- linear - [lv_rmeta_3] ewi\-aor\-\-\- linear - [lv_rmeta_4] ewi\-aor\-\-\- linear - [lv_rmeta_5] ewi\-aor\-\-\- linear + lv rwi-a-r--- raid6_nr 0 + [lv_rimage_0] iwi-aor--- linear 0 + [lv_rimage_0] iwi-aor--- linear + [lv_rimage_1] iwi-aor--- linear 0 + [lv_rimage_1] iwi-aor--- linear + [lv_rimage_2] iwi-aor--- linear 0 + [lv_rimage_2] iwi-aor--- linear + [lv_rimage_3] iwi-aor--- linear 0 + [lv_rimage_4] iwi-aor--- linear 0 + [lv_rimage_5] iwi-aor--- linear 0 + [lv_rmeta_0] ewi-aor--- linear + [lv_rmeta_1] ewi-aor--- linear + [lv_rmeta_2] ewi-aor--- linear + [lv_rmeta_3] ewi-aor--- linear + [lv_rmeta_4] ewi-aor--- linear + [lv_rmeta_5] ewi-aor--- linear .fi In case the RaidLV should be converted to striped: .nf -# lvconvert \-\-type striped tb/lv +# lvconvert --type striped tb/lv Unable to convert LV tb/lv from raid6_nr to striped. Converting tb/lv from raid6_nr is directly possible to the following layouts: raid6_nc @@ -1290,55 +1290,55 @@ In case the RaidLV should be converted to striped: raid6_rs_6 raid6_n_6 -# lvconvert \-\-type raid6_n_6 +# lvconvert --type raid6_n_6 Using default stripesize 64.00 KiB. Converting raid6_nr LV tb/lv to raid6_n_6. Are you sure you want to convert raid6_nr LV tb/lv? [y/n]: y Logical volume tb/lv successfully converted. -# lvconvert -y \-\-type striped tb/lv +# lvconvert -y --type striped tb/lv Logical volume tb/lv successfully converted. [root@vm46 ~]# lvs -o lv_name,attr,segtype,seg_pe_ranges,dataoffset tb LV Attr Type PE Ranges DOff - lv -wi\-a\-\-\-\-\- striped /dev/sda:2-32 /dev/sdaa:2-32 /dev/sdab:2-32 /dev/sdac:3-33 - lv -wi\-a\-\-\-\-\- striped /dev/sda:34-35 /dev/sdaa:34-35 /dev/sdab:34-35 /dev/sdac:34-35 + lv -wi-a----- striped /dev/sda:2-32 /dev/sdaa:2-32 /dev/sdab:2-32 /dev/sdac:3-33 + lv -wi-a----- striped /dev/sda:34-35 /dev/sdaa:34-35 /dev/sdab:34-35 /dev/sdac:34-35 .fi From striped we can convert to raid10 .nf -# lvconvert -y \-\-type raid10 tb/lv +# lvconvert -y --type raid10 tb/lv Using default stripesize 64.00 KiB. Logical volume tb/lv successfully converted. # lvs -o lv_name,attr,segtype,seg_pe_ranges,dataoffset tb LV Attr Type PE Ranges DOff - lv rwi\-a\-r\-\-\- raid10 lv_rimage_0:0-32 lv_rimage_4:0-32 lv_rimage_1:0-32 ... lv_rimage_3:0-32 lv_rimage_7:0-32 0 + lv rwi-a-r--- raid10 lv_rimage_0:0-32 lv_rimage_4:0-32 lv_rimage_1:0-32 ... lv_rimage_3:0-32 lv_rimage_7:0-32 0 # lvs -a -o lv_name,attr,segtype,seg_pe_ranges,dataoffset tb WARNING: Cannot find matching striped segment for tb/lv_rimage_3. LV Attr Type PE Ranges DOff - lv rwi\-a\-r\-\-\- raid10 lv_rimage_0:0-32 lv_rimage_4:0-32 lv_rimage_1:0-32 ... lv_rimage_3:0-32 lv_rimage_7:0-32 0 - [lv_rimage_0] iwi\-aor\-\-\- linear /dev/sda:2-32 0 - [lv_rimage_0] iwi\-aor\-\-\- linear /dev/sda:34-35 - [lv_rimage_1] iwi\-aor\-\-\- linear /dev/sdaa:2-32 0 - [lv_rimage_1] iwi\-aor\-\-\- linear /dev/sdaa:34-35 - [lv_rimage_2] iwi\-aor\-\-\- linear /dev/sdab:2-32 0 - [lv_rimage_2] iwi\-aor\-\-\- linear /dev/sdab:34-35 - [lv_rimage_3] iwi\-XXr\-\-\- linear /dev/sdac:3-35 0 - [lv_rimage_4] iwi\-aor\-\-\- linear /dev/sdad:1-33 0 - [lv_rimage_5] iwi\-aor\-\-\- linear /dev/sdae:1-33 0 - [lv_rimage_6] iwi\-aor\-\-\- linear /dev/sdaf:1-33 0 - [lv_rimage_7] iwi\-aor\-\-\- linear /dev/sdag:1-33 0 - [lv_rmeta_0] ewi\-aor\-\-\- linear /dev/sda:0-0 - [lv_rmeta_1] ewi\-aor\-\-\- linear /dev/sdaa:0-0 - [lv_rmeta_2] ewi\-aor\-\-\- linear /dev/sdab:0-0 - [lv_rmeta_3] ewi\-aor\-\-\- linear /dev/sdac:0-0 - [lv_rmeta_4] ewi\-aor\-\-\- linear /dev/sdad:0-0 - [lv_rmeta_5] ewi\-aor\-\-\- linear /dev/sdae:0-0 - [lv_rmeta_6] ewi\-aor\-\-\- linear /dev/sdaf:0-0 - [lv_rmeta_7] ewi\-aor\-\-\- linear /dev/sdag:0-0 + lv rwi-a-r--- raid10 lv_rimage_0:0-32 lv_rimage_4:0-32 lv_rimage_1:0-32 ... lv_rimage_3:0-32 lv_rimage_7:0-32 0 + [lv_rimage_0] iwi-aor--- linear /dev/sda:2-32 0 + [lv_rimage_0] iwi-aor--- linear /dev/sda:34-35 + [lv_rimage_1] iwi-aor--- linear /dev/sdaa:2-32 0 + [lv_rimage_1] iwi-aor--- linear /dev/sdaa:34-35 + [lv_rimage_2] iwi-aor--- linear /dev/sdab:2-32 0 + [lv_rimage_2] iwi-aor--- linear /dev/sdab:34-35 + [lv_rimage_3] iwi-XXr--- linear /dev/sdac:3-35 0 + [lv_rimage_4] iwi-aor--- linear /dev/sdad:1-33 0 + [lv_rimage_5] iwi-aor--- linear /dev/sdae:1-33 0 + [lv_rimage_6] iwi-aor--- linear /dev/sdaf:1-33 0 + [lv_rimage_7] iwi-aor--- linear /dev/sdag:1-33 0 + [lv_rmeta_0] ewi-aor--- linear /dev/sda:0-0 + [lv_rmeta_1] ewi-aor--- linear /dev/sdaa:0-0 + [lv_rmeta_2] ewi-aor--- linear /dev/sdab:0-0 + [lv_rmeta_3] ewi-aor--- linear /dev/sdac:0-0 + [lv_rmeta_4] ewi-aor--- linear /dev/sdad:0-0 + [lv_rmeta_5] ewi-aor--- linear /dev/sdae:0-0 + [lv_rmeta_6] ewi-aor--- linear /dev/sdaf:0-0 + [lv_rmeta_7] ewi-aor--- linear /dev/sdag:0-0 .fi raid10 allows to add stripes but can't remove them. @@ -1353,7 +1353,7 @@ We start with the linear LV. .nf # lvs -aoname,attr,size,segtype,syncpercent,datastripes,stripesize,reshapelenle,devices vg LV Attr LSize Type Cpy%Sync #DStr Stripe RSize Devices - lv -wi\-a\-\-\-\-\- 128.00m linear 1 0 /dev/sda(0) + lv -wi-a----- 128.00m linear 1 0 /dev/sda(0) .fi Then convert it to a 2-way raid1. @@ -1364,11 +1364,11 @@ Then convert it to a 2-way raid1. # lvs -aoname,attr,size,segtype,syncpercent,datastripes,stripesize,reshapelenle,devices vg LV Attr LSize Type Cpy%Sync #DStr Stripe RSize Devices - lv rwi\-a\-r\-\-\- 128.00m raid1 100.00 2 0 lv_rimage_0(0),lv_rimage_1(0) - [lv_rimage_0] iwi\-aor\-\-\- 128.00m linear 1 0 /dev/sda(0) - [lv_rimage_1] iwi\-aor\-\-\- 128.00m linear 1 0 /dev/sdhx(1) - [lv_rmeta_0] ewi\-aor\-\-\- 4.00m linear 1 0 /dev/sda(32) - [lv_rmeta_1] ewi\-aor\-\-\- 4.00m linear 1 0 /dev/sdhx(0) + lv rwi-a-r--- 128.00m raid1 100.00 2 0 lv_rimage_0(0),lv_rimage_1(0) + [lv_rimage_0] iwi-aor--- 128.00m linear 1 0 /dev/sda(0) + [lv_rimage_1] iwi-aor--- 128.00m linear 1 0 /dev/sdhx(1) + [lv_rmeta_0] ewi-aor--- 4.00m linear 1 0 /dev/sda(32) + [lv_rmeta_1] ewi-aor--- 4.00m linear 1 0 /dev/sdhx(0) .fi Once the raid1 LV is fully synchronized we convert it to raid5_n (only 2-way raid1 @@ -1377,17 +1377,17 @@ SubLVs at the end and can be converted to striped directly without any additiona conversion. .nf -# lvconvert -y \-\-ty raid5_n vg/lv +# lvconvert -y --ty raid5_n vg/lv Using default stripesize 64.00 KiB. Logical volume vg/lv successfully converted. # lvs -aoname,attr,size,segtype,syncpercent,datastripes,stripesize,reshapelenle,devices vg LV Attr LSize Type Cpy%Sync #DStr Stripe RSize Devices - lv rwi\-a\-r\-\-\- 128.00m raid5_n 100.00 1 64.00k 0 lv_rimage_0(0),lv_rimage_1(0) - [lv_rimage_0] iwi\-aor\-\-\- 128.00m linear 1 0 0 /dev/sda(0) - [lv_rimage_1] iwi\-aor\-\-\- 128.00m linear 1 0 0 /dev/sdhx(1) - [lv_rmeta_0] ewi\-aor\-\-\- 4.00m linear 1 0 /dev/sda(32) - [lv_rmeta_1] ewi\-aor\-\-\- 4.00m linear 1 0 /dev/sdhx(0) + lv rwi-a-r--- 128.00m raid5_n 100.00 1 64.00k 0 lv_rimage_0(0),lv_rimage_1(0) + [lv_rimage_0] iwi-aor--- 128.00m linear 1 0 0 /dev/sda(0) + [lv_rimage_1] iwi-aor--- 128.00m linear 1 0 0 /dev/sdhx(1) + [lv_rmeta_0] ewi-aor--- 4.00m linear 1 0 /dev/sda(32) + [lv_rmeta_1] ewi-aor--- 4.00m linear 1 0 /dev/sdhx(0) .fi Now we'll change the number of data stripes from 1 to 5 and request 128K stripe size @@ -1396,7 +1396,7 @@ to the one given). That additonal space can be used by e.g. growing any contain or the LV can be reduced in size after the reshaping conversion has finished. .nf -# lvconvert \-\-yes \-\-stripesize 128k \-\-stripes 5 vg/lv +# lvconvert --yes --stripesize 128k --stripes 5 vg/lv Converting stripesize 64.00 KiB of raid5_n LV vg/lv to 128.00 KiB. WARNING: Adding stripes to active logical volume vg/lv will grow it from 32 to 160 extents! Run "lvresize -l32 vg/lv" to shrink it or use the additional capacity. @@ -1404,46 +1404,46 @@ or the LV can be reduced in size after the reshaping conversion has finished. # lvs -aoname,attr,size,segtype,syncpercent,datastripes,stripesize,reshapelenle,devices vg LV Attr LSize Type Cpy%Sync #DStr Stripe RSize Devices - lv rwi\-a\-r\-\-\- 640.00m raid5_n 100.00 5 128.00k 6 lv_rimage_0(0),lv_rimage_1(0),lv_rimage_2(0),lv_rimage_3(0),lv_rimage_4(0),lv_rimage_5(0) - [lv_rimage_0] iwi\-aor\-\-\- 132.00m linear 1 0 1 /dev/sda(33) - [lv_rimage_0] iwi\-aor\-\-\- 132.00m linear 1 0 /dev/sda(0) - [lv_rimage_1] iwi\-aor\-\-\- 132.00m linear 1 0 1 /dev/sdhx(33) - [lv_rimage_1] iwi\-aor\-\-\- 132.00m linear 1 0 /dev/sdhx(1) - [lv_rimage_2] iwi\-aor\-\-\- 132.00m linear 1 0 1 /dev/sdhw(33) - [lv_rimage_2] iwi\-aor\-\-\- 132.00m linear 1 0 /dev/sdhw(1) - [lv_rimage_3] iwi\-aor\-\-\- 132.00m linear 1 0 1 /dev/sdhv(33) - [lv_rimage_3] iwi\-aor\-\-\- 132.00m linear 1 0 /dev/sdhv(1) - [lv_rimage_4] iwi\-aor\-\-\- 132.00m linear 1 0 1 /dev/sdhu(33) - [lv_rimage_4] iwi\-aor\-\-\- 132.00m linear 1 0 /dev/sdhu(1) - [lv_rimage_5] iwi\-aor\-\-\- 132.00m linear 1 0 1 /dev/sdht(33) - [lv_rimage_5] iwi\-aor\-\-\- 132.00m linear 1 0 /dev/sdht(1) - [lv_rmeta_0] ewi\-aor\-\-\- 4.00m linear 1 0 /dev/sda(32) - [lv_rmeta_1] ewi\-aor\-\-\- 4.00m linear 1 0 /dev/sdhx(0) - [lv_rmeta_2] ewi\-aor\-\-\- 4.00m linear 1 0 /dev/sdhw(0) - [lv_rmeta_3] ewi\-aor\-\-\- 4.00m linear 1 0 /dev/sdhv(0) - [lv_rmeta_4] ewi\-aor\-\-\- 4.00m linear 1 0 /dev/sdhu(0) - [lv_rmeta_5] ewi\-aor\-\-\- 4.00m linear 1 0 /dev/sdht(0) + lv rwi-a-r--- 640.00m raid5_n 100.00 5 128.00k 6 lv_rimage_0(0),lv_rimage_1(0),lv_rimage_2(0),lv_rimage_3(0),lv_rimage_4(0),lv_rimage_5(0) + [lv_rimage_0] iwi-aor--- 132.00m linear 1 0 1 /dev/sda(33) + [lv_rimage_0] iwi-aor--- 132.00m linear 1 0 /dev/sda(0) + [lv_rimage_1] iwi-aor--- 132.00m linear 1 0 1 /dev/sdhx(33) + [lv_rimage_1] iwi-aor--- 132.00m linear 1 0 /dev/sdhx(1) + [lv_rimage_2] iwi-aor--- 132.00m linear 1 0 1 /dev/sdhw(33) + [lv_rimage_2] iwi-aor--- 132.00m linear 1 0 /dev/sdhw(1) + [lv_rimage_3] iwi-aor--- 132.00m linear 1 0 1 /dev/sdhv(33) + [lv_rimage_3] iwi-aor--- 132.00m linear 1 0 /dev/sdhv(1) + [lv_rimage_4] iwi-aor--- 132.00m linear 1 0 1 /dev/sdhu(33) + [lv_rimage_4] iwi-aor--- 132.00m linear 1 0 /dev/sdhu(1) + [lv_rimage_5] iwi-aor--- 132.00m linear 1 0 1 /dev/sdht(33) + [lv_rimage_5] iwi-aor--- 132.00m linear 1 0 /dev/sdht(1) + [lv_rmeta_0] ewi-aor--- 4.00m linear 1 0 /dev/sda(32) + [lv_rmeta_1] ewi-aor--- 4.00m linear 1 0 /dev/sdhx(0) + [lv_rmeta_2] ewi-aor--- 4.00m linear 1 0 /dev/sdhw(0) + [lv_rmeta_3] ewi-aor--- 4.00m linear 1 0 /dev/sdhv(0) + [lv_rmeta_4] ewi-aor--- 4.00m linear 1 0 /dev/sdhu(0) + [lv_rmeta_5] ewi-aor--- 4.00m linear 1 0 /dev/sdht(0) .fi Once the conversion has finished we can can convert to striped. .nf -[root@vm46 ~]# lvconvert -y \-\-ty striped vg/lv +[root@vm46 ~]# lvconvert -y --ty striped vg/lv Logical volume vg/lv successfully converted. [root@vm46 ~]# lvs -aoname,attr,size,segtype,syncpercent,datastripes,stripesize,reshapelenle,devices vg|sed 's/ *$//' LV Attr LSize Type Cpy%Sync #DStr Stripe RSize Devices - lv -wi\-a\-\-\-\-\- 640.00m striped 5 128.00k /dev/sda(33),/dev/sdhx(33),/dev/sdhw(33),/dev/sdhv(33),/dev/sdhu(33) - lv -wi\-a\-\-\-\-\- 640.00m striped 5 128.00k /dev/sda(0),/dev/sdhx(1),/dev/sdhw(1),/dev/sdhv(1),/dev/sdhu(1) + lv -wi-a----- 640.00m striped 5 128.00k /dev/sda(33),/dev/sdhx(33),/dev/sdhw(33),/dev/sdhv(33),/dev/sdhu(33) + lv -wi-a----- 640.00m striped 5 128.00k /dev/sda(0),/dev/sdhx(1),/dev/sdhw(1),/dev/sdhv(1),/dev/sdhu(1) .fi Reversing these steps wil convert a given striped LV to linear. Mind the fact that stripes are removed thus the capacity of the RaidLV will shrink. -"lvconvert \-\-stripes 1 vg/lv" for converting to 1 stripe will inform upfront about +"lvconvert --stripes 1 vg/lv" for converting to 1 stripe will inform upfront about the reduced size to allow for resizing the content or growing the RaidLV before -actually converting to 1 stripe. The \fB\-\-force\fP option is needed to +actually converting to 1 stripe. The \fB--force\fP option is needed to allow stripe removing conversions to prevent data loss. Of course any interim step can be the intended last one (e.g. striped -> raid1). @@ -1554,7 +1554,7 @@ raid6_n_6 RAID6 N continue .br \[bu] -Fixed P\-Syndrome N\-1 and Q\-Syndrome N with striped data +Fixed P-Syndrome N-1 and Q-Syndrome N with striped data .br \[bu] Used for RAID Takeover @@ -1565,7 +1565,7 @@ raid6_ls_6 RAID6 N continue .br \[bu] -Same as raid5_ls for N\-1 disks with fixed Q\-Syndrome N +Same as raid5_ls for N-1 disks with fixed Q-Syndrome N .br \[bu] Used for RAID Takeover @@ -1576,7 +1576,7 @@ raid6_la_6 RAID6 N continue .br \[bu] -Same as raid5_la for N\-1 disks with fixed Q\-Syndrome N +Same as raid5_la for N-1 disks with fixed Q-Syndrome N .br \[bu] Used forRAID Takeover @@ -1587,7 +1587,7 @@ raid6_rs_6 RAID6 N continue .br \[bu] -Same as raid5_rs for N\-1 disks with fixed Q\-Syndrome N +Same as raid5_rs for N-1 disks with fixed Q-Syndrome N .br \[bu] Used for RAID Takeover @@ -1598,7 +1598,7 @@ raid6_ra_6 RAID6 N continue .br \[bu] -Same as raid5_ra for N\-1 disks with fixed Q\-Syndrome N +Same as raid5_ra for N-1 disks with fixed Q-Syndrome N .br \[bu] Used for RAID Takeover @@ -1607,7 +1607,7 @@ Used for RAID Takeover .ig .SH RAID Duplication -RAID LV conversion (takeover or reshaping) can be done out\-of\-place by +RAID LV conversion (takeover or reshaping) can be done out-of-place by copying the LV data onto new devices while changing the RAID properties. Copying avoids modifying the original LV but requires additional devices. Once the LV data has been copied/converted onto the new devices, there are @@ -1626,23 +1626,23 @@ LV, leaving the original RAID LV unchanged on its original devices. The command to start duplication is: -.B lvconvert \-\-type +.B lvconvert --type .I RaidLevel -[\fB\-\-stripes\fP \fINumber\fP \fB\-\-stripesize\fP \fISize\fP] +[\fB--stripes\fP \fINumber\fP \fB--stripesize\fP \fISize\fP] .RS -.B \-\-duplicate +.B --duplicate .IR VG / LV [\fIPVs\fP] .RE .HP -.B \-\-duplicate +.B --duplicate .br -Specifies that the LV conversion should be done out\-of\-place, copying +Specifies that the LV conversion should be done out-of-place, copying LV data to new devices while converting. .HP -.BR \-\-type , \-\-stripes , \-\-stripesize +.BR --type , --stripes , --stripesize .br Specifies the RAID properties to use when creating the copy. @@ -1678,16 +1678,16 @@ devices (SubLV 0) or the new devices (SubLV 1). To make the RAID LV use the data on the old devices, and drop the copy on the new devices, specify the name of SubLV 0 (suffix _dup_0): -.B lvconvert \-\-unduplicate -.BI \-\-name +.B lvconvert --unduplicate +.BI --name .IB LV _dup_0 .IR VG / LV To make the RAID LV use the data copy on the new devices, and drop the old devices, specify the name of SubLV 1 (suffix _dup_1): -.B lvconvert \-\-unduplicate -.BI \-\-name +.B lvconvert --unduplicate +.BI --name .IB LV _dup_1 .IR VG / LV @@ -1704,9 +1704,9 @@ TODO .SH History -The 2.6.38-rc1 version of the Linux kernel introduced a device\-mapper +The 2.6.38-rc1 version of the Linux kernel introduced a device-mapper target to interface with the software RAID (MD) personalities. This -provided device\-mapper with RAID 4/5/6 capabilities and a larger +provided device-mapper with RAID 4/5/6 capabilities and a larger development community. Later, support for RAID1, RAID10, and RAID1E (RAID 10 variants) were added. Support for these new kernel RAID targets was added to LVM version 2.02.87. The capabilities of the LVM \fBraid1\fP |