summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* commands: fixes for recent raid changesdev-dct-cmd-defs-raidDavid Teigland2017-02-241-17/+19
| | | | | | | | | | | | | | | | - Combine the equivalent lvconvert --type raid defs. - Remove unwanted options from lvconvert --stripes and lvconvert --stripesize. - Use Number for --stripes_long val type. - Disable the lvconvert LV replica of existing cmd def. (The new operation to clear reshape space will need a new option to distinguish it from the existing polling command, or the new operation would need to be detected and called from the existing start_poll command.)
* man: change option sorting in synopsisDavid Teigland2017-02-241-48/+7
| | | | | | | | | | The options list was sorted as: - options with both long and short forms, alphabetically - options with only long form, alphabetically This was done only for the visual effect. Change to sort alphabetically by long opt, without regard to short forms.
* man: add ENVIRONMENT VARIABLES sectionDavid Teigland2017-02-241-2/+1
|
* lvconvert: fix handling args in combining snapshotsDavid Teigland2017-02-241-8/+14
| | | | | | Fixes commit 286d39ee3c433, which was correct except for a reversed strstr. Now uses strchr, and modifies a copy of the name so the original argv is preserved.
* man: use Size variable for a number with unitDavid Teigland2017-02-245-25/+30
| | | | | Define a separate variable type Size to represent a number that takes an optional UNIT.
* lvconvert: impose region size constraintsdev-agk-test3Heinz Mauelshagen2017-02-242-26/+62
| | | | | | | | | | | When requesting a regionsize change during conversions, check for constraints or the command may fail in the kernel n case the region size is too smalle or too large thus leaving any new SubLVs behind. Related: rhbz834579 Related: rhbz1191935 Related: rhbz1191978
* lvconvert: fix 2 issues identified in intestingHeinz Mauelshagen2017-02-241-9/+5
| | | | | | | | | | | | | | | Allow regionsize on upconvert from linear: fix related commit 2574d3257ad41 to actually work Related: rhbz1394427 Remove setting raid5_n on conversions from raid1 as of commit 932db3db5357 because any raid5 mapping may be requested. Related: rhbz834579 Related: rhbz1191935 Related: rhbz1191978
* WHATS_NEW: add entryHeinz Mauelshagen2017-02-241-0/+1
|
* lvconvert: add missed new test scripts for reshapingHeinz Mauelshagen2017-02-243-0/+347
| | | | | | | | | | | | | | Add aforementioned but forgotten new test scripts lvconvert-raid-reshape-linear_to_striped.sh, lvconvert-raid-reshape-striped_to_linear.sh and lvconvert-raid-reshape.sh Those presume dm-raid target version 1.10.2 provided by a following kernel patch. Related: rhbz834579 Related: rhbz1191935 Related: rhbz1191978
* lvconvert: allow regionsize on upconvert from linearHeinz Mauelshagen2017-02-243-4/+12
| | | | | | | Allow to provide regionsize with "lvconvert -m1 -R N " on upconverts from linear and on N -> M raid1 leg conversions. Resolves: rhbz1394427
* lvconvert/lvcreate: raise maximum number of raid imagesHeinz Mauelshagen2017-02-241-2/+2
| | | | | | | | | | | | | | | | | | Because of contraints in renaming shifted rimage/rmeta LV names the current RaidLV limit is a maximum of 10 SubLV pairs. With the previous introduction of reshaping infratructure that constriant got removed. Kernel supports 253 since dm-raid target 1.9.0, older kernels 64. Raise the maximum number of RaidLV rimage/rmeta pairs to 64. If we want to raise past 64, we have to introdce a check for the kernel supporting it in lvcreate/lvconvert. Related: rhbz834579 Related: rhbz1191935 Related: rhbz1191978
* lvconvert: add infrastructure for RaidLV reshaping supportHeinz Mauelshagen2017-02-247-25/+87
| | | | | | | | | | | | | | | | | | | | | In order to support striped raid5/6/10 LV reshaping (change of LV type, stripesize or number of legs), this patch introduces the changes to call the reshaping infratructure from lv_raid_convert(). Changes: - add reshaping calls from lv_raid_convert() - add command definitons for reshaping to tools/command-lines.in - fix raid_rimage_extents() - add 2 new test scripts lvconvert-raid-reshape-linear_to_striped.sh and lvconvert-raid-reshape-striped_to_linear.sh to test the linear <-> striped multi-step conversions - add lvconvert-raid-reshape.sh reshaping tests - enhance lvconvert-raid-takeover.sh with new raid10 tests Related: rhbz834579 Related: rhbz1191935 Related: rhbz1191978
* lvconvert: add infrastructure for RaidLV reshaping supportHeinz Mauelshagen2017-02-241-3/+1
| | | | | | | | | | | | | | | In order to support striped raid5/6/10 LV reshaping (change of LV type, stripesize or number of legs), this patch introduces more local infrastructure to raid_manip.c used by followup patches. Change: - allow raid_rimage_extents() to calculate raid10 - remove an __unused__ attribute Related: rhbz834579 Related: rhbz1191935 Related: rhbz1191978
* lvconvert: add infrastructure for RaidLV reshaping supportHeinz Mauelshagen2017-02-242-8/+13
| | | | | | | | | | | | | | | | | | | In order to support striped raid5/6/10 LV reshaping (change of LV type, stripesize or number of legs), this patch introduces more local infrastructure to raid_manip.c used by followup patches. Change: - add missing raid1 <-> raid5 conversions to support linear <-> raid5 <-> raid0(_meta)/striped conversions - rename related new takeover functions to _takeover_from_raid1_to_raid5 and _takeover_from_raid5_to_raid1, because a reshape to > 2 legs is only possible with raid5 layout Related: rhbz834579 Related: rhbz1191935 Related: rhbz1191978
* lvconvert: add infrastructure for RaidLV reshaping supportHeinz Mauelshagen2017-02-241-2/+3
| | | | | | | | | | | | | | | | | In order to support striped raid5/6/10 LV reshaping (change of LV type, stripesize or number of legs), this patch introduces more local infrastructure to raid_manip.c used by followup patches. Change: - enhance _clear_meta_lvs() to support raid0 allowing raid0_meta -> raid10 conversions to succeed by clearing the raid0 rmeta images or the kernel will fail because of discovering reordered raid devices Related: rhbz834579 Related: rhbz1191935 Related: rhbz1191978
* lvconvert: add infrastructure for RaidLV reshaping supportHeinz Mauelshagen2017-02-241-75/+183
| | | | | | | | | | | | | | | | | | | | | | In order to support striped raid5/6/10 LV reshaping (change of LV type, stripesize or number of legs), this patch introduces more local infrastructure to raid_manip.c used by followup patches. Changes: - enhance _raid45610_to_raid0_or_striped_wrapper() to support raid5_n with 2 areas to raid1 conversion to allow for striped/raid0(_meta)/raid4/5/6 -> raid1/linear conversions; rename it to _takeover_downconvert_wrapper to discontinue the illegible function name - enhance _striped_or_raid0_to_raid45610_wrapper() to support raid1 with 2 areas to raid5* conversions to allow for linear/raid1 -> striped/raid0(_meta)/raid4/5/6 conversions; rename it to _takeover_upconvert_wrapper for the same reason Related: rhbz834579 Related: rhbz1191935 Related: rhbz1191978
* lvconvert: add infrastructure for RaidLV reshaping supportHeinz Mauelshagen2017-02-241-32/+117
| | | | | | | | | | | | | | | | | In order to support striped raid5/6/10 LV reshaping (change of LV type, stripesize or number of legs), this patch introduces more local infrastructure to raid_manip.c used by followup patches. Changes: - add missing possible reshape conversions and conversion options to allow/prohibit changing stripesize or number fo stripes - enhance setting convenient riad types in reshape conversions (e.g. raid1 with 2 legs -> radi5_n) Related: rhbz834579 Related: rhbz1191935 Related: rhbz1191978
* lvconvert: add infrastructure for RaidLV reshaping supportHeinz Mauelshagen2017-02-241-23/+339
| | | | | | | | | | | | | | | | | In order to support striped raid5/6/10 LV reshaping (change of LV type, stripesize or number of legs), this patch introduces more local infrastructure to raid_manip.c used by followup patches. Changes: - add _raid_reshape() using the pre/post callbacks and the stripes add/remove reshape functions introduced before - and _reshape_requested function checking if a reshape was requested Related: rhbz834579 Related: rhbz1191935 Related: rhbz1191978
* lvconvert: add infrastructure for RaidLV reshaping supportHeinz Mauelshagen2017-02-241-76/+269
| | | | | | | | | | | | | | | | | | | | | In order to support striped raid5/6/10 LV reshaping (change of LV type, stripesize or number of legs), this patch introduces more local infrastructure to raid_manip.c used by followup patches. Changes: - add vg metadata update functions - add pre and post activation callback functions for proper sequencing of sub lv activations during reshaping - move and enhance _lv_update_reload_fns_reset_eliminate_lvs() to support pre and post activation callbacks - add _reset_flags_passed_to_kernel() which resets anyxi rebuild/reshape flags after they have been passed into the kernel and sets the SubLV remove after reshape flags on legs to be removed Related: rhbz834579 Related: rhbz1191935 Related: rhbz1191978
* lvconvert: add infrastructure for RaidLV reshaping supportHeinz Mauelshagen2017-02-241-3/+311
| | | | | | | | | | | | | | | | | In order to support striped raid5/6/10 LV reshaping (change of LV type, stripesize or number of legs), this patch introduces more local infrastructure to raid_manip.c used by followup patches. Changes: - add function to support disk adding reshapes - add function to support disk removing reshapes - add function to support layout (e.g. raid5ls -> raid5_rs) or stripesize reshaping Related: rhbz834579 Related: rhbz1191935 Related: rhbz1191978
* lvconvert: add infrastructure for RaidLV reshaping supportHeinz Mauelshagen2017-02-241-0/+96
| | | | | | | | | | | | | | | | In order to support striped raid5/6/10 LV reshaping (change of LV type, stripesize or number of legs), this patch introduces more local infrastructure to raid_manip.c used by followup patches. Changes: - add function providing state of a reshaped RaidLV - add function to adjust the size of a RaidLV was reshaped to add/remove stripes Related: rhbz834579 Related: rhbz1191935 Related: rhbz1191978
* lvconvert: add infrastructure for RaidLV reshaping supportHeinz Mauelshagen2017-02-243-31/+443
| | | | | | | | | | | | | | | | | | | | | In order to support striped raid5/6/10 LV reshaping (change of LV type, stripesize or number of legs), this patch introduces more local infrastructure to raid_manip.c used by followup patches. Changes: - add lv_raid_data_copies returning raid type specific number; needed for raid10 with more than 2 data copies - remove _shift_and_rename_image_components() constraint to support more than 10 raid legs - add function to calculate total rimage length used by out-of-place reshape space allocation - add out-of-place reshape space alloc/relocate/free functions - move _data_rimages_count() used by reshape space alloc/realocate functions Related: rhbz834579 Related: rhbz1191935 Related: rhbz1191978
* raid: typoHeinz Mauelshagen2017-02-241-1/+1
|
* lvconvert: add infrastructure for RaidLV reshaping supportHeinz Mauelshagen2017-02-241-0/+56
| | | | | | | | | | | | | | | | In order to support striped raid5/6/10 LV reshaping (change of LV type, stripesize or number of legs), this patch introduces local infrastructure to raid_manip.c used by followup patches. Add functions: - to check reshaping is supported in target attibute - to return device health string needed to check the raid device is ready to reshape Related: rhbz834579 Related: rhbz1191935 Related: rhbz1191978
* lvconvert: add infrastructure for RaidLV reshaping supportHeinz Mauelshagen2017-02-2423-164/+429
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to support striped raid5/6/10 LV reshaping (change of LV type, stripesize or number of legs), this patch introduces infrastructure prerequisites to be used by raid_manip.c extensions in followup patches. This base is needed for allocation of out-of-place reshape space required by the MD raid personalities to avoid writing over data in-place when reading off the current RAID layout or number of legs and writing out the new layout or to a different number of legs (i.e. restripe) Changes: - add members reshape_len to 'struct lv_segment' to store out-of-place reshape length per component rimage - add member data_copies to struct lv_segment to support more than 2 raid10 data copies - make alloc_lv_segment() aware of both reshape_len and data_copies - adjust all alloc_lv_segment() callers to the new API - add functions to retrieve the current data offset (needed for out-of-place reshaping space allocation) and the devices count from the kernel - make libdm deptree code aware of reshape_len - add LV flags for disk add/remove reshaping - support import/export of the new 'struct lv_segment' members - enhance lv_extend/_lv_reduce to cope with reshape_len - add seg_is_*/segtype_is_* macros related to reshaping - add target version check for reshaping - grow rebuilds/writemostly bitmaps to 246 bit to support kernel maximal - enhance libdm deptree code to support data_offset (out-of-place reshaping) and delta_disk (legs add/remove reshaping) target arguments Related: rhbz834579 Related: rhbz1191935 Related: rhbz1191978
* man: improve line breaksDavid Teigland2017-02-231-43/+55
| | | | | | Borrow tricks from dmsetup man page to improve the line break and indentation using .ad l, .ad b, and soft break \%.
* man/help: change syntax to UNITDavid Teigland2017-02-232-13/+15
| | | | | | | | | | | | (Change to recent commit 3f4ecaf8c2.) Use --foo Number[k|UNIT] to indicate that the default units of the number is k, but other units listed below are also accepted. Previously, underlined/italic Unit was used, like other of variables, but this UNIT is more like a shortcut than an actual variable.
* lvchange: reject writemostly/writebehind on raid1 during resyncsourceware_masterHeinz Mauelshagen2017-02-235-1/+65
| | | | | | | | | | | | | | | | | | | | | | | | | The MD kernel raid1 personality does no use any writemostly leg as the primary. In case a previous linear LV holding data gets upconverted to raid1 it becomes the primary leg of the new raid1 LV and a full resynchronization is started to update the new legs. No writemostly and/or writebehind setting may be allowed during this initial, full synchronization period of this new raid1 LV (using the lvchange(8) command), because that would change the primary (i.e the previous linear LV) thus causing data loss. lvchange has a bug not preventing this scenario. Fix rejects setting writemostly and/or writebehind on resychronizing raid1 LVs. Once we have status in the lvm2 metadata about the linear -> raid upconversion, we may relax this constraint for other types of resynchronization (e.g. for user requested "lvchange --resync "). New lvchange-raid1-writemostly.sh test is added to the test suite. Resolves: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=855895
* man/help: improve the style of units indicatorDavid Teigland2017-02-222-16/+15
| | | | | | | | | | | | | | | We use --foo Number[k|Units] to indicate that the default units of the number is k, but other units listed below are also accepted. Capitalize and underline Units so it is consistent with other variables, and reference it at the end. Technically, the k should be bold, but this tends to make the text visually hard to read because of the excessive highlights scattered everywhere. So it's left normal text for now (it's unlikely to confuse anyone.)
* man: indicate repeatable optionsDavid Teigland2017-02-221-3/+5
| | | | | | Print ... after a repeatable option in the OPTIONS section. An alternative would be to just mention in the text description that the option is repeatable.
* man: improve writemostly PV argDavid Teigland2017-02-221-10/+15
|
* tests: support zero_devZdenek Kabelac2017-02-221-4/+15
| | | | | | | | | | | When the test would need to try to write some large amount of data we can give it 'zero' segments - for obvious reason such written data can't be verified but in some test cases it doesn't really matter. Usage follows 'error_dev' style. For now test suite is not supporting any combination of error/delay/zero segments so only 1 type could be used per PV.
* tests: not slowing work with metadataZdenek Kabelac2017-02-221-2/+2
| | | | Slows only data extents on a PV.
* snapshot: improve removal of active origin volumeZdenek Kabelac2017-02-222-4/+14
| | | | | | | | | | | | Previously when lvremove tried to remove 'active' origin, it had been asking for every 'snapshot' LV separately and doing individual single snapshot removals first. To be faster it now deactivates origin before removal all connected snapshots. This avoids multiple reloads of dm table for origin volume which were unnecessary as origin was meant to be removed as well.
* WHATS_NEW: add entryZdenek Kabelac2017-02-222-1/+1
|
* man/help: enclose each option in bracketsDavid Teigland2017-02-211-48/+25
| | | | | Placing [] around each individual option is the most common style, and it improves the readability.
* man/help: use separate common option listsDavid Teigland2017-02-214-57/+160
| | | | | | | | | | | There are two kinds of common options: 1. options common to all variants of a given command name 2. options common to all lvm commands Previously, both kinds of common options were listed together under "Common options". Now the first are printed under "Common options for command" (when needed), and the second are printed under "Common options for lvm" (always).
* man: teaking output formatDavid Teigland2017-02-211-1/+33
|
* commands: adjust default help outputDavid Teigland2017-02-213-41/+23
| | | | | | | | | | Remove the "usage notes" which should just live in the man pages. When there are 3 or more variants of a command, print all the options produces a lot of output, so require --longhelp to print all the options in these cases.
* man lvm: update see also listDavid Teigland2017-02-211-43/+65
| | | | | add several missing references remove references to lvmdiskscan lvmchange
* man: expand type option descriptionDavid Teigland2017-02-211-1/+10
|
* dmsetup: Indicate device repetition in usage summaries.Alasdair G Kergon2017-02-212-33/+32
|
* tests: some debug codeZdenek Kabelac2017-02-211-1/+4
| | | | | Checking if --deferred would make it any faster - but it's as slow as without this new optional flag anyway (4.10).
* tests: ensure first call is version testZdenek Kabelac2017-02-211-6/+8
| | | | | | | Check 'dmsetup version' is called before starting any more advanced logic in $DM_DEV_DIR. Call also replaces mkdir as it creates needed path with control node.
* tests: make sure which PV is used for allocationZdenek Kabelac2017-02-211-1/+1
|
* tests: paralelize creation and teardownZdenek Kabelac2017-02-211-16/+23
| | | | | | To speedup initial construction and destruction of test devices (mainly in case more then 1 is needed) call dmsetup in parallel.
* tests: use exclusive activation for mirrorZdenek Kabelac2017-02-211-1/+1
| | | | Test suite does not support clustered mirroring.
* man: use .HP instead of .TPDavid Teigland2017-02-201-9/+9
|
* man/help: print general raid type as "raid"David Teigland2017-02-201-1/+1
| | | | | Instead of printing "raid*". There are already notes mentioning that "raid" refers to "raid<N>"
* man vgchange/lvchange: note special option usageDavid Teigland2017-02-201-2/+6
|