mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
tests: use blkid without caching
Always use blkid without caching to avoid poluting cache stored in /run/blkid or /etc on older distros
This commit is contained in:
parent
02e02a5ccc
commit
51ac56a05e
@ -41,7 +41,7 @@ aux prepare_devs 1
|
|||||||
vgcreate $vg "$dev1"
|
vgcreate $vg "$dev1"
|
||||||
lvcreate -n $lv1 -l8 $vg
|
lvcreate -n $lv1 -l8 $vg
|
||||||
mkfs.xfs -f "$DM_DEV_DIR/$vg/$lv1"
|
mkfs.xfs -f "$DM_DEV_DIR/$vg/$lv1"
|
||||||
blkid "$DM_DEV_DIR/$vg/$lv1" | grep BLOCK_SIZE || skip
|
blkid -c /dev/null "$DM_DEV_DIR/$vg/$lv1" | grep BLOCK_SIZE || skip
|
||||||
lvchange -an $vg
|
lvchange -an $vg
|
||||||
vgremove -ff $vg
|
vgremove -ff $vg
|
||||||
|
|
||||||
@ -145,9 +145,9 @@ lvremove -y $vg2/$lv1
|
|||||||
lvcreate --type raid1 -m1 -l 8 -n $lv1 $vg1
|
lvcreate --type raid1 -m1 -l 8 -n $lv1 $vg1
|
||||||
aux wipefs_a /dev/$vg1/$lv1
|
aux wipefs_a /dev/$vg1/$lv1
|
||||||
mkfs.xfs -f "$DM_DEV_DIR/$vg1/$lv1"
|
mkfs.xfs -f "$DM_DEV_DIR/$vg1/$lv1"
|
||||||
blkid "$DM_DEV_DIR/$vg1/$lv1" | grep BLOCK_SIZE=\"512\"
|
blkid -c /dev/null "$DM_DEV_DIR/$vg1/$lv1" | grep BLOCK_SIZE=\"512\"
|
||||||
lvconvert --raidintegrity y $vg1/$lv1
|
lvconvert --raidintegrity y $vg1/$lv1
|
||||||
blkid "$DM_DEV_DIR/$vg1/$lv1" | grep BLOCK_SIZE=\"512\"
|
blkid -c /dev/null "$DM_DEV_DIR/$vg1/$lv1" | grep BLOCK_SIZE=\"512\"
|
||||||
mount "$DM_DEV_DIR/$vg1/$lv1" $mnt
|
mount "$DM_DEV_DIR/$vg1/$lv1" $mnt
|
||||||
umount $mnt
|
umount $mnt
|
||||||
pvck --dump metadata $LOOP1 | grep 'block_size = 512'
|
pvck --dump metadata $LOOP1 | grep 'block_size = 512'
|
||||||
@ -157,9 +157,9 @@ lvremove -y $vg1/$lv1
|
|||||||
lvcreate --type raid1 -m1 -l 8 -n $lv1 $vg2
|
lvcreate --type raid1 -m1 -l 8 -n $lv1 $vg2
|
||||||
aux wipefs_a /dev/$vg2/$lv1
|
aux wipefs_a /dev/$vg2/$lv1
|
||||||
mkfs.xfs -f "$DM_DEV_DIR/$vg2/$lv1"
|
mkfs.xfs -f "$DM_DEV_DIR/$vg2/$lv1"
|
||||||
blkid "$DM_DEV_DIR/$vg2/$lv1" | grep BLOCK_SIZE=\"4096\"
|
blkid -c /dev/null "$DM_DEV_DIR/$vg2/$lv1" | grep BLOCK_SIZE=\"4096\"
|
||||||
lvconvert --raidintegrity y $vg2/$lv1
|
lvconvert --raidintegrity y $vg2/$lv1
|
||||||
blkid "$DM_DEV_DIR/$vg2/$lv1" | grep BLOCK_SIZE=\"4096\"
|
blkid -c /dev/null "$DM_DEV_DIR/$vg2/$lv1" | grep BLOCK_SIZE=\"4096\"
|
||||||
mount "$DM_DEV_DIR/$vg2/$lv1" $mnt
|
mount "$DM_DEV_DIR/$vg2/$lv1" $mnt
|
||||||
umount $mnt
|
umount $mnt
|
||||||
pvck --dump metadata $LOOP3 | grep 'block_size = 4096'
|
pvck --dump metadata $LOOP3 | grep 'block_size = 4096'
|
||||||
@ -169,9 +169,9 @@ lvremove -y $vg2/$lv1
|
|||||||
lvcreate --type raid1 -m1 -l 8 -n $lv1 $vg1
|
lvcreate --type raid1 -m1 -l 8 -n $lv1 $vg1
|
||||||
aux wipefs_a /dev/$vg1/$lv1
|
aux wipefs_a /dev/$vg1/$lv1
|
||||||
mkfs.ext4 -b 1024 "$DM_DEV_DIR/$vg1/$lv1"
|
mkfs.ext4 -b 1024 "$DM_DEV_DIR/$vg1/$lv1"
|
||||||
blkid "$DM_DEV_DIR/$vg1/$lv1" | grep BLOCK_SIZE=\"1024\"
|
blkid -c /dev/null "$DM_DEV_DIR/$vg1/$lv1" | grep BLOCK_SIZE=\"1024\"
|
||||||
lvconvert --raidintegrity y $vg1/$lv1
|
lvconvert --raidintegrity y $vg1/$lv1
|
||||||
blkid "$DM_DEV_DIR/$vg1/$lv1" | grep BLOCK_SIZE=\"1024\"
|
blkid -c /dev/null "$DM_DEV_DIR/$vg1/$lv1" | grep BLOCK_SIZE=\"1024\"
|
||||||
mount "$DM_DEV_DIR/$vg1/$lv1" $mnt
|
mount "$DM_DEV_DIR/$vg1/$lv1" $mnt
|
||||||
umount $mnt
|
umount $mnt
|
||||||
pvck --dump metadata $LOOP1 | grep 'block_size = 512'
|
pvck --dump metadata $LOOP1 | grep 'block_size = 512'
|
||||||
@ -181,11 +181,11 @@ lvremove -y $vg1/$lv1
|
|||||||
lvcreate --type raid1 -m1 -l 8 -n $lv1 $vg1
|
lvcreate --type raid1 -m1 -l 8 -n $lv1 $vg1
|
||||||
aux wipefs_a /dev/$vg1/$lv1
|
aux wipefs_a /dev/$vg1/$lv1
|
||||||
mkfs.ext4 -b 1024 "$DM_DEV_DIR/$vg1/$lv1"
|
mkfs.ext4 -b 1024 "$DM_DEV_DIR/$vg1/$lv1"
|
||||||
blkid "$DM_DEV_DIR/$vg1/$lv1" | grep BLOCK_SIZE=\"1024\"
|
blkid -c /dev/null "$DM_DEV_DIR/$vg1/$lv1" | grep BLOCK_SIZE=\"1024\"
|
||||||
lvchange -an $vg1/$lv1
|
lvchange -an $vg1/$lv1
|
||||||
lvconvert --raidintegrity y $vg1/$lv1
|
lvconvert --raidintegrity y $vg1/$lv1
|
||||||
lvchange -ay $vg1/$lv1
|
lvchange -ay $vg1/$lv1
|
||||||
blkid "$DM_DEV_DIR/$vg1/$lv1" | grep BLOCK_SIZE=\"1024\"
|
blkid -c /dev/null "$DM_DEV_DIR/$vg1/$lv1" | grep BLOCK_SIZE=\"1024\"
|
||||||
mount "$DM_DEV_DIR/$vg1/$lv1" $mnt
|
mount "$DM_DEV_DIR/$vg1/$lv1" $mnt
|
||||||
umount $mnt
|
umount $mnt
|
||||||
pvck --dump metadata $LOOP1 | grep 'block_size = 1024'
|
pvck --dump metadata $LOOP1 | grep 'block_size = 1024'
|
||||||
@ -195,9 +195,9 @@ lvremove -y $vg1/$lv1
|
|||||||
lvcreate --type raid1 -m1 -l 8 -n $lv1 $vg2
|
lvcreate --type raid1 -m1 -l 8 -n $lv1 $vg2
|
||||||
aux wipefs_a /dev/$vg2/$lv1
|
aux wipefs_a /dev/$vg2/$lv1
|
||||||
mkfs.ext4 "$DM_DEV_DIR/$vg2/$lv1"
|
mkfs.ext4 "$DM_DEV_DIR/$vg2/$lv1"
|
||||||
blkid "$DM_DEV_DIR/$vg2/$lv1" | grep BLOCK_SIZE=\"4096\"
|
blkid -c /dev/null "$DM_DEV_DIR/$vg2/$lv1" | grep BLOCK_SIZE=\"4096\"
|
||||||
lvconvert --raidintegrity y $vg2/$lv1
|
lvconvert --raidintegrity y $vg2/$lv1
|
||||||
blkid "$DM_DEV_DIR/$vg2/$lv1" | grep BLOCK_SIZE=\"4096\"
|
blkid -c /dev/null "$DM_DEV_DIR/$vg2/$lv1" | grep BLOCK_SIZE=\"4096\"
|
||||||
mount "$DM_DEV_DIR/$vg2/$lv1" $mnt
|
mount "$DM_DEV_DIR/$vg2/$lv1" $mnt
|
||||||
umount $mnt
|
umount $mnt
|
||||||
pvck --dump metadata $LOOP3 | grep 'block_size = 4096'
|
pvck --dump metadata $LOOP3 | grep 'block_size = 4096'
|
||||||
@ -207,10 +207,10 @@ lvremove -y $vg2/$lv1
|
|||||||
lvcreate --type raid1 -m1 -l 8 -n $lv1 $vg1
|
lvcreate --type raid1 -m1 -l 8 -n $lv1 $vg1
|
||||||
aux wipefs_a /dev/$vg1/$lv1
|
aux wipefs_a /dev/$vg1/$lv1
|
||||||
mkfs.xfs -f -s size=4096 "$DM_DEV_DIR/$vg1/$lv1"
|
mkfs.xfs -f -s size=4096 "$DM_DEV_DIR/$vg1/$lv1"
|
||||||
blkid "$DM_DEV_DIR/$vg1/$lv1" | grep BLOCK_SIZE=\"4096\"
|
blkid -c /dev/null "$DM_DEV_DIR/$vg1/$lv1" | grep BLOCK_SIZE=\"4096\"
|
||||||
lvconvert --raidintegrity y --raidintegrityblocksize 512 $vg1/$lv1
|
lvconvert --raidintegrity y --raidintegrityblocksize 512 $vg1/$lv1
|
||||||
lvs -o raidintegrityblocksize $vg1/$lv1 | grep 512
|
lvs -o raidintegrityblocksize $vg1/$lv1 | grep 512
|
||||||
blkid "$DM_DEV_DIR/$vg1/$lv1" | grep BLOCK_SIZE=\"4096\"
|
blkid -c /dev/null "$DM_DEV_DIR/$vg1/$lv1" | grep BLOCK_SIZE=\"4096\"
|
||||||
mount "$DM_DEV_DIR/$vg1/$lv1" $mnt
|
mount "$DM_DEV_DIR/$vg1/$lv1" $mnt
|
||||||
umount $mnt
|
umount $mnt
|
||||||
pvck --dump metadata $LOOP1 | grep 'block_size = 512'
|
pvck --dump metadata $LOOP1 | grep 'block_size = 512'
|
||||||
@ -220,13 +220,13 @@ lvremove -y $vg1/$lv1
|
|||||||
lvcreate --type raid1 -m1 -l 8 -n $lv1 $vg1
|
lvcreate --type raid1 -m1 -l 8 -n $lv1 $vg1
|
||||||
aux wipefs_a /dev/$vg1/$lv1
|
aux wipefs_a /dev/$vg1/$lv1
|
||||||
mkfs.xfs -f -s size=4096 "$DM_DEV_DIR/$vg1/$lv1"
|
mkfs.xfs -f -s size=4096 "$DM_DEV_DIR/$vg1/$lv1"
|
||||||
blkid "$DM_DEV_DIR/$vg1/$lv1" | grep BLOCK_SIZE=\"4096\"
|
blkid -c /dev/null "$DM_DEV_DIR/$vg1/$lv1" | grep BLOCK_SIZE=\"4096\"
|
||||||
lvchange -an $vg1/$lv1
|
lvchange -an $vg1/$lv1
|
||||||
# lv needs to be inactive to increase LBS from 512
|
# lv needs to be inactive to increase LBS from 512
|
||||||
lvconvert --raidintegrity y --raidintegrityblocksize 1024 $vg1/$lv1
|
lvconvert --raidintegrity y --raidintegrityblocksize 1024 $vg1/$lv1
|
||||||
lvs -o raidintegrityblocksize $vg1/$lv1 | grep 1024
|
lvs -o raidintegrityblocksize $vg1/$lv1 | grep 1024
|
||||||
lvchange -ay $vg1/$lv1
|
lvchange -ay $vg1/$lv1
|
||||||
blkid "$DM_DEV_DIR/$vg1/$lv1" | grep BLOCK_SIZE=\"4096\"
|
blkid -c /dev/null "$DM_DEV_DIR/$vg1/$lv1" | grep BLOCK_SIZE=\"4096\"
|
||||||
mount "$DM_DEV_DIR/$vg1/$lv1" $mnt
|
mount "$DM_DEV_DIR/$vg1/$lv1" $mnt
|
||||||
umount $mnt
|
umount $mnt
|
||||||
pvck --dump metadata $LOOP1 | grep 'block_size = 1024'
|
pvck --dump metadata $LOOP1 | grep 'block_size = 1024'
|
||||||
@ -236,9 +236,9 @@ lvremove -y $vg1/$lv1
|
|||||||
lvcreate --type raid1 -m1 -l 8 -n $lv1 $vg1
|
lvcreate --type raid1 -m1 -l 8 -n $lv1 $vg1
|
||||||
aux wipefs_a /dev/$vg1/$lv1
|
aux wipefs_a /dev/$vg1/$lv1
|
||||||
mkfs.ext4 -b 1024 "$DM_DEV_DIR/$vg1/$lv1"
|
mkfs.ext4 -b 1024 "$DM_DEV_DIR/$vg1/$lv1"
|
||||||
blkid "$DM_DEV_DIR/$vg1/$lv1" | grep BLOCK_SIZE=\"1024\"
|
blkid -c /dev/null "$DM_DEV_DIR/$vg1/$lv1" | grep BLOCK_SIZE=\"1024\"
|
||||||
lvconvert --raidintegrity y --raidintegrityblocksize 512 $vg1/$lv1
|
lvconvert --raidintegrity y --raidintegrityblocksize 512 $vg1/$lv1
|
||||||
blkid "$DM_DEV_DIR/$vg1/$lv1" | grep BLOCK_SIZE=\"1024\"
|
blkid -c /dev/null "$DM_DEV_DIR/$vg1/$lv1" | grep BLOCK_SIZE=\"1024\"
|
||||||
mount "$DM_DEV_DIR/$vg1/$lv1" $mnt
|
mount "$DM_DEV_DIR/$vg1/$lv1" $mnt
|
||||||
umount $mnt
|
umount $mnt
|
||||||
pvck --dump metadata $LOOP1 | grep 'block_size = 512'
|
pvck --dump metadata $LOOP1 | grep 'block_size = 512'
|
||||||
@ -263,14 +263,14 @@ mkfs.xfs -f "$DM_DEV_DIR/$vg1/$lv1"
|
|||||||
mount "$DM_DEV_DIR/$vg1/$lv1" $mnt
|
mount "$DM_DEV_DIR/$vg1/$lv1" $mnt
|
||||||
echo "test" > $mnt/test
|
echo "test" > $mnt/test
|
||||||
umount $mnt
|
umount $mnt
|
||||||
blkid "$DM_DEV_DIR/$vg1/$lv1" | grep BLOCK_SIZE=\"512\"
|
blkid -c /dev/null "$DM_DEV_DIR/$vg1/$lv1" | grep BLOCK_SIZE=\"512\"
|
||||||
lvchange -an $vg1/$lv1
|
lvchange -an $vg1/$lv1
|
||||||
lvconvert --raidintegrity y $vg1/$lv1
|
lvconvert --raidintegrity y $vg1/$lv1
|
||||||
lvchange -ay $vg1/$lv1
|
lvchange -ay $vg1/$lv1
|
||||||
mount "$DM_DEV_DIR/$vg1/$lv1" $mnt
|
mount "$DM_DEV_DIR/$vg1/$lv1" $mnt
|
||||||
cat $mnt/test
|
cat $mnt/test
|
||||||
umount $mnt
|
umount $mnt
|
||||||
blkid "$DM_DEV_DIR/$vg1/$lv1" | grep BLOCK_SIZE=\"512\"
|
blkid -c /dev/null "$DM_DEV_DIR/$vg1/$lv1" | grep BLOCK_SIZE=\"512\"
|
||||||
pvck --dump metadata $LOOP1 | grep 'block_size = 512'
|
pvck --dump metadata $LOOP1 | grep 'block_size = 512'
|
||||||
lvchange -an $vg1/$lv1
|
lvchange -an $vg1/$lv1
|
||||||
lvremove -y $vg1/$lv1
|
lvremove -y $vg1/$lv1
|
||||||
@ -282,14 +282,14 @@ mkfs.xfs -f "$DM_DEV_DIR/$vg2/$lv1"
|
|||||||
mount "$DM_DEV_DIR/$vg2/$lv1" $mnt
|
mount "$DM_DEV_DIR/$vg2/$lv1" $mnt
|
||||||
echo "test" > $mnt/test
|
echo "test" > $mnt/test
|
||||||
umount $mnt
|
umount $mnt
|
||||||
blkid "$DM_DEV_DIR/$vg2/$lv1" | grep BLOCK_SIZE=\"4096\"
|
blkid -c /dev/null "$DM_DEV_DIR/$vg2/$lv1" | grep BLOCK_SIZE=\"4096\"
|
||||||
lvchange -an $vg2/$lv1
|
lvchange -an $vg2/$lv1
|
||||||
lvconvert --raidintegrity y $vg2/$lv1
|
lvconvert --raidintegrity y $vg2/$lv1
|
||||||
lvchange -ay $vg2/$lv1
|
lvchange -ay $vg2/$lv1
|
||||||
mount "$DM_DEV_DIR/$vg2/$lv1" $mnt
|
mount "$DM_DEV_DIR/$vg2/$lv1" $mnt
|
||||||
cat $mnt/test
|
cat $mnt/test
|
||||||
umount $mnt
|
umount $mnt
|
||||||
blkid "$DM_DEV_DIR/$vg2/$lv1" | grep BLOCK_SIZE=\"4096\"
|
blkid -c /dev/null "$DM_DEV_DIR/$vg2/$lv1" | grep BLOCK_SIZE=\"4096\"
|
||||||
pvck --dump metadata $LOOP3 | grep 'block_size = 4096'
|
pvck --dump metadata $LOOP3 | grep 'block_size = 4096'
|
||||||
lvchange -an $vg2/$lv1
|
lvchange -an $vg2/$lv1
|
||||||
lvremove -y $vg2/$lv1
|
lvremove -y $vg2/$lv1
|
||||||
|
@ -59,7 +59,7 @@ sleep 3
|
|||||||
# print what blkid thinks about each PV
|
# print what blkid thinks about each PV
|
||||||
for i in "$dev1" "$dev2" "$dev3" "$dev4"
|
for i in "$dev1" "$dev2" "$dev3" "$dev4"
|
||||||
do
|
do
|
||||||
blkid -c /dev/null -w /dev/null "$i" || echo "Unknown signature"
|
blkid -c /dev/null "$i" || echo "Unknown signature"
|
||||||
done
|
done
|
||||||
|
|
||||||
# expect open count for each PV to be 0
|
# expect open count for each PV to be 0
|
||||||
|
@ -144,7 +144,7 @@ aux prepare_devs 2 64
|
|||||||
vgcreate $vg "$dev1"
|
vgcreate $vg "$dev1"
|
||||||
lvcreate -n $lv1 -L50 $vg
|
lvcreate -n $lv1 -L50 $vg
|
||||||
mkfs.xfs -f "$DM_DEV_DIR/$vg/$lv1"
|
mkfs.xfs -f "$DM_DEV_DIR/$vg/$lv1"
|
||||||
blkid "$DM_DEV_DIR/$vg/$lv1" | grep BLOCK_SIZE || skip
|
blkid -c /dev/null "$DM_DEV_DIR/$vg/$lv1" | grep BLOCK_SIZE || skip
|
||||||
lvchange -an $vg
|
lvchange -an $vg
|
||||||
vgremove -ff $vg
|
vgremove -ff $vg
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user