summaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
...
* Add the ability to convert LVs of "mirror" segtype to "raid1" segtype.Jonathan Earl Brassow2011-10-071-13/+42
| | | | | | | | | | | | | | | | | Example: ~> lvconvert --type raid1 vg/mirror_lv Steps to convert "mirror" to "raid1" 1) Allocate a RAID metadata LV for each mirror image from the same PVs on which they are located. 2) Clear the metadata LVs. This involves writing LVM metadata, so we don't change any aspects of the mirror LV before this so that the user can easily remove LVs from the failed convert attempt while retaining the original mirror. 3) Remove the mirror log, if it exists. 4) Add metadata LVs to mirror LV 5) Rename mirror sub-lvs (s/mimage/rimage/) 6) Change flags and segtype from mirror to raid1
* Add the ability to convert linear LVs to RAID1Jonathan Earl Brassow2011-10-071-6/+16
| | | | | | | | | | | | | | | | | | | | | | Example: ~> lvconvert --type raid1 -m 1 vg/lv The following steps are performed to convert linear to RAID1: 1) Allocate a metadata device from the same PV as the linear device to provide the metadata/data LV pair required for all RAID components. 2) Allocate the required number of metadata/data LV pairs for the remaining additional images. 3) Clear the metadata LVs. This performs a LVM metadata update. 4) Create the top-level RAID LV and add the component devices. We want to make any failure easy to unwind. This is why we don't create the top-level LV and add the components until the last step. Should anything happen before that, the user could simply remove the unnecessary images. Also, we want to ensure that the metadata LVs are cleared before forming the array to prevent stale information from polluting the new array. A new macro 'seg_is_linear' was added to allow us to distinguish linear LVs from striped LVs.
* Fix vgsplit when there are mirrors that have mirrored logs.Jonathan Earl Brassow2011-10-061-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem as reported by "ben <benscott@nwlink.com>" on lvm-devel: vgsplit fails with mirrored mirror log #lvs --all -o lv_name,lv_attr,devices LV Attr Devices MyMirror mwi-- [MyMirror_mimage_0] Iwi--- /dev/sdq(0) [MyMirror_mimage_1] Iwi--- /dev/sdo(0) [MyMirror_mimage_2] Iwi--- /dev/sdi(0) [MyMirror_mlog] mwi--- [MyMirror_mlog_mimage_0] Iwi--- /dev/sds(0) [MyMirror_mlog_mimage_1] Iwi--- /dev/sde(0) #vgsplit -v "TestA" "TestB" "/dev/sdq" "/dev/sdo" "/dev/sdi" "/dev/sds" "/dev/sde" Checking for volume group "TestA" Checking for new volume group "TestB" Archiving volume group "TestA" metadata (seqno 213). Can't split mirror MyMirror between two Volume Groups AFTER FIX: [root@bp-01 ~]# lvs -a -o name,vg_name,devices vg new Volume group "new" not found Skipping volume group new LV VG Devices lv vg lv_mimage_0(0),lv_mimage_1(0) [lv_mimage_0] vg /dev/sdb1(0) [lv_mimage_1] vg /dev/sdc1(0) [lv_mlog] vg lv_mlog_mimage_0(0),lv_mlog_mimage_1(0) [lv_mlog_mimage_0] vg /dev/sdh1(0) [lv_mlog_mimage_1] vg /dev/sdi1(0) [root@bp-01 ~]# vgsplit vg new /dev/sd[bchi]1 New volume group "new" successfully split from "vg" [root@bp-01 ~]# lvs -a -o name,vg_name,devices vg new LV VG Devices lv new lv_mimage_0(0),lv_mimage_1(0) [lv_mimage_0] new /dev/sdb1(0) [lv_mimage_1] new /dev/sdc1(0) [lv_mlog] new lv_mlog_mimage_0(0),lv_mlog_mimage_1(0) [lv_mlog_mimage_0] new /dev/sdh1(0) [lv_mlog_mimage_1] new /dev/sdi1(0)
* Let the utils to prepare PVsZdenek Kabelac2011-09-291-1/+1
|
* Use execvp for clvmd restartZdenek Kabelac2011-09-261-5/+14
| | | | | | | | | | Since execve passed only NULL as environ, we had lost all environment vars on restart - thus actually running 'different' clvmd then the one at start. Preserving environ allows to restart clvmd with the same settings (i.e. LD_LIBRARY_PATH) Add test for second restart.
* Restart CLVMD with same cluster managerZdenek Kabelac2011-09-251-0/+44
| | | | | | | | Add named cluster_ops to easily learn the name of the active cluster manager, so we are able to restart singlenode manager in testing. Add simple test for clvmd -S (restart) and -R (refresh) (though it needs some extensions).
* Allow overwrite for VERIFY_UDEVZdenek Kabelac2011-09-241-3/+3
| | | | | | | | | When running tests it might be useful to have an override option when testing on real /dev and some broken system (i.e. Debian and its rules). So one can use: LVM_TEST_DEVDIR=/dev LVM_VERIFY_UDEV=1 make check
* Avoid sending garbage to terminal in verbose mode.Zdenek Kabelac2011-09-241-5/+6
| | | | | | When read in drain returned <0 value, terminal content has been trashed. Remove unneeded memset() and use whole buffer. Free readbuf before exit (valgrind).
* ImprovementsZdenek Kabelac2011-09-241-16/+18
| | | | | | | | | Simplify RUN_BASE Put .tests-stamp deps only for check target and fix its cleanup. Fix abs_top_srcdir. vgimportclone needs srcdir. Clean api subdir.
* Detect unusable nodes on fsZdenek Kabelac2011-09-243-10/+10
| | | | | | | | | | | | Test whether nodes could be used on given filesystem where TMP dir is being used and skip teardown quicker in fail case. (makes the problem quickly obvious if you try to such fs). Skip teardown_dev if we have not created any devs yet. and do not mkdir /dev/mapper dir when LVM_TEST_DEVDIR is set. Drop this test from t-000-basic.sh.
* Add missing log_error() to lvresize command when fsadm tool failsZdenek Kabelac2011-09-211-0/+1
| | | | Also add test case
* Unmount works with -yZdenek Kabelac2011-09-191-1/+2
|
* Another vgremove for speedupZdenek Kabelac2011-09-191-0/+2
| | | | | | | It seems like test-suite is significantly slowed down on removal phase. Maybe it should be part of generic teardown - though the reason of slowdown should be also discovered - probably related to retry loop ?
* Ensure fsadm.sh is executableZdenek Kabelac2011-09-191-1/+2
| | | | | | | When the srcdir == builddir we get the link on non-exectable file. So make always sure fsadm.sh is executable script file. Add cleanup target for lib/fsadm.
* Enable t-fsadm testZdenek Kabelac2011-09-191-4/+7
| | | | Now all commands are executed from preffered directory.
* Add link for fsadm scriptZdenek Kabelac2011-09-191-0/+1
| | | | Prepare to enabling t-fsadm.sh test
* Test speed upZdenek Kabelac2011-09-191-0/+2
| | | | | Removing vg reduces time execution of this test. Teardown has some wait states here...
* Disable t-lvcreate-large.sh for now with cluster.Milan Broz2011-09-161-0/+3
|
* Add inital thin testingZdenek Kabelac2011-09-161-0/+146
| | | | | | | | Currently test is skipped by default (since it needs code hack to work) Check command line options to create & remove thin pools and thin volumes. Activation code for thin LV support is missing, thus it only works without driver loaded.
* Remove vg at the test's endZdenek Kabelac2011-09-161-0/+2
| | | | | Speedup this test by removing mirrored vg when it's not longer needed. teardown() seems to be waiting here for too long.
* Fix the divisibility check in the allocator for the mirror+stripe case (requirePetr Rockai2011-09-161-0/+65
| | | | divisibility by stripe count alone, not by (mirror*stripe)).
* When resizing LVs, always round in the safe direction, regardless of whether wePetr Rockai2011-09-151-0/+25
| | | | were called as lvresize or lvreduce.
* Fix possible overflow of size if %FREE or %VG is used.Milan Broz2011-09-151-0/+40
| | | | https://bugzilla.redhat.com/show_bug.cgi?id=737087
* Updated testing scriptZdenek Kabelac2011-09-091-4/+4
| | | | Since attrs were extended by 2 new fields update check functions.
* Replace char class :space: with explicit charsZdenek Kabelac2011-09-071-14/+8
| | | | | | | | | | | | | | | | Some major distributions are still using 'mawk' and they are not using the latest version - we end here with hidden dependency on the latest version of mawk (1.3.4) while i.e. Debian Lenny seems to stay with 1.3.3. So we end with completely broken vgimportclone script on such system. We would need to check for proper support of :space: and abort build if it doesn't work or simplier replace [:space:] with [ \t] which seems sufficient to make it work (as can be seen in this patch) A better fix would be to use command line parameter override - leaving as FIXME comment. This patch makes t-vgimportclone.sh test passing on Lenny.
* Do not call prepare_lvmetad just yet in tests.Petr Rockai2011-08-311-1/+0
|
* A compromise integration of LVMetaD into the build: I have kept all thePetr Rockai2011-08-313-4/+22
| | | | | | | | | | daemon/common code in a single libdaemon.a, which is completely private. This is currently linked into the lvmetad binary, and will be linked into LVM (the client part, since static linking only picks up only symbols that are actually used). I have also added --enable/disable-lvmetad to ./configure; although the current default is off, I expect this to be flipped to on shortly. There's no LVM-side support yet, but when there is, even when built, it'll still need to be enabled by an lvm.conf option.
* Move RAID convert tests to new file, t-lvconvert-raid.shJonathan Earl Brassow2011-08-182-14/+163
| | | | | | There is duplicate code in t-lvconvert-raid.sh and t-lvcreate-raid.sh. This should be moved into a common file which is then sourced by these two files. I'll wait to move the duplicate code until I can talk to mornfall.
* Add ability to down-convert RAID1 arrays.Jonathan Earl Brassow2011-08-111-0/+122
| | | | Also, add some simple RAID tests to testsuite.
* Add detect_internal_vg_cache_corruption to lvm.confZdenek Kabelac2011-08-111-0/+1
| | | | | | | | | | | Add config option to enable crc checking of VG structures. Currently it's disabled by default. For the internal test-suite this check it is enabled. Note: In the case the internal error is detected, debug build with compile option DEBUG_ENFORCE_POOL_LOCKING helps to catch the source of the problem.
* Add simple test for read-only table reload suppressionZdenek Kabelac2011-07-251-0/+1
| | | | Just a small test for previous libdm commit.
* Better version of failing 'should' testZdenek Kabelac2011-07-181-2/+2
| | | | | | where the naming is left completely on lvm. (Commited code has been different version of test). So here it should be able to figure out new free name and create a new LV.
* Adding test for repair when confusing metadata are foundZdenek Kabelac2011-07-181-0/+97
|
* Fix t-vgreduce-usage to stop relying on the persistent cache not seeing aPetr Rockai2011-07-111-1/+2
| | | | | | device that has been brought back from the dead: this sometimes fails with clvmd (the cache is updated "too soon"). Instead, force a pvscan and rely on an up-to-date cache as usual.
* Increase timeout for udev settleZdenek Kabelac2011-07-081-1/+1
| | | | | For some unknown reason (atm) udev settle takes longer time on recent rawhide. To pass the test - inrease the settle timeout.
* first attempt to fix testAlasdair Kergon2011-07-041-0/+1
|
* Add framework for validation of ioctls. Doesn't do any checks yet.Alasdair Kergon2011-07-011-0/+1
| | | | | | dmsetup --checks libdevmapper: dm_task_enable_checks() lvm.conf: activation/checks=1
* update pv_attr check for new missing attrAlasdair Kergon2011-06-301-2/+2
|
* use remove -fAlasdair Kergon2011-06-301-1/+1
|
* teardown stray filesystems tooAlasdair Kergon2011-06-301-24/+37
|
* Use -f to remove deviceZdenek Kabelac2011-06-301-2/+2
| | | | | | | | | Since some test may leave devices in suspend mode which would require carefull order of resume operation - use '-f' to replace them with error targets For disable_dev - when 'error' target is used for open count - treat return code as ok (|| true) to avoid breaking futher test processing.
* Try to force remove dm devices in after test fails.Milan Broz2011-06-301-0/+21
|
* Try to remove any stray loop devices left behind by earlier aborted tests.Alasdair Kergon2011-06-301-4/+7
|
* test attempt to remove stray loop devsAlasdair Kergon2011-06-302-2/+6
|
* Add age filter to dmsetup udevcomplete_all to minimise concurrency problems.Alasdair Kergon2011-06-291-1/+3
|
* make udev teardown conditional on using udevAlasdair Kergon2011-06-292-1/+7
|
* teardown aborts if it hits an error, so better teardown semaphores earlierAlasdair Kergon2011-06-291-3/+3
| | | | as we need them later in the teardown process
* print any loop devs that weren't torn downAlasdair Kergon2011-06-291-0/+3
|
* remove any stray semaphores after tearing down devsAlasdair Kergon2011-06-291-0/+3
|
* Add uuids to dmsetup create cmds.Alasdair Kergon2011-06-291-3/+3
|