We have written a script to help us do our dumps of an advanced
file system. This script does the following:
1) Promps for the dump level 0-9.
2) Clones the fileset using clonefset.
3) Mounts the clone.
4) Dumps the clone using vdump.
5) Unmounts the clone.
6) Removes the clone using rmfset.
We are using a TZ877 tape jukebox which automatically changes
tapes when it gets to the end of tape. Provided that the key
is in the correct position. ( There is a key that is used to lock
the access door to the jukebox that controls the access to the
tapes in the jukebox as well as the cycling of the tapes in the
jukebox).
The problem we are having is that when our dumps get to the end of the
tape, sometimes the vdump program does not automatically load the next
tape.
We get the following message:
vdump: Status at Tue Sep 5 22:21:20 1995
vdump: Dumped 1018275861 of 16127195124 bytes; 6.3% completed
vdump: Dumped 392 of 13563 directories; 1.1% completed
vdump: Dumped 5764 of 2026419 files; 0.3% completed
...
...
vdump: Status at Wed Sep 6 16:36:20 1995
vdump: Dumped 15572794782 of 16127195124 bytes; 96.6% completed
vdump: Dumped 34561 of 13563 directories; 100.0% completed
vdump: Dumped 2026397 of 2026419 files; 100.0% completed
vdump: out of space and unable to prompt input for new tape; [25] Not a typewriter
p
As you can see, it takes a long time to get this far ... 18 hours.
Additionally, it is almost done when it runs out of tape.
The dump script, lets call it dump.sh invokes vdump like this
#! /bin/sh
...
#runs in background so we can watch the output of vdump
#wipe out the log file
rm -f /tmp/dump_tmp
#keep the tail command from failing
touch /tmp/dump_tmp
#tail the log file in the background
tail -f /tmp/dump_tmp &
t_pid=$!
#vdump the filesystem
#runs in background but redirects stdout/stderr to /tmp/dump_tmp
vdump -0 -u -f /dev/rmt0h /raid_clone > /tmp/dump_tmp 2>&1 &
d_pid=$!
#wait for vdump to die and save its exit status
wait $d_pid
d_exit=$?
#kill the tail command
kill $t_pid
...
The script is written in this way so we can see the output of the vdump
program and save a copy of the output to a log file at the same time.
--------------------------------------------------------------------------
We realize that the tee command will do the same thing, however it is unclear
as to how to catch the exit status of the vdump command when doing the
following
vdump -0 -u -f /dev/rmt0h /raid_clone | tee /tmp/dump_tmp &
first of all $! refers to the tee command and $? will refer to the
exit status of the tee command not the exit status of the dump command
because the tee command will die after the vdump command.
However, I do not want to get in a debate as to a more eloquent way to
do this, I just want my tape jukebox to start working like it used to.
--------------------------------------------------------------------------
Does this problem have something to do with redirecting stdout/stderr to
the logfile???
Any solutions would be greatly appreciated.
Reducing the size of the filesystem is unacceptable.
The key is in the unlocked/automatic control position.
-------------------------------------------------------------------------
Before the script was modified to write to both stdout and a logfile I
dont remember having a problem. However, it does not always fail, so I
therefore can not say that this is the culprit.
Received on Fri Sep 08 1995 - 21:24:27 NZST