#!/bin/bash -x
-OST=2
-MDS=3
+OST=`../utils/obdctl name2dev OSCDEV`
+MDS=`../utils/obdctl name2dev MDCDEV`
mkdir /mnt/lustre/foo
mkdir /mnt/lustre/foo2
umount /mnt/lustre
mount -t lustre_lite -o ost=$OST,mds=$MDS none /mnt/lustre
-echo "ready debugger"
-read
-
echo foo >> /mnt/lustre/bar
cat /mnt/lustre/bar
cat /mnt/lustre/bar
-exit;
-
echo foo >> /mnt/lustre/iotest
echo bar >> /mnt/lustre/iotest
cat /mnt/lustre/iotest
umount /mnt/lustre
mount -t lustre_lite -o ost=$OST,mds=$MDS none /mnt/lustre
-cat /mnt/lustre/iotest
\ No newline at end of file
+echo "Testing truncation..."
+echo foo > /mnt/lustre/iotest
+echo bar >> /mnt/lustre/iotest
+cat /mnt/lustre/iotest
+echo "trucating to 3 bytes now..."
+./truncate /mnt/lustre/iotest 4
+cat /mnt/lustre/iotest
+