diff options
author | Harald Hoyer <harald@redhat.com> | 2009-09-16 11:21:24 +0200 |
---|---|---|
committer | Harald Hoyer <harald@redhat.com> | 2009-09-16 11:21:24 +0200 |
commit | 597839331c5eb2cc370bee330f49c3487b782b4a (patch) | |
tree | dc03368090e6213b0d3ce744ebe937a817b3db10 /test/TEST-14-IMSM | |
parent | 26b72485cfc2e153e5257429c92264a6c833a68d (diff) | |
download | dracut-597839331c5eb2cc370bee330f49c3487b782b4a.tar.gz dracut-597839331c5eb2cc370bee330f49c3487b782b4a.tar.bz2 dracut-597839331c5eb2cc370bee330f49c3487b782b4a.zip |
dmraid: use and install kpartx for dmraids
Diffstat (limited to 'test/TEST-14-IMSM')
-rwxr-xr-x | test/TEST-14-IMSM/create-root.sh | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/test/TEST-14-IMSM/create-root.sh b/test/TEST-14-IMSM/create-root.sh index 0af79fa4..22788786 100755 --- a/test/TEST-14-IMSM/create-root.sh +++ b/test/TEST-14-IMSM/create-root.sh @@ -6,7 +6,16 @@ done udevadm control --reload-rules echo y|dmraid -f isw -C Test0 --type 1 --disk "/dev/sdb /dev/sdc" udevadm settle -dmraid -a y + +SETS=$(dmraid -c -s) +# scan and activate all DM RAIDS +for s in $SETS; do + dmraid -ay -i -p --rm_partitions "$s" + [ -e "/dev/mapper/$s" ] && kpartx -a -p p "/dev/mapper/$s" +done + +udevadm settle + # save a partition at the beginning for future flagging purposes sfdisk -H 255 -S 63 -L /dev/mapper/isw*Test0 <<EOF ,1 @@ -17,9 +26,15 @@ EOF udevadm settle dmraid -a n udevadm settle -dmraid -a y + +SETS=$(dmraid -c -s) +# scan and activate all DM RAIDS +for s in $SETS; do + dmraid -ay -i -p --rm_partitions "$s" + [ -e "/dev/mapper/$s" ] && kpartx -a -p p "/dev/mapper/$s" +done + udevadm settle -sfdisk -l /dev/mapper/isw*Test0 mdadm --create /dev/md0 --run --auto=yes --level=5 --raid-devices=3 /dev/mapper/isw*p[123] # wait for the array to finish initailizing, otherwise this sometimes fails |