Capture more state on failure... dd the contents of the filesystem

and pass through gzip.. this should produce a 20-40 Mb compressed filesystem
image that can be xfs_db'd or mounted loopback.
This commit is contained in:
Andrew Gildfind
2001-04-27 04:28:12 +00:00
parent c5d447557d
commit f3bd0864f4
+10 -2
View File
@@ -70,7 +70,7 @@ _fill()
"src/fill2fs --verbose --dir=$1 --seed=0 --filesize=65536 --stddev=32768 --list=- >>$tmp.manifest"
}
_do_die_on_error=always
_do_die_on_error=message_only
rm -f $seq.full
#agsize=16
agsize=32
@@ -92,7 +92,15 @@ do
_do "umount $SCRATCH_MNT"
_do "mount -t xfs $SCRATCH_DEV $SCRATCH_MNT"
echo "done"
_do "Check files" "src/fill2fs_check $tmp.manifest"
echo -n "Check files... "
if ! _do "src/fill2fs_check $tmp.manifest"; then
echo "fail (see $seq.full)"
_do "cat $tmp.manifest"
_do "ls -altrR $SCRATCH_MNT"
_do "dd if=$SCRATCH_DEV bs=4096 count=$size | gzip -9 > $seq.fsimage.gz"
status=1 ; exit
fi
echo "done"
done
# success, all done