LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 02-05-2008, 08:42 PM   #1
Zxarr
LQ Newbie
 
Registered: Sep 2005
Location: Ontario, Canada
Distribution: Fedora 8
Posts: 20

Rep: Reputation: 0
Write / Read a DAT (DDS 3 / 4) tape label


Greetings,

I have two tape devices:

/dev/st0 DDS4 SCSI DAT drive 20/40
/dev/st1 DDS3 SCSI DAT drive 12/24

I have used them both successfully under Fedora 8 with tar, no real issues reading / writing files to the device, have a simple little script that shows me what was written to the tape, etc, etc.

What I am wondering is if there is any way to 'label' a tape? I know that software like Veritas writes its own format, with a label at the beginning. Is there any particular format I can use to label tapes?

Will just doing the following work?

Code:
touch /tmp/LABEL-Tape02-LABEL
tar -cf /dev/nst0 /tmp/LABEL_Tape02_LABEL

<rest of backup script>  (/dev/st0)
Then to check a tape, I just do a

Code:
tar -tf /dev/st0 | grep 'LABEL*LABEL'
and it should find the first file on a tape with the name LABEL*LABEL?

The whole reason to label a tape for me, is to be able to search the files that were written to a tape and grab the correct tape. My current backup script does a tar -tf on the tape device, redirecting the output to a log file, which is then gzipped.

Anyway, thanks.
 
Old 02-06-2008, 08:36 PM   #2
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Lenny/Squeeze/Wheezy/Sid
Posts: 4,053

Rep: Reputation: 484Reputation: 484Reputation: 484Reputation: 484Reputation: 484
Writing to /dev/nst0 causes the tape NOT to rewind after writing the backup. So you correctly assumes that you first write the label file, and append it with you regular backup.

However, when you read back your label file you should do that also from /dev/nst0, not from /dev/st0. If you want to read back your regular backup, the tape should be positioned at the second block, not the first one.

You can also read from /dev/st0 so you can eject the tape after label reading, and then position the tape with the "mt asf" command. To avoid errors, it is recommended to give a rewind command to the tape drive anyway.

For years I have been backing up multiple partitions in different backup data sets using nst0. Unfortunately my tape drive became too unreliable, but until that moment it was ok.

jlinkels
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
hp usb dds tape pau_kacang Slackware 8 04-20-2006 08:54 AM
Installation of internal HP DAT 40i DDS internal tape drive netkepala Linux - Hardware 3 11-08-2004 12:22 PM
How to use a DDS-2 tape on Linux??? NeoY2k Linux - Hardware 1 10-24-2003 12:13 PM
RH9: formatting a DDS tape cleaner416 Linux - Hardware 0 09-21-2003 12:23 PM
installing a DDS/4 Tape drive dokkk_d Linux - Newbie 0 09-19-2002 08:02 PM


All times are GMT -5. The time now is 12:13 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration