Operating System - HP-UX
1834447 Members
2820 Online
110067 Solutions
New Discussion

Re: problem with mt -f <device name> fsf and bsf

 
Andrew Kaplan
Super Advisor

problem with mt -f <device name> fsf and bsf

Hi there --

I am trying to do several tar jobs on one dlt tape via a non-rewinding tape driver/device.

I am able to do the first tar job without a problem. After the job is done, I run the command: mt -f /dev/rmt/7mn rewind to bring the tape back to the beginning. After that, I run the command: mt -f /dev/rmt/7mn fsf 1 to position the tape for the next tar archive. The archive appears to finish, but if I do a mt -f /dev/rmt/7mn bsf 1, there is nothing on the tape.

If I rewind the tape back the beginning, the first tar job is there, but if I rewind the tape, and then do a mt -f /dev/rmt/7mn fsf 1, there is no data.

What am I doing wrong, and how can I correct this? Thanks.
A Journey In The Quest Of Knowledge
5 REPLIES 5
Steven Schweda
Honored Contributor

Re: problem with mt -f <device name> fsf and bsf

It's been a long time since I did this, but
you may need two "fsf" operations to get past
the first archive on the tape. I may be
crazy, but it should be easy enough to run
the experimant. Dim memory says that any
excess "fsf" will complain about end-of-tape,
which is a good indication of readiness to
proceed.

It's a question of (end-of-) tape marks (says
the dim memory).
Sundar_7
Honored Contributor

Re: problem with mt -f <device name> fsf and bsf

Andrew,

Did you remember to use the non-rewind device file with tar ? :-)

Sundar.
Learn What to do ,How to do and more importantly When to do ?
Andrew Kaplan
Super Advisor

Re: problem with mt -f <device name> fsf and bsf

Hi there --

Yes I did. The syntax that I used was tar -cvf /dev/rmt/7mn .
A Journey In The Quest Of Knowledge
A. Clay Stephenson
Acclaimed Contributor

Re: problem with mt -f <device name> fsf and bsf

The first thing that I would do is to start over and use mnb (Berkeley-style) devices rather than mn (AT&T-style) devices. The AT&T convention for tape positioning is insane or at least eccentric. After doing an initial rewind to make sure the medium is a BOT, you should be able lay down sucessive tar images.

While slower that using the fsf commands, you could always use dd to /dev/null to read the images that you want to skip.

Finally, even though I know you want to write multiple tar images rather than wasting all that space, ask yourself is the risk worth the cost. It is trivially easy for a single mistake with such a scheme to wipe out multiple backup images. Fbackup doesn't allow multiple images on a single medium for a reason; it's just too easy to be your own worst enemy.
If it ain't broke, I can fix that.
Peter Nikitka
Honored Contributor

Re: problem with mt -f <device name> fsf and bsf

Hi Andrew,

if you are going to put the new data at the end of your tape, I recommend using
mt -f /dev/nrdevice eom 1
to space to the end of the media.

Another approach may be NOT to do a rewind after the first backup job but leave the tape at the postion it is and continue with the next backup job.
Controlling the tape content - if requested - has be done after the backup of all jobs, however.

mfG Peter
The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"