mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
tests: fix path to dev dir
Correct some explicit references to /dev and use $DM_DEV_DIR.
This commit is contained in:
parent
fec3087eef
commit
2cb43449ee
@ -112,7 +112,7 @@ lvremove -y $vg1/$lv1
|
||||
# lvconvert on dev512, fsunknown, result 512
|
||||
lvcreate --type raid1 -m1 -l 8 -n $lv1 $vg1
|
||||
# clear any residual fs so that libblkid cannot find an fs block size
|
||||
aux wipefs_a /dev/$vg1/$lv1
|
||||
aux wipefs_a "$DM_DEV_DIR/$vg1/$lv1"
|
||||
lvconvert --raidintegrity y $vg1/$lv1
|
||||
pvck --dump metadata "$LOOP1" | grep 'block_size = 512'
|
||||
lvremove -y $vg1/$lv1
|
||||
@ -120,7 +120,7 @@ lvremove -y $vg1/$lv1
|
||||
# lvconvert on dev4k, fsunknown, result 4k
|
||||
lvcreate --type raid1 -m1 -l 8 -n $lv1 $vg2
|
||||
# clear any residual fs so that libblkid cannot find an fs block size
|
||||
aux wipefs_a /dev/$vg2/$lv1
|
||||
aux wipefs_a "$DM_DEV_DIR//$vg2/$lv1"
|
||||
lvconvert --raidintegrity y $vg2/$lv1
|
||||
pvck --dump metadata $LOOP3 | grep 'block_size = 4096'
|
||||
lvremove -y $vg2/$lv1
|
||||
@ -128,20 +128,20 @@ lvremove -y $vg2/$lv1
|
||||
# lvconvert --bs 4k on dev512, fsunknown, result fail
|
||||
lvcreate --type raid1 -m1 -l 8 -n $lv1 $vg1
|
||||
# clear any residual fs so that libblkid cannot find an fs block size
|
||||
aux wipefs_a /dev/$vg1/$lv1
|
||||
aux wipefs_a "$DM_DEV_DIR//$vg1/$lv1"
|
||||
not lvconvert --raidintegrity y --raidintegrityblocksize 4096 $vg1/$lv1
|
||||
lvremove -y $vg1/$lv1
|
||||
|
||||
# lvconvert --bs 512 on dev4k, fsunknown, result fail
|
||||
lvcreate --type raid1 -m1 -l 8 -n $lv1 $vg2
|
||||
# clear any residual fs so that libblkid cannot find an fs block size
|
||||
aux wipefs_a /dev/$vg2/$lv1
|
||||
aux wipefs_a "$DM_DEV_DIR//$vg2/$lv1"
|
||||
not lvconvert --raidintegrity y --raidintegrityblocksize 512 $vg2/$lv1
|
||||
lvremove -y $vg2/$lv1
|
||||
|
||||
# lvconvert on dev512, ext4 1024, result 1024
|
||||
lvcreate --type raid1 -m1 -l 8 -n $lv1 $vg1
|
||||
aux wipefs_a /dev/$vg1/$lv1
|
||||
aux wipefs_a "$DM_DEV_DIR//$vg1/$lv1"
|
||||
mkfs.ext4 "$DM_DEV_DIR/$vg1/$lv1"
|
||||
blkid -p "$DM_DEV_DIR/$vg1/$lv1" | tee out
|
||||
grep BLOCK_SIZE=\"1024\" out
|
||||
@ -154,7 +154,7 @@ lvremove -y $vg1/$lv1
|
||||
|
||||
# lvconvert on dev4k, ext4 4096, result 4096
|
||||
lvcreate --type raid1 -m1 -l 8 -n $lv1 $vg2
|
||||
aux wipefs_a /dev/$vg2/$lv1
|
||||
aux wipefs_a "$DM_DEV_DIR/$vg2/$lv1"
|
||||
mkfs.ext4 "$DM_DEV_DIR/$vg2/$lv1"
|
||||
blkid -p "$DM_DEV_DIR/$vg2/$lv1" | grep BLOCK_SIZE=\"4096\"
|
||||
lvconvert --raidintegrity y $vg2/$lv1
|
||||
@ -166,7 +166,7 @@ lvremove -y $vg2/$lv1
|
||||
|
||||
# lvconvert on dev512, ext4 1024, result 1024 (LV active when adding)
|
||||
lvcreate --type raid1 -m1 -l 8 -n $lv1 $vg1
|
||||
aux wipefs_a /dev/$vg1/$lv1
|
||||
aux wipefs_a "$DM_DEV_DIR//$vg1/$lv1"
|
||||
mkfs.ext4 -b 1024 "$DM_DEV_DIR/$vg1/$lv1"
|
||||
blkid -p "$DM_DEV_DIR/$vg1/$lv1" | grep BLOCK_SIZE=\"1024\"
|
||||
lvconvert --raidintegrity y $vg1/$lv1
|
||||
@ -178,7 +178,7 @@ lvremove -y $vg1/$lv1
|
||||
|
||||
# lvconvert on dev512, ext4 1024, result 1024 (LV inactive when adding)
|
||||
lvcreate --type raid1 -m1 -l 8 -n $lv1 $vg1
|
||||
aux wipefs_a /dev/$vg1/$lv1
|
||||
aux wipefs_a "$DM_DEV_DIR//$vg1/$lv1"
|
||||
mkfs.ext4 -b 1024 "$DM_DEV_DIR/$vg1/$lv1"
|
||||
blkid -p "$DM_DEV_DIR/$vg1/$lv1" | grep BLOCK_SIZE=\"1024\"
|
||||
lvchange -an $vg1/$lv1
|
||||
@ -192,7 +192,7 @@ lvremove -y $vg1/$lv1
|
||||
|
||||
# lvconvert on dev4k, ext4 4096, result 4096
|
||||
lvcreate --type raid1 -m1 -l 8 -n $lv1 $vg2
|
||||
aux wipefs_a /dev/$vg2/$lv1
|
||||
aux wipefs_a "$DM_DEV_DIR//$vg2/$lv1"
|
||||
mkfs.ext4 "$DM_DEV_DIR/$vg2/$lv1"
|
||||
blkid -p "$DM_DEV_DIR/$vg2/$lv1" | grep BLOCK_SIZE=\"4096\"
|
||||
lvconvert --raidintegrity y $vg2/$lv1
|
||||
@ -204,7 +204,7 @@ lvremove -y $vg2/$lv1
|
||||
|
||||
# lvconvert --bs 512 on dev512, ext4 4096, result 512
|
||||
lvcreate --type raid1 -m1 -l 8 -n $lv1 $vg1
|
||||
aux wipefs_a /dev/$vg1/$lv1
|
||||
aux wipefs_a "$DM_DEV_DIR//$vg1/$lv1"
|
||||
mkfs.ext4 -b 4096 "$DM_DEV_DIR/$vg1/$lv1"
|
||||
blkid -p "$DM_DEV_DIR/$vg1/$lv1" | grep BLOCK_SIZE=\"4096\"
|
||||
lvconvert --raidintegrity y --raidintegrityblocksize 512 $vg1/$lv1
|
||||
@ -217,7 +217,7 @@ lvremove -y $vg1/$lv1
|
||||
|
||||
# lvconvert --bs 1024 on dev512, ext4 4096, result 1024
|
||||
lvcreate --type raid1 -m1 -l 8 -n $lv1 $vg1
|
||||
aux wipefs_a /dev/$vg1/$lv1
|
||||
aux wipefs_a "$DM_DEV_DIR//$vg1/$lv1"
|
||||
mkfs.ext4 -b 4096 "$DM_DEV_DIR/$vg1/$lv1"
|
||||
blkid -p "$DM_DEV_DIR/$vg1/$lv1" | grep BLOCK_SIZE=\"4096\"
|
||||
lvchange -an $vg1/$lv1
|
||||
@ -233,7 +233,7 @@ lvremove -y $vg1/$lv1
|
||||
|
||||
# lvconvert --bs 512 on dev512, ext4 1024, result 512
|
||||
lvcreate --type raid1 -m1 -l 8 -n $lv1 $vg1
|
||||
aux wipefs_a /dev/$vg1/$lv1
|
||||
aux wipefs_a "$DM_DEV_DIR//$vg1/$lv1"
|
||||
mkfs.ext4 -b 1024 "$DM_DEV_DIR/$vg1/$lv1"
|
||||
blkid -p "$DM_DEV_DIR/$vg1/$lv1" | grep BLOCK_SIZE=\"1024\"
|
||||
lvconvert --raidintegrity y --raidintegrityblocksize 512 $vg1/$lv1
|
||||
@ -245,7 +245,7 @@ lvremove -y $vg1/$lv1
|
||||
|
||||
# lvconvert --bs 512 on dev4k, ext4 4096, result fail
|
||||
lvcreate --type raid1 -m1 -l 8 -n $lv1 $vg2
|
||||
aux wipefs_a /dev/$vg2/$lv1
|
||||
aux wipefs_a "$DM_DEV_DIR//$vg2/$lv1"
|
||||
mkfs.ext4 "$DM_DEV_DIR/$vg2/$lv1"
|
||||
not lvconvert --raidintegrity y --raidintegrityblocksize 512 $vg2/$lv1
|
||||
lvremove -y $vg2/$lv1
|
||||
@ -257,7 +257,7 @@ lvremove -y $vg2/$lv1
|
||||
|
||||
# lvconvert on dev512, ext4 1024, result 1024, (detect fs with LV inactive)
|
||||
lvcreate --type raid1 -m1 -l 8 -n $lv1 $vg1
|
||||
aux wipefs_a /dev/$vg1/$lv1
|
||||
aux wipefs_a "$DM_DEV_DIR//$vg1/$lv1"
|
||||
mkfs.ext4 "$DM_DEV_DIR/$vg1/$lv1"
|
||||
mount "$DM_DEV_DIR/$vg1/$lv1" $mnt
|
||||
echo "test" > $mnt/test
|
||||
@ -277,7 +277,7 @@ lvremove -y $vg1/$lv1
|
||||
|
||||
# lvconvert on dev4k, ext4 4096, result 4096 (detect fs with LV inactive)
|
||||
lvcreate --type raid1 -m1 -l 8 -n $lv1 $vg2
|
||||
aux wipefs_a /dev/$vg2/$lv1
|
||||
aux wipefs_a "$DM_DEV_DIR//$vg2/$lv1"
|
||||
mkfs.ext4 "$DM_DEV_DIR/$vg2/$lv1"
|
||||
mount "$DM_DEV_DIR/$vg2/$lv1" $mnt
|
||||
echo "test" > $mnt/test
|
||||
|
@ -45,8 +45,8 @@ lvcreate --yes --type raid5_ls --stripes 13 -L4 -n$lv1 $vg
|
||||
check lv_first_seg_field $vg/$lv1 segtype "raid5_ls"
|
||||
check lv_first_seg_field $vg/$lv1 data_stripes 13
|
||||
check lv_first_seg_field $vg/$lv1 stripes 14
|
||||
wipefs -a /dev/$vg/$lv1
|
||||
mkfs -t ext4 /dev/$vg/$lv1
|
||||
wipefs -a "$DM_DEV_DIR/$vg/$lv1"
|
||||
mkfs -t ext4 "$DM_DEV_DIR/$vg/$lv1"
|
||||
aux wait_for_sync $vg $lv1
|
||||
|
||||
mkdir -p $mount_dir
|
||||
|
@ -46,9 +46,9 @@ check lv_first_seg_field $vg/$lv1 segtype "raid5_ls"
|
||||
check lv_first_seg_field $vg/$lv1 stripesize "64.00k"
|
||||
check lv_first_seg_field $vg/$lv1 data_stripes 10
|
||||
check lv_first_seg_field $vg/$lv1 stripes 11
|
||||
wipefs -a /dev/$vg/$lv1
|
||||
mkfs -t ext4 /dev/$vg/$lv1
|
||||
fsck -fn /dev/$vg/$lv1
|
||||
wipefs -a "$DM_DEV_DIR/$vg/$lv1"
|
||||
mkfs -t ext4 "$DM_DEV_DIR/$vg/$lv1"
|
||||
fsck -fn "$DM_DEV_DIR/$vg/$lv1"
|
||||
|
||||
mkdir -p "$mount_dir"
|
||||
mount "$DM_DEV_DIR/$vg/$lv1" "$mount_dir"
|
||||
|
@ -46,8 +46,8 @@ check lv_first_seg_field $vg/$lv1 segtype "raid5_ls"
|
||||
check lv_first_seg_field $vg/$lv1 stripesize "64.00k"
|
||||
check lv_first_seg_field $vg/$lv1 data_stripes 10
|
||||
check lv_first_seg_field $vg/$lv1 stripes 11
|
||||
wipefs -a /dev/$vg/$lv1
|
||||
mkfs -t ext4 /dev/$vg/$lv1
|
||||
wipefs -a "$DM_DEV_DIR/$vg/$lv1"
|
||||
mkfs -t ext4 "$DM_DEV_DIR//$vg/$lv1"
|
||||
|
||||
mkdir -p $mount_dir
|
||||
mount "$DM_DEV_DIR/$vg/$lv1" $mount_dir
|
||||
|
@ -30,10 +30,10 @@ DF="$DFDIR/system.devices"
|
||||
|
||||
# Because mapping devno to devname gets dm name from sysfs
|
||||
aux lvmconf 'devices/scan = "/dev"'
|
||||
bd1="/dev/mapper/$(basename $dev1)"
|
||||
bd2="/dev/mapper/$(basename $dev2)"
|
||||
bd3="/dev/mapper/$(basename $dev3)"
|
||||
bd4="/dev/mapper/$(basename $dev4)"
|
||||
bd1="$DM_DEV_DIR/mapper/$(basename $dev1)"
|
||||
bd2="$DM_DEV_DIR/mapper/$(basename $dev2)"
|
||||
bd3="$DM_DEV_DIR/mapper/$(basename $dev3)"
|
||||
bd4="$DM_DEV_DIR/mapper/$(basename $dev4)"
|
||||
aux extend_filter "a|$bd1|" "a|$bd2|" "a|$bd3|" "a|$bd4|"
|
||||
|
||||
# Changing names will confuse df based on devname
|
||||
|
Loading…
Reference in New Issue
Block a user