Permalink
Browse files

Ported grow_pool script.

DESCRIPTION:
 A ZFS file system is limited by the amount of disk space
 available to the pool. Growing the pool by adding a disk
 increases the amount of space.
 STRATEGY:
 1) Fill a ZFS filesystem until ENOSPC by creating a large file
 2) Grow the pool by adding a disk
 3) Verify that more data can now be written to the file system
  • Loading branch information...
1 parent 3555d2f commit d4d1fad2d7f4a46f92ef05c57cb8fb361d74796f @vikramjadhav vikramjadhav committed Jan 6, 2011
@@ -60,3 +60,4 @@ export SLICE1=1
export SMALL_WRITE_COUNT=100
export TESTFILE1=file$$.1
export WRITE_COUNT=65536000
+export FILE_WRITE=${STF_SUITE}/bin/file_write
@@ -62,11 +62,19 @@
#log_assert "A zpool may be increased in capacity by adding a disk"
+if [ $(id -u) != 0 ]; then
+ echo "You must run as root"
+ exit 1;
+fi
+if [ $# != 1 ]; then
+ echo "Usage : ./grow_pool_001_pos.ksh <diskname2>"
+ exit 1;
+fi
log_must $ZFS set compression=off $TESTPOOL/$TESTFS
-./$FILE_WRITE -o create -f $TESTDIR/$TESTFILE1 \
+$FILE_WRITE -o create -f $TESTDIR/$TESTFILE1 \
-b $BLOCK_SIZE -c $WRITE_COUNT -d 0
typeset -i zret=$?
@@ -87,7 +95,7 @@ log_must $ZPOOL add -f $TESTPOOL $DISK
fi
TESTFILE=$TESTFILE1
-log_must ./$FILE_WRITE -o append -f $TESTDIR/$TESTFILE \
+log_must $FILE_WRITE -o append -f $TESTDIR/$TESTFILE \
-b $BLOCK_SIZE -c $SMALL_WRITE_COUNT -d 0
@@ -32,9 +32,20 @@
. $STF_SUITE/include/default_common_varible.kshlib
. $STF_SUITE/STF/usr/src/tools/stf/contrib/include/logapi.kshlib
+################################################################################
tmp=/dev/$1
+if [ $(id -u) != 0 ]; then
+ echo "You must run as root"
+ exit 1;
+fi
+
+if [ $# != 1 ]; then
+ echo "Usage : ./grow_pool_001_pos.ksh <diskname1>"
+ exit 1;
+fi
+
#verify_runnable "global"

0 comments on commit d4d1fad

Please sign in to comment.