Extra filtering as part of IRIX/Linux xfstests reconciliation for dump.

This commit is contained in:
Tim Shimmin
2001-11-20 03:42:58 +00:00
parent 0d4e927911
commit 19beb54c96
19 changed files with 212 additions and 87 deletions
+1 -3
View File
@@ -8,7 +8,6 @@ fsstress : -f link=10 -f creat=10 -f mkdir=10 -f truncate=5 -f symlink=10
Erasing tape
Dumping to tape...
xfsdump -s DUMP_SUBDIR -f TAPE_DEV -M stress_tape_media -L stress_022 SCRATCH_MNT
xfsdump: version 3.0 - Running single-threaded
xfsdump: level 0 dump of HOSTNAME:SCRATCH_MNT
xfsdump: dump date: DATE
xfsdump: session id: ID
@@ -37,14 +36,13 @@ xfsdump: writing stream terminator
xfsdump: beginning media stream terminator
xfsdump: media file 2 (media 0, file 2)
xfsdump: ending media stream terminator
xfsdump: media stream terminator size 1048576 bytes
xfsdump: media stream terminator size BLOCKSZ bytes
xfsdump: dump size (non-dir files) : NUM bytes
xfsdump: dump complete: SECS seconds elapsed
xfsdump: Dump Status: SUCCESS
Rewinding tape
Restoring from tape...
xfsrestore -f TAPE_DEV -L stress_022 RESTORE_DIR
xfsrestore: version 3.0 - Running single-threaded
xfsrestore: using online session inventory
xfsrestore: searching media for directory dump
xfsrestore: preparing drive
+1 -3
View File
@@ -5,7 +5,6 @@ Setup ....................................
Erasing tape
Dumping to tape...
xfsdump -s DUMP_SUBDIR -f TAPE_DEV -M stress_tape_media -L stress_023 SCRATCH_MNT
xfsdump: version 3.0 - Running single-threaded
xfsdump: level 0 dump of HOSTNAME:SCRATCH_MNT
xfsdump: dump date: DATE
xfsdump: session id: ID
@@ -34,14 +33,13 @@ xfsdump: writing stream terminator
xfsdump: beginning media stream terminator
xfsdump: media file 2 (media 0, file 2)
xfsdump: ending media stream terminator
xfsdump: media stream terminator size 1048576 bytes
xfsdump: media stream terminator size BLOCKSZ bytes
xfsdump: dump size (non-dir files) : NUM bytes
xfsdump: dump complete: SECS seconds elapsed
xfsdump: Dump Status: SUCCESS
Rewinding tape
Restoring from tape...
xfsrestore -f TAPE_DEV -L stress_023 RESTORE_DIR
xfsrestore: version 3.0 - Running single-threaded
xfsrestore: using online session inventory
xfsrestore: searching media for directory dump
xfsrestore: preparing drive
+2 -5
View File
@@ -5,7 +5,6 @@ Setup ....................................
Erasing tape
Dumping to tape...
xfsdump -l0 -f TAPE_DEV -M stress_tape_media -L stress_024 SCRATCH_MNT
xfsdump: version 3.0 - Running single-threaded
xfsdump: level 0 dump of HOSTNAME:SCRATCH_MNT
xfsdump: dump date: DATE
xfsdump: session id: ID
@@ -34,14 +33,13 @@ xfsdump: writing stream terminator
xfsdump: beginning media stream terminator
xfsdump: media file 2 (media 0, file 2)
xfsdump: ending media stream terminator
xfsdump: media stream terminator size 1048576 bytes
xfsdump: media stream terminator size BLOCKSZ bytes
xfsdump: dump size (non-dir files) : NUM bytes
xfsdump: dump complete: SECS seconds elapsed
xfsdump: Dump Status: SUCCESS
Erasing tape
Dumping incrementally to tape...
xfsdump -l1 -f TAPE_DEV -M stress_tape_media -L stress_024 SCRATCH_MNT
xfsdump: version 3.0 - Running single-threaded
xfsdump: level 1 incremental dump of HOSTNAME:SCRATCH_MNT based on level 0 dump begun DATE
xfsdump: dump date: DATE
xfsdump: session id: ID
@@ -69,14 +67,13 @@ xfsdump: writing stream terminator
xfsdump: beginning media stream terminator
xfsdump: media file 2 (media 0, file 2)
xfsdump: ending media stream terminator
xfsdump: media stream terminator size 1048576 bytes
xfsdump: media stream terminator size BLOCKSZ bytes
xfsdump: dump size (non-dir files) : NUM bytes
xfsdump: dump complete: SECS seconds elapsed
xfsdump: Dump Status: SUCCESS
Rewinding tape
Restoring from tape...
xfsrestore -f TAPE_DEV -L stress_024 RESTORE_DIR
xfsrestore: version 3.0 - Running single-threaded
xfsrestore: using online session inventory
xfsrestore: searching media for directory dump
xfsrestore: preparing drive
-2
View File
@@ -5,7 +5,6 @@ Setup ....................................
Erasing tape
Dumping to tape...
xfsdump -m -b 1048576 -l0 -f TAPE_DEV -M stress_tape_media -L stress_025 SCRATCH_MNT
xfsdump: version 3.0 - Running single-threaded
xfsdump: level 0 dump of HOSTNAME:SCRATCH_MNT
xfsdump: dump date: DATE
xfsdump: session id: ID
@@ -36,7 +35,6 @@ xfsdump: Dump Status: SUCCESS
Rewinding tape
Restoring from tape...
xfsrestore -m -b 1048576 -f TAPE_DEV -L stress_025 RESTORE_DIR
xfsrestore: version 3.0 - Running single-threaded
xfsrestore: using online session inventory
xfsrestore: searching media for directory dump
xfsrestore: preparing drive
-2
View File
@@ -3,7 +3,6 @@ Creating directory system to dump using src/fill.
Setup ....................................
Dumping to file...
xfsdump -f DUMP_FILE -M stress_tape_media -L stress_026 SCRATCH_MNT
xfsdump: version 3.0 - Running single-threaded
xfsdump: level 0 dump of HOSTNAME:SCRATCH_MNT
xfsdump: dump date: DATE
xfsdump: session id: ID
@@ -27,7 +26,6 @@ xfsdump: dump complete: SECS seconds elapsed
xfsdump: Dump Status: SUCCESS
Restoring from file...
xfsrestore -f DUMP_FILE -L stress_026 RESTORE_DIR
xfsrestore: version 3.0 - Running single-threaded
xfsrestore: using online session inventory
xfsrestore: searching media for directory dump
xfsrestore: examining media file 0
-2
View File
@@ -3,7 +3,6 @@ Creating directory system to dump using src/fill.
Setup ....................................
xfsdump|xfsrestore ...
xfsdump -s DUMP_SUBDIR - SCRATCH_MNT | xfsrestore - RESTORE_DIR
xfsrestore: version 3.0 - Running single-threaded
xfsrestore: searching media for dump
xfsrestore: examining media file 0
xfsrestore: dump description:
@@ -23,7 +22,6 @@ xfsrestore: directory post-processing
xfsrestore: restoring non-directory files
xfsrestore: restore complete: SECS seconds elapsed
xfsrestore: Restore Status: SUCCESS
xfsdump: version 3.0 - Running single-threaded
xfsdump: level 0 dump of HOSTNAME:SCRATCH_MNT
xfsdump: dump date: DATE
xfsdump: session id: ID
-5
View File
@@ -1,7 +1,6 @@
QA output created by 028
Dumping to file...
xfsdump -f DUMP_FILE -M stress_tape_media -L session.0 SCRATCH_MNT
xfsdump: version 3.0 - Running single-threaded
xfsdump: level 0 dump of HOSTNAME:SCRATCH_MNT
xfsdump: dump date: DATE
xfsdump: session id: ID
@@ -25,7 +24,6 @@ xfsdump: dump complete: SECS seconds elapsed
xfsdump: Dump Status: SUCCESS
Dumping to file...
xfsdump -f DUMP_FILE -M stress_tape_media -L session.1 SCRATCH_MNT
xfsdump: version 3.0 - Running single-threaded
xfsdump: level 0 dump of HOSTNAME:SCRATCH_MNT
xfsdump: dump date: DATE
xfsdump: session id: ID
@@ -48,7 +46,6 @@ xfsdump: dump complete: SECS seconds elapsed
xfsdump: Dump Status: SUCCESS
Dumping to file...
xfsdump -f DUMP_FILE -M stress_tape_media -L session.2 SCRATCH_MNT
xfsdump: version 3.0 - Running single-threaded
xfsdump: level 0 dump of HOSTNAME:SCRATCH_MNT
xfsdump: dump date: DATE
xfsdump: session id: ID
@@ -71,7 +68,6 @@ xfsdump: dump complete: SECS seconds elapsed
xfsdump: Dump Status: SUCCESS
Dumping to file...
xfsdump -f DUMP_FILE -M stress_tape_media -L session.3 SCRATCH_MNT
xfsdump: version 3.0 - Running single-threaded
xfsdump: level 0 dump of HOSTNAME:SCRATCH_MNT
xfsdump: dump date: DATE
xfsdump: session id: ID
@@ -94,7 +90,6 @@ xfsdump: dump complete: SECS seconds elapsed
xfsdump: Dump Status: SUCCESS
Dumping to file...
xfsdump -f DUMP_FILE -M stress_tape_media -L session.4 SCRATCH_MNT
xfsdump: version 3.0 - Running single-threaded
xfsdump: level 0 dump of HOSTNAME:SCRATCH_MNT
xfsdump: dump date: DATE
xfsdump: session id: ID
+2 -5
View File
@@ -5,7 +5,6 @@ Setup ....................................
Erasing tape
Dumping to tape...
xfsdump -l0 -f TAPE_DEV -M stress_tape_media -L 035.1 SCRATCH_MNT
xfsdump: version 3.0 - Running single-threaded
xfsdump: level 0 dump of HOSTNAME:SCRATCH_MNT
xfsdump: dump date: DATE
xfsdump: session id: ID
@@ -34,7 +33,7 @@ xfsdump: writing stream terminator
xfsdump: beginning media stream terminator
xfsdump: media file 2 (media 0, file 2)
xfsdump: ending media stream terminator
xfsdump: media stream terminator size 1048576 bytes
xfsdump: media stream terminator size BLOCKSZ bytes
xfsdump: dump size (non-dir files) : NUM bytes
xfsdump: dump complete: SECS seconds elapsed
xfsdump: Dump Status: SUCCESS
@@ -42,7 +41,6 @@ Creating directory system to dump using src/fill.
Setup ....
Dumping to tape...
xfsdump -l0 -f TAPE_DEV -M stress_tape_media -L 035.2 SCRATCH_MNT
xfsdump: version 3.0 - Running single-threaded
xfsdump: level 0 dump of HOSTNAME:SCRATCH_MNT
xfsdump: dump date: DATE
xfsdump: session id: ID
@@ -74,14 +72,13 @@ xfsdump: writing stream terminator
xfsdump: beginning media stream terminator
xfsdump: media file 2 (media 0, file 4)
xfsdump: ending media stream terminator
xfsdump: media stream terminator size 1048576 bytes
xfsdump: media stream terminator size BLOCKSZ bytes
xfsdump: dump size (non-dir files) : NUM bytes
xfsdump: dump complete: SECS seconds elapsed
xfsdump: Dump Status: SUCCESS
Rewinding tape
Restoring from tape...
xfsrestore -f TAPE_DEV -L 035.2 RESTORE_DIR
xfsrestore: version 3.0 - Running single-threaded
xfsrestore: using online session inventory
xfsrestore: searching media for directory dump
xfsrestore: preparing drive
-2
View File
@@ -4,7 +4,6 @@ Setup ....................................
Erasing tape
Dumping to tape...
xfsdump -o -F -m -b 1048576 -l0 -f TAPE_DEV -M stress_tape_media -L stress_036 SCRATCH_MNT
xfsdump: version 3.0 - Running single-threaded
xfsdump: level 0 dump of HOSTNAME:SCRATCH_MNT
xfsdump: dump date: DATE
xfsdump: session id: ID
@@ -36,7 +35,6 @@ xfsdump: Dump Status: SUCCESS
Rewinding tape
Restoring from tape...
xfsrestore -m -b 1048576 -f TAPE_DEV -L stress_036 RESTORE_DIR
xfsrestore: version 3.0 - Running single-threaded
xfsrestore: using online session inventory
xfsrestore: searching media for directory dump
xfsrestore: preparing drive
-2
View File
@@ -4,7 +4,6 @@ Setup ....................................
Erasing tape
Dumping to tape...
xfsdump -o -F -m -b 1048576 -l0 -f TAPE_DEV -M stress_tape_media -L stress_037 SCRATCH_MNT
xfsdump: version 3.0 - Running single-threaded
xfsdump: level 0 dump of HOSTNAME:SCRATCH_MNT
xfsdump: dump date: DATE
xfsdump: session id: ID
@@ -36,7 +35,6 @@ xfsdump: Dump Status: SUCCESS
Rewinding tape
Restoring from tape...
xfsrestore -m -b 1048576 -f TAPE_DEV -L stress_037 RESTORE_DIR
xfsrestore: version 3.0 - Running single-threaded
xfsrestore: using online session inventory
xfsrestore: searching media for directory dump
xfsrestore: preparing drive
-2
View File
@@ -4,7 +4,6 @@ Setup ....................................
Erasing tape
Dumping to tape...
xfsdump -l0 -f TAPE_DEV -M stress_tape_media -L stress_038 SCRATCH_MNT
xfsdump: version 3.0 - Running single-threaded
xfsdump: level 0 dump of HOSTNAME:SCRATCH_MNT
xfsdump: dump date: DATE
xfsdump: session id: ID
@@ -40,7 +39,6 @@ xfsdump: Dump Status: SUCCESS
Rewinding tape
Restoring from tape...
xfsrestore -f TAPE_DEV -L stress_038 RESTORE_DIR
xfsrestore: version 3.0 - Running single-threaded
xfsrestore: using online session inventory
xfsrestore: searching media for directory dump
xfsrestore: preparing drive
-2
View File
@@ -4,7 +4,6 @@ Setup ....................................
Erasing tape
Dumping to tape...
xfsdump -o -F -l0 -f TAPE_DEV -M stress_tape_media -L stress_039 SCRATCH_MNT
xfsdump: version 3.0 - Running single-threaded
xfsdump: level 0 dump of HOSTNAME:SCRATCH_MNT
xfsdump: dump date: DATE
xfsdump: session id: ID
@@ -41,7 +40,6 @@ xfsdump: Dump Status: SUCCESS
Rewinding tape
Restoring from tape...
xfsrestore -f TAPE_DEV -L stress_039 RESTORE_DIR
xfsrestore: version 3.0 - Running single-threaded
xfsrestore: using online session inventory
xfsrestore: searching media for directory dump
xfsrestore: preparing drive
+1 -3
View File
@@ -5,7 +5,6 @@ Setup ....................................
Erasing tape
Dumping to tape...
xfsdump -s DUMP_SUBDIR -f TAPE_DEV -M stress_tape_media -L stress_043 SCRATCH_MNT
xfsdump: version 3.0 - Running single-threaded
xfsdump: level 0 dump of HOSTNAME:SCRATCH_MNT
xfsdump: dump date: DATE
xfsdump: session id: ID
@@ -34,14 +33,13 @@ xfsdump: writing stream terminator
xfsdump: beginning media stream terminator
xfsdump: media file 2 (media 0, file 2)
xfsdump: ending media stream terminator
xfsdump: media stream terminator size 1048576 bytes
xfsdump: media stream terminator size BLOCKSZ bytes
xfsdump: dump size (non-dir files) : NUM bytes
xfsdump: dump complete: SECS seconds elapsed
xfsdump: Dump Status: SUCCESS
Rewinding tape
Restoring from tape...
xfsrestore -f TAPE_DEV -L stress_043 RESTORE_DIR
xfsrestore: version 3.0 - Running single-threaded
xfsrestore: searching media for dump
xfsrestore: preparing drive
xfsrestore: examining media file 0
-2
View File
@@ -3,7 +3,6 @@ Creating directory system of symlinks to dump.
Setup ....
Dumping to file...
xfsdump -f DUMP_FILE -M stress_tape_media -L stress_046 SCRATCH_MNT
xfsdump: version 3.0 - Running single-threaded
xfsdump: level 0 dump of HOSTNAME:SCRATCH_MNT
xfsdump: dump date: DATE
xfsdump: session id: ID
@@ -27,7 +26,6 @@ xfsdump: dump complete: SECS seconds elapsed
xfsdump: Dump Status: SUCCESS
Restoring from file...
xfsrestore -f DUMP_FILE -L stress_046 RESTORE_DIR
xfsrestore: version 3.0 - Running single-threaded
xfsrestore: using online session inventory
xfsrestore: searching media for directory dump
xfsrestore: examining media file 0
-5
View File
@@ -1,7 +1,6 @@
QA output created by 047
Dumping to file...
xfsdump -f DUMP_FILE -M stress_tape_media -L session.0 SCRATCH_MNT
xfsdump: version 3.0 - Running single-threaded
xfsdump: level 0 dump of HOSTNAME:SCRATCH_MNT
xfsdump: dump date: DATE
xfsdump: session id: ID
@@ -25,7 +24,6 @@ xfsdump: dump complete: SECS seconds elapsed
xfsdump: Dump Status: SUCCESS
Dumping to file...
xfsdump -f DUMP_FILE -M stress_tape_media -L session.1 SCRATCH_MNT
xfsdump: version 3.0 - Running single-threaded
xfsdump: level 0 dump of HOSTNAME:SCRATCH_MNT
xfsdump: dump date: DATE
xfsdump: session id: ID
@@ -48,7 +46,6 @@ xfsdump: dump complete: SECS seconds elapsed
xfsdump: Dump Status: SUCCESS
Dumping to file...
xfsdump -f DUMP_FILE -M stress_tape_media -L session.2 SCRATCH_MNT
xfsdump: version 3.0 - Running single-threaded
xfsdump: level 0 dump of HOSTNAME:SCRATCH_MNT
xfsdump: dump date: DATE
xfsdump: session id: ID
@@ -71,7 +68,6 @@ xfsdump: dump complete: SECS seconds elapsed
xfsdump: Dump Status: SUCCESS
Dumping to file...
xfsdump -f DUMP_FILE -M stress_tape_media -L session.3 SCRATCH_MNT
xfsdump: version 3.0 - Running single-threaded
xfsdump: level 0 dump of HOSTNAME:SCRATCH_MNT
xfsdump: dump date: DATE
xfsdump: session id: ID
@@ -94,7 +90,6 @@ xfsdump: dump complete: SECS seconds elapsed
xfsdump: Dump Status: SUCCESS
Dumping to file...
xfsdump -f DUMP_FILE -M stress_tape_media -L session.4 SCRATCH_MNT
xfsdump: version 3.0 - Running single-threaded
xfsdump: level 0 dump of HOSTNAME:SCRATCH_MNT
xfsdump: dump date: DATE
xfsdump: session id: ID
-2
View File
@@ -4,7 +4,6 @@ Setup ....................................
Erasing tape
Dumping to tape...
xfsdump -o -F -l0 -f TAPE_DEV -M stress_tape_media -L stress_055 SCRATCH_MNT
xfsdump: version 3.0 - Running single-threaded
xfsdump: level 0 dump of HOSTNAME:SCRATCH_MNT
xfsdump: dump date: DATE
xfsdump: session id: ID
@@ -41,7 +40,6 @@ xfsdump: Dump Status: SUCCESS
Rewinding tape
Restoring from tape...
xfsrestore -f TAPE_DEV -L stress_055 RESTORE_DIR
xfsrestore: version 3.0 - Running single-threaded
xfsrestore: using online session inventory
xfsrestore: searching media for directory dump
xfsrestore: preparing drive
-2
View File
@@ -3,7 +3,6 @@ Creating directory system to dump using src/fill.
Setup ..........
Dumping to file...
xfsdump -f DUMP_FILE -M stress_tape_media -L stress_056 SCRATCH_MNT
xfsdump: version 3.0 - Running single-threaded
xfsdump: level 0 dump of HOSTNAME:SCRATCH_MNT
xfsdump: dump date: DATE
xfsdump: session id: ID
@@ -27,7 +26,6 @@ xfsdump: dump complete: SECS seconds elapsed
xfsdump: Dump Status: SUCCESS
Restoring from file...
xfsrestore -f DUMP_FILE -L stress_056 RESTORE_DIR
xfsrestore: version 3.0 - Running single-threaded
xfsrestore: using online session inventory
xfsrestore: searching media for directory dump
xfsrestore: examining media file 0
-1
View File
@@ -3,7 +3,6 @@ Creating directory system to dump using src/fill.
Setup ..........
Restoring from file...
xfsrestore -f DUMP_FILE -L stress_056 RESTORE_DIR
xfsrestore: version 3.0 - Running single-threaded
xfsrestore: searching media for dump
xfsrestore: examining media file 0
xfsrestore: found dump matching specified label:
+197 -29
View File
@@ -44,21 +44,23 @@ if [ -n "$DEBUGDUMP" ]; then
fi
# Use dump/restore in qa directory for debugging
#PATH=".:$PATH"
#export PATH
PATH=".:$PATH"
export PATH
#which xfsdump
#which xfsrestore
#which xfsinvutil
# status returned for not run tests
NOTRUNSTS=2
# name those directories
dump_file=$tmp.dumpfile
# dump_file=$here/dumpfile #TEMP OVERRIDE DUMP FILE
dump_sdir=dumpdir
dump_dir=$SCRATCH_MNT/$dump_sdir
restore_sdir=restoredir
restore_dir=$SCRATCH_MNT/$restore_sdir
multi=3
dumptape=$TAPE_DEV
media_label="stress_tape_media"
session_label="stress_$seq"
@@ -79,6 +81,16 @@ for dir in /var/xfsdump/inventory /var/lib/xfsdump/inventory; do
fi
done
# remove this when xfstests irix/linux port done
if [ "X$XFS_HOST_OS" = "Xirix" ]
then # IRIX
have_mtvariable=false
MKFS_OPTS=""
else # Linux
have_mtvariable=true
MKFS_OPTS="-f"
fi
#
# do a remote/local mt
@@ -198,6 +210,8 @@ _isrmt()
#
_set_variable()
{
$have_mtvariable || return
if _isrmt; then
:
else
@@ -234,7 +248,7 @@ _wipe_fs()
{
_require_scratch
mkfs -t xfs -f $SCRATCH_DEV >>$seq.full ||\
mkfs -t xfs $MKFS_OPTS $SCRATCH_DEV>>$seq.full ||\
_error "mkfs failed"
mount -t xfs $SCRATCH_DEV $SCRATCH_MNT >>$seq.full ||\
@@ -254,7 +268,7 @@ _cleanup()
# save it for inspection
for dir in /var/xfsdump/inventory /var/lib/xfsdump/inventory; do
[ -d $dir ] || continue
tar -zcvf $seq.inventory.tgz $dir
tar -cvf $seq.inventory.tar $dir
ls -lR $dir >$seq.inventory.ls
done
fi
@@ -275,6 +289,11 @@ _cleanup()
fi
}
#
# ensure that bulkstat data will
# match with incore data
# by forcing disk data to be written out
#
_stable_fs()
{
umount $SCRATCH_MNT >>$seq.full ||\
@@ -307,7 +326,7 @@ _create_dumpdir_stress()
echo "-----------------------------------------------"
echo "fsstress : $_param"
echo "-----------------------------------------------"
if ! $here/src/fsstress $_param $FSSTRESS_AVOID -n $_count -d $dump_dir >$tmp.out 2>&1
if ! $here/src/fsstress $_param -s 1 $FSSTRESS_AVOID -n $_count -d $dump_dir >$tmp.out 2>&1
then
echo " fsstress (count=$_count) returned $? - see $seq.full"
@@ -400,6 +419,40 @@ dir_mix2 d $nobody $nobody 642
End-of-File
}
_mk_fillconfig_ea()
{
cat <<End-of-File >$tmp.config
# pathname size user group perm name value
#
smalll 10 $nobody $nobody 777 attr1 some_text
biggg 102400 $nobody $nobody 777 attr2 some_text2
sub/smalll 10 $nobody $nobody 777 attr3 some_text3
sub/biggg 102400 $nobody $nobody 777 attr4 some_text4
dir d $nobody $nobody 777 attr5 dir_text
#
# Add more files so that there are more than the number
# of streams.
# There are bugs in dump/restore for # non-dir files < # streams
# It can be tested in another configuration.
# It is a pathalogical case.
#
sub/a 1 $nobody $nobody
sub/b 2 $nobody $nobody
sub/c 4 $nobody $nobody
sub/d 8 $nobody $nobody
sub/e 16 $nobody $nobody
sub/f 32 $nobody $nobody
sub/g 64 $nobody $nobody
sub/h 128 $nobody $nobody
sub/i 256 $nobody $nobody
sub/j 512 $nobody $nobody
sub/k 1024 $nobody $nobody
sub/l 2048 $nobody $nobody
sub/m 4096 $nobody $nobody
sub/n 8192 $nobody $nobody
End-of-File
}
#
# Create a bunch of directories/files of different sizes
# filled with data.
@@ -421,7 +474,7 @@ _do_create_dumpdir_fill()
$verbose && echo -n "Setup "
sed -e '/^#/d' $tmp.config \
| while read file nbytes owner group perms
| while read file nbytes owner group perms ea_name ea_value
do
if [ $nbytes = "d" ]; then
# create a directory
@@ -470,6 +523,9 @@ _do_create_dumpdir_fill()
if [ -n "$perms" ]; then
chmod $perms $file
fi
if [ -n "$ea_name" -a -n "$ea_value" ]; then
attr -s $ea_name -V $ea_value $file
fi
$verbose && echo -n "."
done
$verbose && echo
@@ -502,6 +558,13 @@ _create_dumpdir_fill_perm()
_stable_fs
}
_create_dumpdir_fill_ea()
{
_wipe_fs
_mk_fillconfig_ea
_do_create_dumpdir_fill
_stable_fs
}
#
@@ -617,11 +680,13 @@ _create_dumpdir_symlinks()
#
# Filter for ls
# Filter out dates on symlinks
# Filter out dates on symlinks and char devices
#
_ls_filter()
{
$AWK_PROG '/^l/ { date = $8; sub(date,"DATE"); print}
$AWK_PROG '
/^l/ { date = $8; sub(date,"DATE"); print}
/^c/ { date = $9; sub(date,"DATE"); print}
{print}' \
| sed -e 's/total [0-9][0-9]*/total TOTAL/'
}
@@ -636,6 +701,7 @@ _dump_filter_main()
sed \
-e "s/`hostname`/HOSTNAME/" \
-e "s#$SCRATCH_DEV#SCRATCH_DEV#" \
-e "s#$SCRATCH_RAWDEV#SCRATCH_DEV#" \
-e "s#$dumptape#TAPE_DEV#" \
-e "s#$SCRATCH_MNT#SCRATCH_MNT#" \
-e "s#$dump_file#DUMP_FILE#" \
@@ -644,15 +710,28 @@ _dump_filter_main()
-e 's/date:[ ].*/date: DATE/' \
-e 's/dump begun .*/dump begun DATE/' \
-e 's/[0-9][0-9]* seconds/SECS seconds/' \
-e 's/restore.[0-9][0-9]*/restore.PID/' \
-e 's/ino [0-9][0-9]*/ino INO/' \
-e '/: dump size/s/[0-9][0-9]*/NUM/' \
-e '/dump size:/s/[0-9][0-9]*/NUM/' \
-e '/media file size/s/[0-9][0-9]*/NUM/' \
-e '/mfile size:[ ]*/s/[0-9][0-9]*/NUM/' \
-e '/dump size per stream:/s/[0-9][0-9]*/NUM/' \
-e 's/\(media file size[ ]*\)[0-9][0-9]*/\1NUM/' \
-e 's/\(mfile size:[ ]*\)[0-9][0-9]*/\1NUM/' \
-e '/drive[ ]*[0-9][0-9]*:/d' \
-e '/\/dev\/tty/d' \
-e '/inventory session uuid/d' \
-e 's#/var/lib/xfsdump#/var/xfsdump#' \
-e '/ - Running single-threaded/d' \
-e '/^.*I\/O metrics: .*$/d' \
-e 's/1048576/BLOCKSZ/' \
-e 's/2097152/BLOCKSZ/' \
-e 's/(pid[ ]*[1-9][0-9]*)/\(pid PID\)/' \
| perl -ne '
if ($_ =~ /(?:Dump|Restore) Summary/) {
$skip = 1;
} elsif ($_ =~ /(?:Dump|Restore) Status/) {
$skip = 0;
}
print if (! $skip);'
}
_dump_filter()
@@ -676,17 +755,20 @@ _invutil_filter()
}
_dir_filter()
{
sed \
-e "s#$dump_file#DUMP_FILE#" \
-e "s#$SCRATCH_DEV#SCRATCH_DEV#" \
-e "s#$SCRATCH_RAWDEV#SCRATCH_DEV#" \
-e "s#$dumptape#TAPE_DEV#" \
-e "s#$dump_dir#DUMP_DIR#g" \
-e "s#$restore_dir#RESTORE_DIR#g" \
-e "s#$SCRATCH_MNT#SCRATCH_MNT#g" \
-e "s#$dump_sdir#DUMP_SUBDIR#g" \
-e "s#$restore_sdir#RESTORE_SUBDIR#g" \
-e "s#$$#PID#g" \
}
@@ -694,34 +776,41 @@ _parse_args()
{
OPTIND=0
dump_args=""
while getopts "f:FL:oqQ" c $*
while [ $# -gt 0 ]
do
case $c
case $1
in
f)
[ -z "$OPTARG" ] && _error "missing argument for -f"
dumptape=$OPTARG
-f)
[ -z "$2" ] && _error "missing argument for -f"
dumptape=$2
shift
;;
L)
[ -z "$OPTARG" ] && _error "missing argument for -L"
session_label=$OPTARG
-L)
[ -z "$2" ] && _error "missing argument for -L"
session_label=$2
shift
;;
o)
-o)
dump_args="$dump_args -o"
;;
F)
-F)
dump_args="$dump_args -F"
;;
q)
--multi)
multi=$2
shift
;;
-q)
do_quota_check=true
;;
Q)
-Q)
do_quota_check=false
;;
\?)
*)
_error "invalid argument"
;;
esac
shift
done
}
@@ -793,6 +882,28 @@ _do_dump_file()
xfsdump $opts 2>&1 | tee -a $seq.full | _dump_filter
}
#
# Do full dump to multiple files
#
_do_dump_multi_file()
{
_parse_args "$@"
multi_args=""
i=0
while [ $i -lt $multi ]
do
multi_args="$multi_args -f $dump_file.$i -M $media_label.$i"
i=`expr $i + 1`
done
echo "Dumping to files..."
opts="$_dump_debug$dump_args $multi_args -L $session_label $SCRATCH_MNT"
echo "xfsdump $opts" | _dir_filter
xfsdump $opts 2>&1 | tee -a $seq.full | _dump_filter
}
_prepare_restore_dir()
{
@@ -860,6 +971,29 @@ _do_restore_file()
xfsrestore $opts 2>&1 | tee -a $seq.full | _dump_filter
}
#
# Restore the tape from multiple dump files
#
_do_restore_multi_file()
{
_parse_args "$@"
_prepare_restore_dir
multi_args=""
i=0
while [ $i -lt $multi ]
do
multi_args="$multi_args -f $dump_file.$i"
i=`expr $i + 1`
done
echo "Restoring from file..."
opts="$_restore_debug$dump_args $multi_args -L $session_label $restore_dir"
echo "xfsrestore $opts" | _dir_filter
xfsrestore $opts 2>&1 | tee -a $seq.full | _dump_filter
}
#
# Do xfsdump piped into xfsrestore - xfsdump | xfsrestore
#
@@ -919,7 +1053,6 @@ _ls_nodate_compare_sub()
diff -cs $tmp.dump_dir $tmp.restore_dir | sed -e "s#$tmp#TMP#g"
}
#
# Compare using recursive diff the files of the dumped
# subdirectory.
@@ -928,9 +1061,44 @@ _ls_nodate_compare_sub()
_diff_compare_sub()
{
echo "Comparing dump directory with restore directory"
diff -rs $dump_dir $restore_dir/$dump_sdir | _dir_filter
diff -rs $dump_dir $restore_dir/$dump_sdir | _dir_filter | _check_quota_diff
}
_get_eas_on_path()
{
_path=$1
find $_path -exec attr -l {} \; |\
awk '{print $9, $2}' |\
sed 's/["]//g' |\
while read file ea_name; do
attr -g $ea_name $file
done
}
#
# Compare the extended attributes of the files/dirs
# b/w the dumped and restore dirs.
#
#
# Attribute "attr5" had a 8 byte value for /spare1/dump.5460/dir:
# Attribute "attr5" had a 8 byte value for /spare1/restore.5460/dump.5460/dir:
#
_diff_compare_eas()
{
echo "Comparing dump directory with restore directory"
echo "Looking at the extended attributes (EAs)"
echo "EAs on dump"
_get_eas_on_path $dump_dir | tee $seq.ea1 | _dir_filter
echo "EAs on restore"
_get_eas_on_path $restore_dir/$dump_sdir \
| sed -e "s#$restore_sdir\/##" \
| tee $seq.ea2 \
| _dir_filter
diff -s $seq.ea1 $seq.ea2
}
#
# Compare using recursive diff the files of the dumped
# filesystem
@@ -957,7 +1125,7 @@ _do_invutil()
{
host=`hostname`
echo "xfsinvutil $_invutil_debug -M $host:$SCRATCH_MNT \"$middate\" $*" >$seq.full
xfsinvutil $_invutil_debug -M $host:$SCRATCH_MNT "$middate" $* \
xfsinvutil $_invutil_debug $* -M $host:$SCRATCH_MNT "$middate" \
| tee -a $seq.full | _invutil_filter
}