summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* man: lvmthin section about use-policiesdev-dct-lvmthinDavid Teigland2015-04-291-2/+121
|
* tests: try harder to kill all dangling procsOndrej Kozina2015-04-286-160/+117
| | | | | also simplify and make less prone to an error checks for running bg processes inside a pvmove-resume tests
* tests: simplify removal of dangling bg procsOndrej Kozina2015-04-285-31/+17
| | | | | | | | | | | | | | | | | | | | | | some tests left dangling bg processes originating in lvm2 commands being able to spawn any bg polling process (lvchange, vgchange, pvmove, lvconvert...) Initial fn 'add_to_kill_list' should collect processes with specific parameters (proc's command line and parent processes ID). After testing finishes the fn kill_listed_processes should remove these listed by 'add_to_kill_list'. Unfortunately it proved to be prone to an error especially in scenarios where cmd line of initiating command contained characters required to be espaced before passing to shell script to make it work correctly. (Or if cmd spawned more than one bg process with same cmd line. i.e.: vgchange or lvchange). The new implementation is much simpler. It uses env. variable (LVM_TEST_TAG) for marking a process desired to be killed later or during test env. teardown. (i.e.: LVM_TEST_TAG=kill_me_$PREFIX to kill only processes related to current test environment)
* config: Introduce lvmconfig.Alasdair G Kergon2015-04-2814-187/+261
| | | | | | | | | | 'lvm dumpconfig' now does a lot more than just dumping configuration information and is no longer only a support tool. Users now need to run it to find out about configuration information that has been removed from the lvm.conf man page so we need to promote this to full command line status as 'lvmconfig'. Also accept 'lvm config' and mention it in the usage information of lvmconf (which should also get merged in eventually).
* devices: improve handling of duplicate PVsDavid Teigland2015-04-283-48/+220
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Example: /dev/loop0 and /dev/loop1 are duplicates, created by copying one backing file to the other. 'identity /dev/loopX' creates an identity mapping for loopX named idmloopX, which adds a duplicate for the named device. The duplicate selection code for lvmetad is incomplete, and lvmetad is disabled for this example. [~]# losetup -f loopfile0 [~]# pvs PV VG Fmt Attr PSize PFree /dev/loop0 foo lvm2 a-- 308.00m 296.00m [~]# losetup -f loopfile1 [~]# pvs Found duplicate PV LnSOEqzEYED3RvIOa5PZP2s7uyuBLmAV: using /dev/loop1 not /dev/loop0 Using duplicate PV /dev/loop1 which is more recent, replacing /dev/loop0 PV VG Fmt Attr PSize PFree /dev/loop1 foo lvm2 a-- 308.00m 308.00m [~]# ./identity /dev/loop0 [~]# pvs Found duplicate PV LnSOEqzEYED3RvIOa5PZP2s7uyuBLmAV: using /dev/loop1 not /dev/loop0 Using duplicate PV /dev/loop1 without holders, replacing /dev/loop0 Found duplicate PV LnSOEqzEYED3RvIOa5PZP2s7uyuBLmAV: using /dev/mapper/idmloop0 not /dev/loop1 Using duplicate PV /dev/mapper/idmloop0 from subsystem DM, replacing /dev/loop1 PV VG Fmt Attr PSize PFree /dev/mapper/idmloop0 foo lvm2 a-- 308.00m 296.00m [~]# ./identity /dev/loop1 [~]# pvs WARNING: duplicate PV LnSOEqzEYED3RvIOa5PZP2s7uyuBLmAV is being used from both devices /dev/loop0 and /dev/loop1 Found duplicate PV LnSOEqzEYED3RvIOa5PZP2s7uyuBLmAV: using /dev/loop1 not /dev/loop0 Using duplicate PV /dev/loop1 which is more recent, replacing /dev/loop0 Found duplicate PV LnSOEqzEYED3RvIOa5PZP2s7uyuBLmAV: using /dev/mapper/idmloop0 not /dev/loop1 Using duplicate PV /dev/mapper/idmloop0 from subsystem DM, replacing /dev/loop1 Found duplicate PV LnSOEqzEYED3RvIOa5PZP2s7uyuBLmAV: using /dev/mapper/idmloop1 not /dev/mapper/idmloop0 Using duplicate PV /dev/mapper/idmloop1 which is more recent, replacing /dev/mapper/idmloop0 PV VG Fmt Attr PSize PFree /dev/mapper/idmloop1 foo lvm2 a-- 308.00m 308.00m
* config: improve the description of options listsDavid Teigland2015-04-281-4/+4
| | | | | | | | | | | Describe thin_check_options, thin_repair_options, cache_check_option, scache_repair_options as a "list of options", rather than a "string of options" because a single string, e.g. "-q --clear-needs-check-flag" does not work, and needs to be entered as a list, e.g. ["-q", "--clear-needs-check-flag"]
* config: also evaluate default unconfigured values in runtime for ↵Peter Rajnoha2015-04-283-44/+97
| | | | | | | | | | | | | | | | | | | | 'cfg_runtime' settings The settings which have their default value evaluated in runtime should have their 'unconfigured' counterparts also evaluated in runtime since those values can be constructed by using other settings. For example, before this patch: $ lvm dumpconfig --type default --unconfigured devices/cache_dir devices/cache cache_dir="@DEFAULT_SYS_DIR@/@DEFAULT_CACHE_SUBDIR@" cache="/etc/lvm/cache/.cache With this patch applied: $ lvm dumpconfig --type default --unconfigured devices/cache_dir devices/cache cache_dir="@DEFAULT_SYS_DIR@/@DEFAULT_CACHE_SUBDIR@" cache="@DEFAULT_SYS_DIR@/@DEFAULT_CACHE_SUBDIR@/.cache"
* config: make it possible to set default unconfigured_value for settings of ↵Peter Rajnoha2015-04-281-4/+4
| | | | | | | | all types, not just strings The @something@ used for unconfigured default value is not bound to CFG_TYPE_STRING settings defined in config_settings.h, it can be used for any other config type too.
* refactor: rename struct cfg_def_item's 'unconfigured_path' to ↵Peter Rajnoha2015-04-282-13/+13
| | | | | | | 'unconfigured_value' It's not only path that can be used for setting's default value in unconfigured form as @something@.
* conf: Avoid temp files when generating config.Alasdair G Kergon2015-04-281-7/+3
|
* tests: more help#Zdenek Kabelac2015-04-281-0/+1
|
* tests: always zero disk headerZdenek Kabelac2015-04-281-0/+2
| | | | | It appear that older wipefs doesn't wipe partition table. So ensure there is no partition on LVM_TEST_BACKING_DEVICE.
* tests: more descriptive auxZdenek Kabelac2015-04-281-6/+17
| | | | Tell what's reason of aux fail here.
* tests: drop debug testZdenek Kabelac2015-04-281-1/+0
| | | | Remove 'debug leftover' from test.
* example.conf.in: regenerateDavid Teigland2015-04-271-4/+5
| | | | From recent config_settings.h changes.
* config: fix a couple mistakes with defaultsDavid Teigland2015-04-271-3/+3
| | | | for archive, archive_dir, and cache
* tests: use new help in auxZdenek Kabelac2015-04-252-148/+50
| | | | Simplify tests and use aux mdadm helpers.
* tests: aux for mdadmZdenek Kabelac2015-04-251-1/+66
| | | | Implement aux helper fce for mdadm.
* tests: allow add printable skip messageZdenek Kabelac2015-04-251-0/+1
|
* tests: check sysfs more genericallyZdenek Kabelac2015-04-253-10/+10
| | | | Allow to access more files in device sysfs subtree.
* tests: add double quotes around add_to_kill_list parmsOndrej Kozina2015-04-253-8/+8
|
* tests: try more advanced cleanZdenek Kabelac2015-04-251-1/+2
| | | | | | When test is executed on real device - lets try a more complete cleanup - discard whole device first and try to wipe any headers it might be left from previous test.
* cleanup: ancestors -> lv_ancestors, descendants -> lv_descendantsPeter Rajnoha2015-04-243-8/+8
| | | | Use "lv_" prefix as they're LV fields.
* report: add lv_ancestors and lv_descendants reporting fieldsPeter Rajnoha2015-04-244-0/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Show full chain of ancestors and descendants for snapshots (both thick and thin - in case of thick, the "ancestor" field is actually equal to "origin" field as snapshots can't be chained for thick snapshots). These fields display current state as it is, they do not display any history! If the snapshot chain is broken in the middle, we don't report the historical origin (this is going to be a part of another patch and a different set of fields or just a switch for existing fields to show ancestors and descendants with history included). For example: (origin --> snapshot) lvol1 --> lvol2 --> lvol3 --> lvol4 \ --> lvol5 --> lvol6 --> lvol7 --> lvol8 $ lvs -o name,pool_lv,origin,ancestors,descendants vg LV Pool Origin Ancestors Descendants lvol1 pool lvol2,lvol3,lvol4,lvol5,lvol6,lvol7,lvol8 lvol2 pool lvol1 lvol1 lvol3,lvol4,lvol5,lvol6,lvol7,lvol8 lvol3 pool lvol2 lvol2,lvol1 lvol4 lvol4 pool lvol3 lvol3,lvol2,lvol1 lvol5 pool lvol2 lvol2,lvol1 lvol6,lvol7,lvol8 lvol6 pool lvol5 lvol5,lvol2,lvol1 lvol7,lvol8 lvol7 pool lvol6 lvol6,lvol5,lvol2,lvol1 lvol8 lvol8 pool lvol7 lvol7,lvol6,lvol5,lvol2,lvol1
* select: fix matching reserved values while <,<=,>,>= is used in selection ↵Peter Rajnoha2015-04-244-50/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | criteria Scenario: $ vgs -o+vg_mda_copies VG #PV #LV #SN Attr VSize VFree #VMdaCps fedora 1 2 0 wz--n- 9.51g 0 unmanaged vg 16 9 0 wz--n- 1.94g 1.83g 2 $ lvs -o+read_ahead vg/lvol6 vg/lvol7 LV VG Attr LSize Pool Origin Data% Rahead lvol6 vg Vwi-a-tz-- 1.00g pool lvol5 0.00 auto lvol7 vg Vwi---tz-k 1.00g pool lvol6 256.00k Before this patch: $vgs -o vg_name,vg_mda_copies -S 'vg_mda_copies < unmanaged' VG #VMdaCps vg 2 Problem: Reserved values can be only used with exact match = or !=, not <,<=,>,>=. In the example above, the "unamanaged" is internally represented as 18446744073709551615, but this should be ignored while not comparing field directly with "unmanaged" reserved name with = or !=. Users should not be aware of this internal mapping of the reserved value name to its internal value and hence it doesn't make sense for such reserved value to take place in results of <,<=,> and >=. There's no order defined for reserved values!!! It's a special *reserved* value that is taken out of the usual value range of that type. This is very similar to what we have already fixed with 2f7f6932dcd450ba75fe590aba8c09838d2618dc, but it's the other way round now - we're using reserved value name in selection criteria now (in the patch 2f7f693, we had concrete value and we compared it with the reserved value). So this patch completes patch 2f7f693. This patch also fixes this problem: $ lvs -o+read_ahead vg/lvol6 vg/lvol7 -S 'read_ahead > 32k' LV VG Attr LSize Pool Origin Data% Rahead lvol6 vg Vwi-a-tz-- 1.00g pool lvol5 0.00 auto lvol7 vg Vwi---tz-k 1.00g pool lvol6 256.00k Problem: In the example above, the internal reserved value "auto" is in the range of selection "> 32k" - it shouldn't match as well. Here the "auto" is internally represented as MAX_DBL and of course, numerically, MAX_DBL > 256k. But for users, the reserved value should be uncomparable to any number so the mapping of the reserved value name to its interna value is transparent to users. Again, there's no order defined for reserved values and hence it should never match if using <,<=,>,>= operators. This is actually exactly the same problem as already described in 2f7f6932dcd450ba75fe590aba8c09838d2618dc, but that patch failed for size field types because of incorrect internal representation used. With this patch applied, both problematic scenarios mentioned above are fixed now: $ vgs -o vg_name,vg_mda_copies -S 'vg_mda_copies < unmanaged' (blank) $ lvs -o+read_ahead vg/lvol6 vg/lvol7 -S 'read_ahead > 32k' LV VG Attr LSize Pool Origin Rahead lvol7 vg Vwi---tz-k 1.00g pool lvol6 256.00k
* tests: fix md raid test on real /devZdenek Kabelac2015-04-232-14/+22
| | | | | | | Zero raid signatures when raid is stopped - so signatures are not requiring wipe when pvcreate follows. Handle real /dev
* libdm: Add uuid/devno to ioctl failure log message.Alasdair G Kergon2015-04-232-3/+18
|
* libdm: Add DM_INTERNAL_SUSPEND_FLAG.Alasdair G Kergon2015-04-232-3/+9
| | | | Still needs to be reported by dmsetup.
* config: fix check_options arrayDavid Teigland2015-04-233-7/+9
| | | | | | The code used it as both a single string, and as an array of strings in different places. Fix it so that it's an array of strings everywhere.
* config: thin_disabled_features default should be undefinedDavid Teigland2015-04-231-1/+1
| | | | | An array that's empty by default should be flagged as undefined.
* Improve duplicate PV handlingDavid Teigland2015-04-222-17/+20
| | | | | Make the processing of duplicate PVs the same with and without lvmetad.
* man: Escape single quotes in an example to avoid groff's unicode conversion.Petr Rockai2015-04-221-1/+1
|
* make: autoconfisms for generateDavid Teigland2015-04-221-3/+3
|
* make: let generate use the just built libdmDavid Teigland2015-04-221-2/+2
|
* doc: Update dm kernel files.Alasdair G Kergon2015-04-2210-65/+787
| | | | v4.0-9804-gdb4fd9c
* tests: add missing "" around devZdenek Kabelac2015-04-221-1/+1
|
* tests: aux works better with installed_testsuiteZdenek Kabelac2015-04-221-18/+15
| | | | | | | | When test suite is used from installed rpm package we need to handle things better. This patch is rather first approach - expecting few more tweaks needed.
* tests: simplify teardownZdenek Kabelac2015-04-222-1/+5
| | | | If TESTNAME has not been created yet, avoid running complex teardown.
* makefiles: avoid // in datadir usageZdenek Kabelac2015-04-221-1/+1
| | | | DESTDIR already comes with '/'
* tests: install also api testZdenek Kabelac2015-04-221-1/+5
| | | | | Install .t & .py binaries. On 'make clean' ensure also -t files are removed.
* tests: drop DEBUG log after successZdenek Kabelac2015-04-221-38/+43
| | | | | | | At this moment LVM_LOG_FILE_EPOCH with LVM_EXPECTED_EXIT_STATUS properly deletes debug logs only for real commands - support for lvm2 API does not yet exists
* tests: use 800ms delayZdenek Kabelac2015-04-221-1/+1
| | | | Worked better with pvmove-abort-all so use here as well.
* tests: notify drops log alwaysZdenek Kabelac2015-04-221-1/+3
| | | | Even on success remove debug.log here.
* tests: explicitely ignore result codeZdenek Kabelac2015-04-221-2/+2
|
* tests: allow to use sysfs filterZdenek Kabelac2015-04-221-1/+1
| | | | | Current filtering logic in lvm2 needs some rework. For now at least enable it in test suite.
* nix: install also mdadmZdenek Kabelac2015-04-221-2/+3
| | | | Some tests are checking functinality of lvm2 with mdadm.
* config: thin_repair_options and cache_repair_options are undefinedDavid Teigland2015-04-212-4/+6
| | | | | | | | | | | | | | By default these are empty strings, so the config settings should be flagged as undefined, so they will be commented out of the generated config. Otherwise, the lines: thin_repair_options="" cache_repair_options="" in the dump output cause a warning when processed since lvm doesn't want an empty string. Also regenerate lvm.conf.in.
* generate example.conf.in, lvmlocal.conf.inDavid Teigland2015-04-212-0/+1675
| | | | These were created by 'make generate'.
* config: remove duplication of settingsDavid Teigland2015-04-218-1934/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The specific config settings have been removed from the lvm.conf(5) man page, and replaced with a description of how to use lvm dumpconfig to view the settings. The sample lvm.conf and lvmlocal.conf files are now generated: example.conf.base - initial ungenerated part of the file example.conf.gen - generated portion from dumpconfig example.conf.in - combination of .base and .gen files example.conf - result of configure processing .in file lvmlocal.conf.base - initial ungenerated part of the file lvmlocal.conf.gen - generated portion from dumpconfig lvmlocal.conf.in - combination of .base and .gen files lvmlocal.conf - result of configure processing .in file Do not edit the .in files, but edit config_settings.h or the .base files, and then use 'make generate' to create the new .in files. - configure with options - make creates tools/lvm - make generate uses tools/lvm to create example.conf.in and lvmlocal.conf.in by combining .base files with dumpconfig output. - configure with same options as above creates example.conf and lvmlocal.conf from .in files
* dumpconfig: add --ignorelocalDavid Teigland2015-04-217-1/+16
| | | | | When generating a sample lvm.conf file, we don't want to include the "local" section, which is kept in lvmlocal.conf.