summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* report: Demo mount/fs fields a bit like df.dev-agk-fs-reportingAlasdair G Kergon2017-03-085-18/+199
| | | | | | | ./lvm pvs -a -opv_name,fs_size,fs_used,fs_free,mount_all -S 'fs_size>0' --units k ./lvm pvs -a -opv_name,fs_size,fs_used,fs_free,fs_avail,mount_all -S 'fs_size>0' --units b --reportformat json --nosuffix
* raid: define seg->extents_copiedHeinz Mauelshagen2017-03-071-0/+2
| | | | | | | | | | seg->extents_copied has to be defined properly on reducing the size of a raid LV or conversion from raid5 with 1 stripe to raid1 will fail. Related: rhbz834579 Related: rhbz1191935 Related: rhbz1191978
* report: correct lv_size for 2-legged raid5Heinz Mauelshagen2017-03-071-1/+1
| | | | | | Reshaping a raid5 LV to one stripe aiming to convert it to raid1 (and optionally to linear) reports the wrong LV size when still having reshape space allocated.
* raid: fix raid LV resizingHeinz Mauelshagen2017-03-073-17/+55
| | | | | | | | | The lv_extend/_lv_reduce API doesn't cope with resizing RaidLVs with allocated reshape space and ongoing conversions. Prohibit resizing during conversions and remove the reshape space before processing resize. Add missing seg->data_copies initialisation. Fix typo/comment.
* raid: cleanup _lv_set_image_lvs_start_les()Heinz Mauelshagen2017-03-071-3/+2
| | | | Avoid second loop.
* lvconvert: adjust --stripes on raid10 convertHeinz Mauelshagen2017-03-071-2/+5
| | | | | | | | | | | | | | | For the time being raid10 is limited to even number of total stripes as is and 2 data copies. The number of stripes provided on creation of a raid10(_near) LV with -i/--stripes gets doubled to define that even total number of stripes (i.e. images). Apply the same on disk adding conversions (reshapes) with "lvconvert --stripes RaidLV" (e.g. 2 stripes = 4 images total converted to 3 stripes = 6 images total). Related: rhbz834579 Related: rhbz1191935 Related: rhbz1191978
* report: display proper LV size for reshapable RaidLVsHeinz Mauelshagen2017-03-072-1/+17
| | | | | | | | Subtract reshape space when reporting visible lv_size on RaidLV. Related: rhbz834579 Related: rhbz1191935 Related: rhbz1191978
* test: add delay to lvchange-raid1-writemostly.shHeinz Mauelshagen2017-03-071-2/+2
| | | | | | | | | Commit 8ab072507706 introduced this new test. Add a read delay to the PVs to avoid a race in the script causing the test to fail. Correct comment.
* man lvs: describe new 'R' volume health characterHeinz Mauelshagen2017-03-061-0/+1
|
* man/help: improve stripes option wordingDavid Teigland2017-03-061-6/+6
|
* man lvextend: mention segment typeDavid Teigland2017-03-061-3/+6
|
* test: fix typoHeinz Mauelshagen2017-03-031-1/+1
|
* man: move the full UNIT descriptionDavid Teigland2017-03-032-12/+3
| | | | | | Part of the UNIT description was still living in the --size description. Move it to the Size[UNIT] description since it is used by other options, not just --size.
* man/help: poolmetadatasize option can take relative valueDavid Teigland2017-03-033-8/+23
| | | | | | | | | | | | | | In lvcreate/lvconvert, --poolmetdatasize can only be an absolute value, but in lvresize/lvextend, --poolmetadatasize can be given a + relative value. The val types only currently support relative values that go in both directions +|-. Further work is needed to add val types that can be relative in only one direction, and switching various option values to one those depending on the command name. Then poolmetdatasize will not appear with a +|- option in lvcreate/lvconvert, and will appear with only the + option in lvresize/lvextend.
* report: raid enhancements for --selectHeinz Mauelshagen2017-03-033-48/+87
| | | | | | | | | | Enhance the raid report functions for the recently added LV fields reshape_len, reshape_len_le, data_offset, new_data_offset, data_copies, data_stripes and parity_chunks to cope with "lvs --select". Related: rhbz834579 Related: rhbz1191935 Related: rhbz1191978
* man: fix term in lvmraid(7)Heinz Mauelshagen2017-03-031-1/+1
| | | | | | | | Adjust commit af7c8e710663 to use "image/leg". Related: rhbz834579 Related: rhbz1191935 Related: rhbz1191978
* help: show short opt with long optDavid Teigland2017-03-031-5/+140
| | | | e.g. show -n|--name instead of just --name
* dev_manager: remove reshape messageHeinz Mauelshagen2017-03-031-3/+2
| | | | The dm-raid target doesn't support a "reshape" message.
* man/help: rework extents and size outputDavid Teigland2017-03-039-95/+128
| | | | | | | | | | Clean up and correct the details around --extents and --size. lvcreate/lvresize/lvreduce/lvextend all now display the extents option in usages. The Size and Number value variables for --size and --extents are now displayed without the [+|-] prefix for lvcreate.
* man/help: improve the PV range descriptionDavid Teigland2017-03-031-7/+11
|
* args: in cachemode option fix passthrough valueDavid Teigland2017-03-032-3/+3
|
* args: update select descriptionDavid Teigland2017-03-031-3/+4
| | | | mention --select help and --options help.
* man lvcreate: show extents optionDavid Teigland2017-03-022-3/+15
| | | | | | Display --extents as an option in each cmd def, in addition to the special notes about how --size and --extents are alternatives.
* man lvcreate: remove the extents prefixDavid Teigland2017-03-021-0/+4
| | | | | This applies the same hack to --extents (dropping the [+|-] prefix), as commit b7831fc14a did for --size.
* help: show extents option for lvcreateDavid Teigland2017-03-021-2/+11
| | | | | | | A special case is needed to display --extents for lvcreate since the cmd defs treat --extents as an automatic alternative to --size (to avoid duplicating every cmd def).
* help: print info about special options and variablesDavid Teigland2017-03-023-5/+68
| | | | when --longhelp is used
* lvcreate: munge size value in help outputDavid Teigland2017-03-021-8/+23
| | | | | Add hack to omit the [+|-] from the --size value. Same hack exists in man generator.
* man: cover reshapingHeinz Mauelshagen2017-03-022-41/+79
| | | | | | Related: rhbz834579 Related: rhbz1191935 Related: rhbz1191978
* lvs: enhance stripes and region size field descriptionsHeinz Mauelshagen2017-03-021-2/+2
| | | | | Now that we got the "data_stripes" field key, adjust the "stripes" field description. Enhance the "regionsize" field description to cover raids as well.
* man: change the synopsis option styleDavid Teigland2017-03-021-5/+5
| | | | | Remove the required/optional words because it should already be evident from the use of [ ].
* lvcreate: allow chunksize option when creating cacheDavid Teigland2017-03-021-1/+2
|
* commands: handle including an optional opt multiple timesDavid Teigland2017-03-021-5/+25
| | | | | | When a cmd def includes multiple sets of options (OO_FOO), allow multiple OO_FOO sets to contain the same option and avoid repeating it in the cmd def.
* lvcreate/lvresize: the --size option accepts signed valuesDavid Teigland2017-03-026-57/+110
| | | | | | | | | | | | | | | | | | | There was confusion in the code about whether or not the --size option accepted a sign. Make it consistent and clear that it does. This exposes a new problem in that an option can only accept one value type, e.g. --size can only accept a signed number, it cannot accept a positive or negative number for some commands and reject negative numbers for others. In practice, lvcreate accepts only positive --size values and lvresize accepts positive or negative --size values. There is currently no way to encode this difference. Until that is fixed, the man page output is hacked to avoid printing the [+|-] prefix for sizes in lvcreate.
* tools: Fix overriding of current_settings.Alasdair G Kergon2017-03-021-14/+35
| | | | | | | | | | | | Settings specified in other command line args take precedence over profiles and --config, which takes precedence over settings in actual config files. Since commit 1e2420bca85da9a37570871cd70192e9ae831786 ('commands: new method for defining commands') commands like this: lvchange --config 'global/test=1' -ay vg have been printing the 'TEST MODE' message, but nevertheless making real changes.
* commands: adjust syntax error messageDavid Teigland2017-03-023-9/+13
|
* man lvchange: mention special activation valsDavid Teigland2017-03-021-2/+2
| | | | used by lvmlockd and clvmd.
* lvmdbustest.py: Remove un-used variableTony Asleson2017-03-011-1/+0
| | | | Not needed with new validation function.
* lvmdbustest.py: Validate LV lookupsTony Asleson2017-03-011-32/+76
| | | | Ensure that the LV lookups work as expected for newly created LVs.
* lvmdbustest.py: Validate PV deviceTony Asleson2017-03-011-0/+3
| | | | Validate device lookup after PV creation.
* lvmdbustest.py: Re-name validation functionTony Asleson2017-03-011-9/+10
| | | | Make this name generic as we can use for different types.
* lvmdbustest.py: Verify lookups work immediately after vg createTony Asleson2017-03-011-5/+20
|
* lvmdbustest.py: Use _lookup functionTony Asleson2017-03-011-16/+12
| | | | Be consistent in using this helper function for dbus object lookups.
* man: fix typoDavid Teigland2017-03-011-1/+1
|
* commands: tweak some descriptionsDavid Teigland2017-03-011-26/+21
|
* lvconvert: add new reporting fields for reshapingHeinz Mauelshagen2017-03-011-2/+1
| | | | | | | | | | Commit 48778bc5038f introduced new RAID reshaping related report fields. The inclusioon of segtype.h in properties.c isn't mandatory, remove it. Related: rhbz834579 Related: rhbz1191935 Related: rhbz1191978
* lvconvert: libdm RAID API compatibility versioning; remove new functionHeinz Mauelshagen2017-03-013-30/+0
| | | | | | | | | | | Commit 80a6de616a19 versioned the dm_tree_node_add_raid_target_with_params() and dm_tree_node_add_raid_target() APIs for compatibility reasons. There's no user of the latter function, remove it. Related: rhbz834579 Related: rhbz1191935 Related: rhbz1191978
* lvconvert: add new reporting fields for reshapingHeinz Mauelshagen2017-03-018-127/+359
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During an ongoing reshape, the MD kernel runtime reads stripes relative to data_offset and starts storing the reshaped stripes (with new raid layout and/or new stripesize and/or new number of stripes) relative to new_data_offset. This is to avoid writing over any data in place which is non-atomic by nature and thus be recoverable without data loss in the transition. MD uses the term out-of-place reshaping for it. There's 2 other areas we don't have report capability for: - number of data stripes vs. total stripes (e.g. raid6 with 7 stripes toal has 5 data stripes) - number of (rotating) parity/syndrome chunks (e.g. raid6 with 7 stripes toal has 2 parity chunks; one per stripe for P-Syndrome and another one for Q-Syndrome) Thus, add the following reportable keys: - reshape_len (in current units) - reshape_len_le (in logical extents) - data_offset (in sectors) - new_data_offset ( " ) - data_stripes - parity_chunks Enhance lvchange-raid.sh, lvconvert-raid-reshape-linear_to_striped.sh, lvconvert-raid-reshape-striped_to_linear.sh, lvconvert-raid-reshape.sh and lvconvert-raid-takeover.sh to make use of new keys. Related: rhbz834579 Related: rhbz1191935 Related: rhbz1191978
* man: put some commands into advanced usage sectionDavid Teigland2017-03-013-11/+101
| | | | and separate commands with --
* commands: SECONDARY flag changes in cmd defsDavid Teigland2017-03-011-12/+14
| | | | | | | | | | | | | Add/remove the SECONDARY_SYNTAX flag to cmd defs. cmd defs with this flag will be listed under the ADVANCED USAGE man page section, so that the main USAGE section contains the most common commands without distraction. - When multiple cmd defs do the same thing, one variant can be displayed in the first list. - Very advanced, unusual or uncommon commands should be in the second list.
* raid: rework _raid_target_present()Heinz Mauelshagen2017-03-011-14/+29
| | | | | | | | | | | Recently added check for reshaping in this function called for a cleanup to avoid proliferating it with more explicit conditionals. Base the reshaping check on the given _features array. Related: rhbz834579 Related: rhbz1191935 Related: rhbz1191978