Tar & Tape drive without media

Hi all,

I would like to know what would happen if the tape (media) is not placed on the drive and a tar command is executed to backup on the tape.

My problem is that tar command hanged for multiple days instead of throwing the error,
Is it valid behaviour?

I was unable to test the scenario as i dont have a tape drive with me.

Regards,
Satheesh

what error was thrown. pls provide console message

Hi,

I dont have the output as such with me.

The function was called using the system function call to take the backup (executed on 20-Nov), Following are the snapshot of the process that i have currently (the output is obtained on 24-Nov).

The tape wasnt present when the backup was fired

root 648 558 0 Nov 19 ? 0:00 /ltdu/plat/6.1.7/bin/backupd
root 870 648 0 Nov 20 ? 0:00 sh -c tar cvf /dev/rmt/0n /tmp/ba
ckup/bkupinfo > /dev/null
root 871 870 0 Nov 20 ? 0:00 tar cvf /dev/rmt/0n /tmp/backup/b
kupinfo

Hope now my problem is much more clear

Regards,
Satheesh

The problem here is, you will have to see the script.. how intelligent it is to check whether the tape drive is there or not, if not its not to probe the drive anymore, or cause the system to hang..

What evident do you have that the tar command hanged on the system? did you try a tar command manually on some files?
And by the way, your output provided is really not sufficient to find the root cause

# nohup tar cvf /dev/rmt/0n /tmp/backup/bkupinfo & OR
are you able to restore (for example) manually?
# cd /path/to/restore
# pwd
Now, do a restore from tape:
# tar xvf /dev/rmt/0