- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: erase the tape
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
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
тАО08-25-2009 12:17 AM
тАО08-25-2009 12:17 AM
Re: erase the tape
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-25-2009 12:31 AM
тАО08-25-2009 12:31 AM
Re: erase the tape
Maybe _what_ is? "/dev/rmt/0m"? The name
with no "n" in it? Guess again.
> but how can i make sure
One way would be to use "tar" twice, and then
see if you got one or two archives on the
tape. If you get two, then it's not
rewinding between the "tar" jobs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-25-2009 01:13 AM
тАО08-25-2009 01:13 AM
Re: erase the tape
i get a job ,so it must be a rewind tape.
but how can i see other files? i can only see the lastest file after i run "tar"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-25-2009 06:02 AM
тАО08-25-2009 06:02 AM
Re: erase the tape
mt -f /dev/rmt/0m rewind
--- which rewound the tape
(1)
tar cvf /dev/rmt/0m 200908.tar.Z
a 200908.tar.Z 2280933 blocks
--- which wrote 200908.tar.Z to tape, and then REWOUND it
(2)
tar tvf /dev/rmt/0m
rw-rw-rw- 1001/107 1167837679 Aug 21 17:37 2009 200908.tar.Z
--- which read the tape contents, and then REWOUND it, which impacts the following, as you are now at the beginning of the tape
(3)
tar cvf /dev/rmt/0m 1.log
a 1.log 170 blocks
--- which wrote 1.log to the tape and then REWOUND it
(4)
tar tvf /dev/rmt/0m
rw-rw-rw- 1001/107 86588 Aug 24 17:57 2009 1.log
tar -tvf /dev/rmt/0m 200908.tar.Z
rw-rw-rw- 1001/107 86588 Aug 24 17:57 2009 1.log
--- yep, 1.log is the only thing on the tape. Remember, it rewound to the begining
--- when step (2) finished, so step (3) overwrote what was on it. you have to skip to the end of tape before (3), or use a non-rewind device, as in /dev/rmt/0mn, in step (2).
Using tar to append archives to a tape can be deadly, for just the reasons illustrated. I highly recommend that you DON'T use it this way. If you insist on doing so, read the man pages for "mt" and "tar" carefully. For what it's worth, I wouldn't trust the "append" option of tar as far as I could throw the server.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-25-2009 07:04 AM
тАО08-25-2009 07:04 AM
Re: erase the tape
> the "append" option of tar as far as I
> could throw the server.
You mean this one?
"man tar":
[...]
r
Add the named file to the end of the archive. The same blocking factor used to create
the archive must be used to append to it. This option cannot be used if the archive is a tape.
[...]
The "cannot be used if" part would seem to
limit the threat.
> [...] which impacts the following, [...]
Does it leave a crater?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-25-2009 07:26 AM
тАО08-25-2009 07:26 AM
Re: erase the tape
Add the named file to the end of the archive. The same blocking factor used to create
and never read:
This option cannot be used if the archive is a tape
as to the crater, sure it does. just about the size of the overwritten file :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-25-2009 10:52 PM
тАО08-25-2009 10:52 PM
Re: erase the tape
>how can i skip to the end of tape? i run "
mt -f /dev/rmt/0m eof " ?
[...] (3), or use a non-rewind device, as in /dev/rmt/0mn, in step (2).
> i run "
# tar -cvf /dev/rmt/0mn 1.txt
a 1.txt 1 blocks
# tar -cvf /dev/rmt/0mn 1.log
a 1.log 170 blocks
# tar -tvf /dev/rmt/0m
rw-rw-rw- 0/3 6 Aug 21 17:32 2009 1.txt
# tar -tvf /dev/rmt/0mn
rw-rw-rw- 1001/107 86547 Aug 25 17:32 2009 1.log
"
so the tape may wind forward when i run "tar -cvf /dev/rmt/0mn"
how can i see all the files in one command instead of two ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-25-2009 11:02 PM
тАО08-25-2009 11:02 PM
Re: erase the tape
> instead of two ?
One way would be to write the files to the
tape in one command instead of two.
A "tar -c" command writes one "tar" archive.
A "tar -t" (or "-x") command reads one "tar"
archive. A "tar" archive can contain more
than one file. For example:
tar -cvf /dev/rmt/0mn 1.log 1.txt
"man tar" might be useful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-25-2009 11:08 PM
тАО08-25-2009 11:08 PM
Re: erase the tape
This will fail without a no-rewind device.
>how can I see all the files in one command instead of two?
You can't. Don't do this if you want to protect the data that's on your tape!
Note OldSchool's warning.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-25-2009 11:12 PM
тАО08-25-2009 11:12 PM
Re: erase the tape
i run "man tar":
"-t List the names of all the files in the archive."
it should not read only a file