Fix zconfig.sh partitioning error

Parted version 3.0 doesn't allow us to specify the start and end
percentages as 50% and 100% respectively.  This results in:

  Error: The location 100% is outside the device /dev/zd0

Therefore we change the syntax to 51% and -1 for end of device.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
Brian Behlendorf 2013-01-24 13:54:58 -08:00
parent 563103decd
commit e528c9b461
1 changed files with 2 additions and 2 deletions

View File

@ -194,7 +194,7 @@ test_3() {
${ZFS} create -V 100M ${FULL_ZVOL_NAME} || fail 3
label /dev/zvol/${FULL_ZVOL_NAME} msdos || fail 4
partition /dev/zvol/${FULL_ZVOL_NAME} primary 1% 50% || fail 4
partition /dev/zvol/${FULL_ZVOL_NAME} primary 50% 100% || fail 4
partition /dev/zvol/${FULL_ZVOL_NAME} primary 51% -1 || fail 4
${ZFS} snapshot ${FULL_SNAP_NAME} || fail 5
${ZFS} clone ${FULL_SNAP_NAME} ${FULL_CLONE_NAME} || fail 6
@ -247,7 +247,7 @@ test_4() {
${ZFS} create -V 100M ${FULL_ZVOL_NAME} || fail 3
label /dev/zvol/${FULL_ZVOL_NAME} msdos || fail 4
partition /dev/zvol/${FULL_ZVOL_NAME} primary 1% 50% || fail 4
partition /dev/zvol/${FULL_ZVOL_NAME} primary 50% 100% || fail 4
partition /dev/zvol/${FULL_ZVOL_NAME} primary 51% -1 || fail 4
${ZFS} snapshot ${FULL_SNAP_NAME} || fail 5
${ZFS} clone ${FULL_SNAP_NAME} ${FULL_CLONE_NAME} || fail 6