summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* vgextend: use process_each_vgdev-dct-systemid5David Teigland2014-10-226-83/+120
|
* reporter: always use process_each_pv to iterate through pvsDavid Teigland2014-10-223-46/+9
| | | | | | In a couple places, process_each_vg was used with a single function that would iterate through each pv in the vg. This is now what process_each_pv does, so use that.
* toollib: command should fail if ignoring named argDavid Teigland2014-10-213-8/+24
| | | | | | | | If a foreign VG is ignored when it's included by "all vgs", then the command shouldn't fail. If a foreign VG is ignored when it's named explicitly as a command arg, then the command should fail.
* system_id: use for VG ownershipDavid Teigland2014-10-2122-29/+714
| | | | See included lvmsystemid(7) for full description.
* liblvm2cmd: recognize quotes properly when splitting cmd line string into ↵Peter Rajnoha2014-10-172-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | argv array fields Fix lvm_split that is called when cmd line string is separated into argv fields to recognize quote chars ('\'" and '"') properly and when these quotes are used, consider the text within quotes as one argument, do not separate it based on space characters inside. The lvm_split is used during processing lvm shell command line or when calling lvm commands through cmdlib (e.g. dmeventd plugins). For example, the lvm shell scenario: Before this patch: $lvm lvm> lvs --config 'global{ suffix=0 }' Parse error at byte 9 (line 1): unexpected token Failed to set overridden configuration entries. With this patch applied: $lvm lvm> lvs --config 'global{ suffix=0 }' LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert root fedora -wi-ao---- 9.00g swap fedora -wi-ao---- 512.00m (Exactly the same problem is hit when calling LVM commands with quoted arguments via lvm2cmd lib in dmeventd plugins.)
* toollib: remove unsed variable in process_each_segment_in_pvDavid Teigland2014-10-161-1/+0
| | | | Was left unused from the last change to this function.
* toollib: remove dead codeDavid Teigland2014-10-151-32/+2
| | | | | | | Because of the recent change to process_each_pv(), the vg is always provided when the pv is in a vg. is_pv(pv) means the pv is in a vg, which means that the vg arg will not be NULL, which means the removed block of code is not needed.
* NIX: Give the VMs 2G of RAM (for tmpfs) until the new runner is merged.Petr Rockai2014-10-141-1/+1
|
* vgcreate: Permit non-power-of-2 extent sizes.Alasdair G Kergon2014-10-1411-81/+107
| | | | | Relax validation to permit extent sizes > 128KB that are not powers of 2 with lvm2 format. Existing code was already capable of handling this.
* systemd: remove workaround for lvm2-monitor.service's ExecStop linePeter Rajnoha2014-10-142-2/+2
| | | | | | | | | | | | | | Bug https://bugzilla.redhat.com/show_bug.cgi?id=843587 is handled better now - the hang does not occur anymore. There are still error messages issued though during shutdown if someone stops lvm2-lvmetad.service manually that lvm2-monitor.service depends on (even during shutdown). These errors are correct though and will point to incorrect configuration (still having use_lvmetad=1 in lvm.conf and stopping lvm2-lvmetad.service manually). The workaround to prevent the hang is not needed now. So the '--config "global{use_lvmetad=0}"' is now removed from the lvm2-monitor.service's ExecStop line.
* device: Fix BLKSSZGET definition check.Alasdair G Kergon2014-10-131-1/+1
|
* lvchange: Allow appropriate actions on cache (in addition to thin) pools.Petr Rockai2014-10-132-2/+5
|
* toollib: validate_restricted_lvname_paramZdenek Kabelac2014-10-084-8/+26
| | | | | Lets make a separate new function to validate names that has to follow up restriction rules.
* filter-usable: filter out blocked and suspended devices firmly when scanning ↵Peter Rajnoha2014-10-081-2/+9
| | | | | | | | | | for lvmetad We can't hang on blocked or suspended devices when the scan is done for lvmetad update - when the device gets unblocked or resumed, there's always CHANGE event generated which will fire the udev rule to run extra pvscan --cache for that device which makes sure that lvmetad is up-to-date.
* vgremove: Use process_each_lv_in_vg.Alasdair G Kergon2014-10-079-47/+37
|
* test: Fix lvconvert-raid-allocation's use of lvconvert --repair.Petr Rockai2014-10-071-1/+1
|
* metadata: Fix find_pv_in_vg for missing PVs/filtered devices.Petr Rockai2014-10-071-23/+12
|
* lvcreate: regression fix on lv name limitsZdenek Kabelac2014-10-073-3/+9
| | | | | | | | | | | | | | | When we are given an existing LV name - it needs to be allowed to pass in even restricted name as the LV could have existed long before we introduced some new restriction on prefix/suffix.i Fix the regression on name limits and drop restriction to be applied on any existing LVs - only the new created LV names have to be complient with current name restrictions. FIXME: we are currently using restricted names incorrectly in few other places - device_is_usable() skips restricted names, and udev flags are also incorrectly set for restricted names so these LVs are not getting links properly.
* cleanup: rename _name, _lv and _sizeZdenek Kabelac2014-10-075-174/+174
| | | | | Use some standard names for lv char * names, logical_volume * lv and sizes internally.
* tests: typosZdenek Kabelac2014-10-072-3/+3
|
* tests: put devs into ""Zdenek Kabelac2014-10-0717-1356/+1351
|
* tests: check for cache and raidZdenek Kabelac2014-10-072-4/+4
| | | | Skip some tests on systems without cache or raid.
* tests: move cache raid to separate fileZdenek Kabelac2014-10-072-41/+64
|
* cleanup: dont hide pv_dev declaration from pvZdenek Kabelac2014-10-071-6/+3
| | | | Just skip using local vars here...
* test: Creating a cache on top of active RAID works now.Petr Rockai2014-10-072-7/+1
|
* metadata: add internal error if PV has no existing device attached during ↵Peter Rajnoha2014-10-071-2/+26
| | | | | | | | | | | | find_pv_in_vg find_pv_in_vg fn iterates over the list of PVs covered by the VG and each PV's pvl->pv->dev is compared with device acquired from device cache. However, in case pvl->pv->dev is NULL as well as device cache returns NULL (e.g. when device is filtered), we'll get incorrect match and the code calling find_pv_in_vg uses incorrect PV (as it thinks it's the exact PV with the pv_name). The INTERNAL_ERROR covers this situation and errors out immediately.
* lvconvert: Allow --repair and --splitmirrors on reserved-name LVs.Petr Rockai2014-10-072-0/+18
|
* test: Add process-each toollib tests.David Teigland2014-10-075-0/+1937
|
* metadata: Use flags to control warnings.David Teigland2014-10-075-55/+62
| | | | | | | | | | | | | | | | | The warnings arg was used to enable logging of warnings when reading a PV. This arg is turned into a set of flags with the WARN_PV_READ flag matching the existing behavior. A new flag WARN_INCONSISTENT is added that will cause vg_read_internal() to log the "VG is not consistent" warning so the various callers do not need to log this warning themselves. A new vg_read flag READ_WARN_INCONSISTENT is used from reporting to enable the WARN_INCONSISTENT flag in vg_read_internal. [Committed by agk with cosmetic changes and tweaks.]
* vgreduce: Use process_each_pv.David Teigland2014-10-073-90/+79
| | | | | | Adapt process_each_pv for use by vgreduce in the non-repair case. [Committed by agk with cosmetic changes and tweaks.]
* toollib: Rewrite process_each_pv.David Teigland2014-10-079-310/+379
| | | | | | | | Process PVs by iterating through VGs, then iterating through devices if the command needs to process non-PV devices. The process_single function can always use the VG and PV args. [Committed by agk with cosmetic changes and tweaks.]
* lvmcache: Skip VG_GLOBAL cache lock state update.Alasdair G Kergon2014-10-071-4/+5
| | | | | Avoids message: Metadata cache has no info for vgname: "#global"
* man: lvmcache mention automatic pool conversionDavid Teigland2014-10-061-1/+28
| | | | | | When converting an origin to a cache lv, lvm will automatically convert the specified cache pool into a cache pool if it is not already a cache pool.
* toollib: Shuffle PV functions.Alasdair G Kergon2014-10-061-247/+248
|
* man: lvmcache changes related to removal and splittingDavid Teigland2014-10-061-18/+19
|
* man: lvmthin show the lvcreate -n option for poolsDavid Teigland2014-10-061-6/+2
| | | | | | lvcreate of thin pools can now use '-n lv vg' like other lv types, or it can name the new thin pool in the free arg as 'vg/lv', which is not allowed with other lv types.
* toollib: Remove unused functions from header file.Alasdair G Kergon2014-10-062-35/+26
|
* tests: lvconvert cache usage of thin poolZdenek Kabelac2014-10-061-0/+50
| | | | Checked stacking usage of thin pool data volume being cached.
* tests: lvconvert thin poolZdenek Kabelac2014-10-061-13/+40
| | | | More tests.
* tests: lvconvert cacheZdenek Kabelac2014-10-061-32/+93
| | | | Many new tests
* tests: lvcreate external originZdenek Kabelac2014-10-061-4/+7
| | | | | | Fix unsupportable case. We cannot create thinpool and snapshot at the same time. (-L could not have 2 meanings).
* tests: lvcreate thin-pool support --nameZdenek Kabelac2014-10-061-1/+25
|
* tests: lvcreate cache interface updatesZdenek Kabelac2014-10-061-57/+103
|
* cleanup: indentZdenek Kabelac2014-10-061-2/+2
|
* cleanup: typo updateZdenek Kabelac2014-10-061-2/+2
|
* cleanup: error is already loggedZdenek Kabelac2014-10-061-6/+2
| | | | | Function get_only_segment_using_this_lv() already prints error, no need to show more internal logic to user as an error.
* cleanup: lvconvert use standard function exitZdenek Kabelac2014-10-061-15/+18
| | | | Use 1|0 inside _lvconvert_splitsnapshot to match rest of code.
* validation: use validate_pool_chunk_sizeZdenek Kabelac2014-10-061-7/+3
| | | | We could validation pool chunk size with a single function.
* validation: share more code for pool validationZdenek Kabelac2014-10-062-4/+5
| | | | Reuse thin validation code for cache pool validation.
* lvcreate: validate sizesZdenek Kabelac2014-10-061-4/+10
| | | | | Earlier validation of --size and --extents. Reject 0 size on command line instantly.