Operating System - HP-UX
1827288 Members
1569 Online
109717 Solutions
New Discussion

Which tape device do I use ?

 
SOLVED
Go to solution
SuperDome_1
Advisor

Which tape device do I use ?

Hi.. I'm trying to backup several directories of varying sizes to tape (a DDS-3 with 12 Gb native and 24 Gb compressed capacity)

I run ioscan -fnC tape to determine the device and get the following output :

Class I H/W Path Driver S/W State H/W Type Description
=======================================================================
tape 0 0/0/0/3/1.3.0 stape CLAIMED DEVICE HP C1537A
/dev/rmt/0m
/dev/rmt/0mb
/dev/rmt/0mn
/dev/rmt/0mnb
/dev/rmt/c3t3d0BEST
/dev/rmt/c3t3d0BESTb
/dev/rmt/c3t3d0BESTn
/dev/rmt/c3t3d0BESTnb
/dev/rmt/c3t3d0DDS
/dev/rmt/c3t3d0DDSb
/dev/rmt/c3t3d0DDSn
/dev/rmt/c3t3d0DDSnb

My question is, which tape device do I use with the tar cvf command, and also is there a particular device I should use if I want to put 24 Gb of data on this tape, (or do I have to compress the data first)..

Thx
14 REPLIES 14
Ross Zubritski
Trusted Contributor

Re: Which tape device do I use ?

/dev/rmt/0mnb
Uday_S_Ankolekar
Honored Contributor

Re: Which tape device do I use ?

ou can use /dev/rmt/0m or /dev/rmt/0mn

If it's the only drive then system will take it as default drive ( I mean no need to specify which device)

tar -cv will capture appropriate drive!

-USA..
Good Luck..
Uday_S_Ankolekar
Honored Contributor

Re: Which tape device do I use ?

You can use /dev/rmt/0m or /dev/rmt/0mn

If it's the only drive then system will take it as default drive ( I mean no need to specify which device)

tar -cv will capture appropriate drive!

-USA..
Good Luck..
Helen French
Honored Contributor
Solution

Re: Which tape device do I use ?

I would use this command for normal tar backup (no compression):

# tar -cvf /dev/rmt/0m
OR
# tar -cvf /dev/rmt/0mn (for no rewind)

If I need compressed (24GB), I would use:
# tar -cvf /dev/rmt/c3t3d0BEST
OR
# tar -cvf /dev/rmt/c3t3d0BESTn (for no rewind)
Life is a promise, fulfill it!
Pete Randall
Outstanding Contributor

Re: Which tape device do I use ?

I would choose
/dev/rmt/c3t3d0BEST, which will select the best available density. And I don't think you want a no-rewind device (nor a berkely style).


Pete

Pete
James R. Ferguson
Acclaimed Contributor

Re: Which tape device do I use ?

Hi:

For compression, when the tape drive supports it, use a device with "best" or a device file linked to one. Actually, this should be any of the '0m' files.

To see the attributes associated with a device file, do:

# lssf /dev/rmt/filename

For a complete picture of tape devices, see the 'mt(7)' man pages.

Regards!

...JRF...
Paula J Frazer-Campbell
Honored Contributor
Jean-Louis Phelix
Honored Contributor

Re: Which tape device do I use ?

hi,

I would always use /dev/rmt/Om. In fact it's always a hard link to the corresponding 'BEST DENSITY' file :

hp> ll /dev/rmt
total 12
drwxr-xr-x 2 bin bin 1024 Dec 19 15:22 .
dr-xr-xr-x 20 bin bin 5120 May 26 11:29 ..
crw-rw-rw- 2 bin bin 205 0x000000 Jan 23 15:09 0m
crw-rw-rw- 2 bin bin 205 0x000080 Dec 19 15:22 0mb
crw-rw-rw- 2 bin bin 205 0x000040 Jan 8 11:08 0mn
crw-rw-rw- 2 bin bin 205 0x0000c0 Dec 19 15:22 0mnb
crw-rw-rw- 2 bin bin 205 0x000000 Jan 23 15:09 c0t0d0BEST
crw-rw-rw- 2 bin bin 205 0x000080 Dec 19 15:22 c0t0d0BESTb
crw-rw-rw- 2 bin bin 205 0x000040 Jan 8 11:08 c0t0d0BESTn
crw-rw-rw- 2 bin bin 205 0x0000c0 Dec 19 15:22 c0t0d0BESTnb
crw-rw-rw- 1 bin bin 205 0x000001 Dec 19 15:22 c0t0d0DDS
crw-rw-rw- 1 bin bin 205 0x000081 Dec 19 15:22 c0t0d0DDSb
crw-rw-rw- 1 bin bin 205 0x000041 Dec 19 15:22 c0t0d0DDSn
crw-rw-rw- 1 bin bin 205 0x0000c1 Dec 19 15:22 c0t0d0DDSnb

Regards.
It works for me (© Bill McNAMARA ...)
Paula J Frazer-Campbell
Honored Contributor

Re: Which tape device do I use ?

Hi

Also

The tape device names have the following format:-

/dev/rmt/#dbn

where:-

# --- Logical tape number
d -- Tape density (h,m,l)
b -- BSD behavior
n -- No-rewind

Paula

If you can spell SysAdmin then you is one - anon
Pete Randall
Outstanding Contributor

Re: Which tape device do I use ?

Just an addendum to Jean-Louis suggestion:

Don't use /dev/rmt/Om (with a capital letter "o") - use /dev/rmt/0m (with a numeral "0"), otherwise you're likely to fill up your root file system.


Pete

Pete
SuperDome_1
Advisor

Re: Which tape device do I use ?

Thx for all your replies..

I've decided to take 2 backups , one using /dev/rmt/0mnb (since when I did a tar cvf /dev/rmt/0m, I was prompted for another tape, for the same directory) and the other using /dev/rmt/c3t3BEST0mnb.

I understand why I have to use norewind (to save tape space), but is there any other reason I should use norewind.

I'm also not sure why choosing a berkeley device (say /dev/rmt/0mnb) versus a non-berkeley (at&t) would matter.

I'm taking a tar on HP-UX 11.11, and will be restoring on to a system with HP-UX 11.0

Thx again for all your replies. Really appreciate it.. !!!
James R. Ferguson
Acclaimed Contributor

Re: Which tape device do I use ?

Hi (again):

In answer to your last questions:

You would use a "no-rewind" device if you wanted to package, for instance, multiple tar archives on a single tape. Ignite 'make_tape_recovery' uses a no-rewind device so that the LIF file can be placed on the recovery tape followed by the 'pax' archive. Hence you see this sequence to extract a file from the 'pax' (or 'tar') archive:

# mt -t /dev/rmt/0mn fsf 1
# tar -xvf /dev/rmt/0m filename

With regard to AT&T versus Berkley, the 'mt(7)' man pages note: "...When a file open for reading (only) is closed and the no-rewind bit is not set, the tape is rewound. If the no-rewind bit is set, the behavior depends on the style mode. For AT&T-style devices, the tape is positioned after the EOF following the data just read (unless already at BOT or Filemark). For Berkeley-style devices, the tape is not repositioned in any way."

Regards!

...JRF...

Rajesh G. Ghone
Regular Advisor

Re: Which tape device do I use ?

Hi,

you just give #tar -cv this will automatically take the default device file(the default device file is 0m)I have told you not to give device file because i have your ioscan output & through that output only i can say not give any device file.

Regards,
Rajesh G.
Rajesh Ghone

Re: Which tape device do I use ?

Incidentally, you'll be very lucky to get 24GB of data on a single tape. This is assuming the best available type of data to compress and works off a compression ratio of 2:1. A more realistic compression ratio for most data types is 1.4:1 or about 16-17GB. Of course if most of what you are backing up is pictures/movies etc which are already stored in fairly compressed formats then you won't even get that.

HTH

Duncan

I am an HPE Employee
Accept or Kudo