- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: confused with command "tar". would the tape be...
Categories
Company
Local Language
Forums
Discussions
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2000 02:44 AM
09-18-2000 02:44 AM
When I reused a tape on the command
"tar -cvf /dev/rmt/0m /dir1 /dir2"
for several time, would the tape be possible full?
Isn't tar create a new archive and over-write the old tape instead of appeading to it, when it executes with option "-c", ?
Thank you in advance.
Jessica
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2000 02:48 AM
09-18-2000 02:48 AM
Re: confused with command "tar". would the tape be full?
you are right, tar with -c starts a new archive BUT if you had a previous command with the device /dev/rmt/0mn, the tape isn't rewind and so the next tar command writes after this position.
To prevent this rewind the tape explictly with:
mt -t /dev/rmt/0m rew
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2000 02:48 AM
09-18-2000 02:48 AM
Re: confused with command "tar". would the tape be full?
Because you are using the 'rewind' tape device (/dev/rmt/0m) tar will always rewind the tape when it closes the output file.
Thus if you run several 'tars' they will always overwrite each other.
If you want to have several tar dumps on a tape, you must use the 'non rewind' tape device (/dev/rmt/0mn (or 0mnb)).
Regards,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2000 02:49 AM
09-18-2000 02:49 AM
Re: confused with command "tar". would the tape be full?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2000 04:01 AM
09-18-2000 04:01 AM
Re: confused with command "tar". would the tape be full?
You didn't mention whether this occurs instantly or after a while. Also, what tape drive/media are you using, and how big is the data?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2000 02:15 AM
09-19-2000 02:15 AM
Re: confused with command "tar". would the tape be full?
Thanks all you guys' reply.
The media I use is HP's DLT tape drive with
a 40-80 GB data cartridge.
The error message I got at tar command was something like "tape full... enter device name... or null to abort ..."(I forgot to write it down at that moment.)
Since some of you mentioned that "/dev/rmt/0mn" can have the tape un-rewinded, I would like to know what benefit I can get by using this device? How can I identify the tar files I made on a tape for later extraction?
Thank you.
Jessica
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2000 07:50 AM
09-19-2000 07:50 AM
SolutionThe message that you got was that tar had run off the end of the tape.
If you use the non-rewind tape device file then when a program like 'tar' finishes the tape is left positioned at the end of the tar file. Running another tar produces a second file on the tape and so on. Each of the files is separated from the previous by a 'tape mark' and end of the last file is indicated by a 'double tape mark'. Thus three runs of tar to /dev/rmt/0mn will produce the following data on tape (*TM* is a tape mark):-
*TM*
*TM*
*TM*
*TM*
If you wrote a fourth file, this would start by overwriting the final tape mark.
As far as identifying the tar files goes, various techniques can be employed:-
If you script the running of tar then the script could log what it has done to a file somewhere.
You could write the contents on the tape label.
You could also use tar itself to identify the contents of a tar file with
'tar tvf /dev/rmt/0mn'
On a performance note, it is worth specifying the 'b' argument to tar with a blocksize of 64. This speeds up tar considerably and gets more data onto the tape.
Use 'tar cbf 64 /dev/rmt/0mn' to backup
and 'tar xbf 64 /dev/rmt/0mn to restore.
Hope this helps,
John