mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-11 09:18:25 +03:00
Verify that pvcreate --dataalignment really does override the topology
detected alignment. NOTE: lvm2 doesn't detect MD 1.2 metadata (now the default on RHEL6) so for now I'm forcing 1.0 metadata. This was needed to be able to reuse the existing loop devices but recreate the md device with different raid0 striping.
This commit is contained in:
parent
80a878ade5
commit
e6166e4498
@ -41,13 +41,17 @@ cleanup_md() {
|
|||||||
sleep 2
|
sleep 2
|
||||||
rm -f $mddev
|
rm -f $mddev
|
||||||
fi
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
cleanup_md_and_teardown() {
|
||||||
|
cleanup_md
|
||||||
teardown
|
teardown
|
||||||
}
|
}
|
||||||
|
|
||||||
# create 2 disk MD raid0 array (stripe_width=128K)
|
# create 2 disk MD raid0 array (stripe_width=128K)
|
||||||
test -b "$mddev" && exit 200
|
test -b "$mddev" && exit 200
|
||||||
mdadm --create $mddev --auto=md --level 0 --raid-devices=2 --chunk 64 $dev1 $dev2
|
mdadm --create --metadata=1.0 $mddev --auto=md --level 0 --raid-devices=2 --chunk 64 $dev1 $dev2
|
||||||
trap 'aux cleanup_md' EXIT # cleanup this MD device at the end of the test
|
trap 'aux cleanup_md_and_teardown' EXIT # cleanup this MD device at the end of the test
|
||||||
test -b "$mddev" || exit 200
|
test -b "$mddev" || exit 200
|
||||||
|
|
||||||
# Test alignment of PV on MD without any MD-aware or topology-aware detection
|
# Test alignment of PV on MD without any MD-aware or topology-aware detection
|
||||||
@ -113,3 +117,27 @@ EOF
|
|||||||
pvremove $mddev_p
|
pvremove $mddev_p
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Test newer topology-aware alignment detection w/ --dataalignment override
|
||||||
|
if [ $linux_minor -ge 33 ]; then
|
||||||
|
cleanup_md
|
||||||
|
pvcreate -f $dev1
|
||||||
|
pvcreate -f $dev2
|
||||||
|
|
||||||
|
# create 2 disk MD raid0 array (stripe_width=2M)
|
||||||
|
test -b "$mddev" && exit 200
|
||||||
|
mdadm --create --metadata=1.0 $mddev --auto=md --level 0 --raid-devices=2 --chunk 1024 $dev1 $dev2
|
||||||
|
test -b "$mddev" || exit 200
|
||||||
|
|
||||||
|
# optimal_io_size=2097152, minimum_io_size=1048576
|
||||||
|
pv_align="2.00m"
|
||||||
|
pvcreate --metadatasize 128k \
|
||||||
|
--config 'devices { md_chunk_alignment=0 }' $mddev
|
||||||
|
check_pv_field_ $mddev pe_start $pv_align
|
||||||
|
|
||||||
|
# now verify pe_start alignment override using --dataalignment
|
||||||
|
pv_align="192.00k"
|
||||||
|
pvcreate --dataalignment 64k --metadatasize 128k \
|
||||||
|
--config 'devices { md_chunk_alignment=0 }' $mddev
|
||||||
|
check_pv_field_ $mddev pe_start $pv_align
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user