summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* lvconvert: add enum for each operationdev-dct-lvconvert-typesDavid Teigland2016-08-011-1/+99
|
* lvconvert: use type from command line to determine operationDavid Teigland2016-08-011-14/+47
| | | | | | | When checking the command line syntax that was used, don't check lp->type_str which is set in other ways when determining the type to use, and may not be exactly what was on the command line.
* lvconvert: --stripes is an alias for --type stripedDavid Teigland2016-08-011-1/+4
| | | | | This was missing from the mapping of syntax to each operation.
* Revert "thin: when converting a thin pool data or metadata LV from"Alasdair G Kergon2016-08-011-1/+1
| | | | | | | | | This reverts commit 237f84e0383c7e3003050be7c072ee0a092fd426. This case failed: lvcreate --type raid1 -m1 -l2 vg99 lvcreate -aey -l2 -s vg99/lvol0 lvconvert -m2 vg99/lvol0
* lvconvert: Set lp->segtype in only one place.Alasdair G Kergon2016-07-301-16/+14
|
* lvconvert: Rely upon lp->thin and lp->cache.Alasdair G Kergon2016-07-301-5/+5
|
* lvconvert: Fix --type thin recognition.Alasdair G Kergon2016-07-301-1/+1
| | | | lp->thin already holds the result of the cmdline arg resolution.
* tools: Also recognise segtype with thin and cache.Alasdair G Kergon2016-07-301-0/+2
| | | | | (--type thin still needs this for lvcreate - more logic should be shared between lvcreate and lvconvert)
* tools: mirror also supports stripesizeAlasdair G Kergon2016-07-301-1/+2
|
* lvconvert: Move stripe validation code later.Alasdair G Kergon2016-07-301-17/+17
| | | | | Simpler to delay it all until the actual LV being changed is available, rather than having it split in two parts.
* tools: Unify stripesize parameter validation.Alasdair G Kergon2016-07-306-33/+35
| | | | | | Move it all into get_stripe_params(). Some code paths missed --stripesize checks. E.g. lvcreate --type raid4 -i1
* lvconvert: Rearrange code that decides segtype.Alasdair G Kergon2016-07-302-53/+39
|
* lvconvert: Only obtain --type parameter once.Alasdair G Kergon2016-07-291-55/+51
|
* lvconvert: Remove hard-coded segment names.Alasdair G Kergon2016-07-291-58/+58
|
* thin: when converting a thin pool data or metadata LV fromHeinz Mauelshagen2016-07-291-1/+1
| | | | | | linear to raid1, the linear wasnt't switched to the raid1 mapping, thus creating the false impression of resilience.
* post-releaseAlasdair G Kergon2016-07-284-2/+8
|
* pre-releasev2_02_162Alasdair G Kergon2016-07-287-5/+17
|
* vgsplit: ea90a3d622 added an unconditional call to lv_is_on_pvs()Heinz Mauelshagen2016-07-281-2/+2
| | | | | | | | on any thin snap external origin LV which caused a segfault when none existed as exposed by the vgsplit-thin.sh test. Only call lv_is_on_pvs() if an external origin LV actually exists and correct the related splitting logic.
* lvmdbusd: Add '-y' to lvconvert for lv cache createTony Asleson2016-07-281-1/+1
| | | | | | | | | When converting to a cache lv, tests were hanging with a prompt for "Do you want wipe existing metadata of cache pool volume To preserve cache metadata add option "--zero n". WARNING: Reusing mismatched cache pool metadata MAY DESTROY YOUR DATA!" This is new.
* lvmdbusd: Fix hang for Job.Wait(n)Tony Asleson2016-07-282-4/+34
| | | | | | | | | | | When a client is doing a wait on a job, any other clients will hang when trying to do anything with the service. This is caused by the wait code which was placing the thread that handles incoming dbus requests to sleep until either the timeout expired or the job operation completed. This change creates a thread for the wait request, so that the thread processing incoming requests can continue to run.
* man: lvcreate correction on --stripes explanation and examplesHeinz Mauelshagen2016-07-281-8/+21
| | | | | | | | with respect to the changed, configurable default behaviour introduced with commit 7eb79091937d. E.g. raid default of 2 stripes rather than number of PVs in the VG or on the command line minus one.
* tests: updates for new raid allocation logicZdenek Kabelac2016-07-282-6/+38
| | | | | (with backward compatible settings user as well to check old logic is still available when needed).
* config: keep new setting commented outZdenek Kabelac2016-07-282-2/+3
|
* vg_validate: only reject min_recovery_rate in case max_recovery_rate is set ↵Heinz Mauelshagen2016-07-271-2/+3
| | | | and smaller
* vg_validate: add missing check for raid6 segment typesHeinz Mauelshagen2016-07-271-0/+1
|
* vg_validate: fix seg->extents_copied check introduced withHeinz Mauelshagen2016-07-272-3/+4
| | | | | commit 8f62b7bfe5 and add comment for the member to 'struct lv_segment'
* vgsplit: restore check for thin pool external originDavid Teigland2016-07-271-1/+2
| | | | | | Fix a regression from commit 4420d41f, in which the check was skipped for splitting a thin pool and an external origin.
* man: lvmthin clean up syntax exampleDavid Teigland2016-07-271-1/+1
| | | | | | | The syntax for converting an LV to a thin LV included an unnecessary --thin option. I was probably still confused about these options when writing this.
* lvcreate.c: respect DEFAULT_RAID_MAX_IMAGES on creation of any RaidLVHeinz Mauelshagen2016-07-271-15/+8
|
* vg_validate: segment check enhancements for raids to catch bogus metadataHeinz Mauelshagen2016-07-273-1/+252
| | | | | | | | | | | | | General RAID and RAID segment type specific checks are added to merge.c. New static _check_raid_seg() is called on each segment of a RaidLV (which have just one) from check_lv_segments(). New checks caught some unititialized segment members which are addressed here as well: - initialize seg->region_size to 0 in lvcreate.c for raid0/raid0_meta - initialize list seg->origin_list in lv_manip.c
* tests: check we don't warn when converting to thin LVZdenek Kabelac2016-07-271-0/+8
| | | | Tool produced warning for non-zeroing thin-pools.
* tests: adapt for new cache-pool zeroingZdenek Kabelac2016-07-274-5/+5
|
* lvconvert: support --zero for full cache pool conversion.Zdenek Kabelac2016-07-272-11/+29
| | | | | | | | Add matching support for -Z option also we doing full conversion to cache-pool. Extending coversion message to show which pool type is created and whether the metadata will be wiped or remain unmodified.
* lvconvert: tune cache-pool zeroingZdenek Kabelac2016-07-272-13/+17
| | | | | | | | | | | | | | Follow-up to 27a767d5e8cedf9cac31eb3562cf8fdd4aa88b7c. Tunning behavior in a way we always prompt when option --zero is NOT specified. Without -Z lvm expects user wants to 'reset' cache-pool metadata (they could have been splitted from some cached LV) If user doesn't want to zero metadata he needs to specify -Zn. User may also avoid prompting for zeroing by using -Zy for cache-pool (basically equals using --yes without -Z being given) (unlike full convert case, there is no cache-pool being converted, so there is not 'uncoditional' prompt in this case).
* lvconvert: suppress zeroing warning when converting to thinZdenek Kabelac2016-07-274-2/+7
| | | | | | | | | | | | | | | | When volume was lvconvert-ed to a thin-volume with external origin, then in case thin-pool was in non-zeroing mode it's been printing WARNING about not zeroing thin volume - but this is wanted and expected - so nothing to warn about. So in this particular use case WARNING needs to be suppressed. Adding parameter support for lvcreate_params. So now lvconvert creates 'normal thin LV' in read-only mode (so any read will 'return 0' for a moment) then deactivate regular thin LV and reacreate in 'final R/RW' mode thin LV with external origin and activate again.
* tests: add pv-ext-update.sh testPeter Rajnoha2016-07-271-0/+186
| | | | | Tests automatic update of PV header (its "extension" part) to recent version.
* metadata: fix automatic updates of PV extension headers to newest versionPeter Rajnoha2016-07-262-10/+34
| | | | | | | | | | | | | | | | | | | | | | Before, the automatic update from older to newer version of PV extension header happened within vg_write call. This may have caused problems under some circumnstances where there's a code in between vg_write and vg_commit which may have failed. In such situation, we reverted precommitted metadata and put back the state to working version of VG metadata. However, we don't have revert for PV write operation at the moment. So if we updated PV headers already and we reverted vg_write due to failure in subsequent code (before vg_commit), we ended up with lost VG metadata (because old metadata pointers got reset by the PV write operation). To minimize problematic situations here, we should put vg_write and vg_commit that is done after PV header rewrites as close to each other as possible. This patch moves the automatic PV header rewrite for new extension header part from vg_write to _vg_read where it's done the same way as we do any other VG repairs if detected during VG read operation (under VG write lock).
* libdm: report: fix json reporting to escape '"' character that may appear in ↵Peter Rajnoha2016-07-262-3/+30
| | | | reported string
* lvconvert: --trackchanges requires --splitmirrors 1Alasdair G Kergon2016-07-252-3/+9
|
* lvmlockd: improve error message about missing global lockDavid Teigland2016-07-253-3/+24
| | | | | | | | | If the VG holding the global lock is removed, we can indicate that as the reason for not being able to acquire the global lock in subsequent error messages, and can suggest enabling the global lock in another VG. (This helpful error message will go away if the global lock is enabled in another VG, or if lvmlockd is restarted.)
* lvconvert: --trackchanges requires --splitmirrorsAlasdair G Kergon2016-07-252-15/+25
|
* lvconvert: remove warnings about deprecated split optionDavid Teigland2016-07-251-9/+3
| | | | | A warning seems too severe for this message, so leave it out until there's a better idea.
* lvmlockd: improve message for lock-startDavid Teigland2016-07-251-8/+35
| | | | | Only print this for shared VGs, and include the time it may take for sanlock.
* man: add note about 'lastlog' built-in commandPeter Rajnoha2016-07-252-0/+5
|
* segtype: Fix unrecognised flag message.Alasdair G Kergon2016-07-252-1/+2
| | | | Show in hex not decimal.
* conf: regenerate example.conf.inPeter Rajnoha2016-07-251-7/+6
|
* raid_manip: Some validation functions.Alasdair G Kergon2016-07-241-1/+60
|
* raid_manip: Fix stripe_size type to uint32_t.Alasdair G Kergon2016-07-241-1/+1
|
* raid_manip: Reorder some functions.Alasdair G Kergon2016-07-241-424/+432
|
* lvmlockd: improve activation locking error messageDavid Teigland2016-07-221-2/+3
| | | | to include the LV type