2 # This script should be run prior to running executing the filesystem tests.
3 # valid devices need to be passed for Device Mapper to work correctly
4 # 03/14/03 mridge@us.ibm.com added instance and time command line options
5 # 05/16/03 changed script paths
6 # 05/20/03 Added instructions on setup and warnings
10 echo $LTPROOT |
grep testscripts
> /dev
/null
2>&1
22 usage: ${0##*/} [ -a part1 ] [ -b part2 ] [ -c part3 ]
23 [ -d part4 ] [ -n nfsmount ]
33 example: ${0##*/} -a hdc1 -b hdc2 -c hdc3 -d hdc4 -n mytesthost:/testmountdir
35 fdisk needs to be run and the 4 HD partitions marked as 0x8e -- Linux LVM
37 - If this is run on a 2.4 kernel system then LVM must be configured and the kernel rebuilt. In a 2.5 environment
38 you must configure Device Mapper and install LVM2 from www.systina.com for the testcase to run correctly.
40 - These operations are destructive so do NOT point the tests to partitions where the data shouldn't be overwritten.
41 Once these tests are started all data in the partitions you point to will be destroyed.
47 while getopts :a
:b
:c
:d
:e
:n
:v
: arg
56 \?) echo "************** Help Info: ********************"
61 if [ ! -n "$part1" ]; then
62 echo "Missing 1st partition. You must pass 4 partitions for testing"
67 if [ ! -n "$part2" ]; then
68 echo "Missing 2nd partition. You must pass 4 partitions for testing"
73 if [ ! -n "$part3" ]; then
74 echo "Missing 3rd partition. You must pass 4 partitions for testing"
79 if [ ! -n "$part4" ]; then
80 echo "Missing 4th partition. You must pass 4 partitions for testing"
85 if [ ! -n "$nfsmount" ]; then
86 echo "Missing NFS partition. You must pass an NFS mount point for testing"
91 export PATH
="${PATH}:${LTPROOT}/testcases/bin"
94 mkdir
/test >/dev
/null
2>&1
95 mkdir
/test
/growfiles
>/dev
/null
2>&1
96 mkdir
/test
/growfiles
/ext2
>/dev
/null
2>&1
97 mkdir
/test
/growfiles
/ext3
>/dev
/null
2>&1
98 mkdir
/test
/growfiles
/msdos
>/dev
/null
2>&1
99 mkdir
/test
/growfiles
/reiser
>/dev
/null
2>&1
100 mkdir
/test
/growfiles
/minix
>/dev
/null
2>&1
101 mkdir
/test
/growfiles
/nfs
>/dev
/null
2>&1
102 mkdir
/test
/growfiles
/jfs
>/dev
/null
2>&1
103 mkdir
/test
/growfiles
/ramdisk
>/dev
/null
2>&1
105 mkfs
-V -t ext2
/dev
/$part1
106 mkfs
-V -t msdos
/dev
/$part2
107 mkreiserfs
/dev
/$part3
108 mkfs
-V -t minix
/dev
/$part4
111 mount
-v -t nfs
$nfsmount /test
/growfiles
/nfs
112 mount
-v /dev
/$part1 /test
/growfiles
/ext2
113 mount
-v /dev
/$part2 /test
/growfiles
/msdos
114 mount
-v /dev
/$part3 /test
/growfiles
/reiser
115 mount
-v /dev
/$part4 /test
/growfiles
/minix
116 mount
-v /dev
/ram
/test
/growfiles
/ramdisk
118 echo "************ Running tests "
119 ${LTPROOT}/../tools/rand_lines -g ${LTPROOT}/../runtest/lvm.part1 > ${TMPBASE}/lvm.part1
121 ${LTPROOT}/..
/pan
/ltp-pan
-e -S -a lvmpart1
-n lvmpart1
-l lvmlogfile
-f ${TMPBASE}/lvm.part1
&
127 umount
-v -t nfs
$nfsmount
128 umount
-v /dev
/$part1
129 umount
-v /dev
/$part2
130 umount
-v /dev
/$part3
131 umount
-v /dev
/$part4
134 mkfs
-V -t ext3
/dev
/$part4
135 mkfs
-V -t jfs
/dev
/$part1 <yesenter.txt
137 mount
-v -t ext3
/dev
/$part4 /test
/growfiles
/ext3
138 mount
-v -t jfs
/dev
/$part1 /test
/growfiles
/jfs
140 echo "************ Running EXT3 & JFS tests... "
141 ${LTPROOT}/../tools/rand_lines -g ${LTPROOT}/../runtest/lvm.part2 > ${TMPBASE}/lvm.part2
143 ${LTPROOT}/..
/pan
/ltp-pan
-e -S -a lvmpart2
-n lvmpart2
-l lvmlogfile
-f ${TMPBASE}/lvm.part2
&
147 umount
-v /dev
/$part1
148 umount
-v /dev
/$part4