Operating System - HP-UX
1751709 Members
3807 Online
108781 Solutions
New Discussion юеВ

Tape AT&T and Berkeley-style

 
gnaid
Occasional Contributor

Tape AT&T and Berkeley-style

We have the following default tape drive DSFs(v2 and v3 example) :
-----------------------------------------------------------------------------------------
c0t0d0BESTnb, tape0_BESTnb - Best density, no autorewind, Berkeley style
c0t0d0BESTb, tape0_BESTb - Best density, autorewind, Berkeley style
c0t0d0BESTn , tape0_BESTn - Best density, no autorewind, AT&T style
c0t0d0BEST, tape0_BEST - Best density, autorewind, AT&T style

According to man mt(7):
" 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
behaviour 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.
"

My question is about BEST(for example c0t0d0BEST, tape0_BEST)- Best density, autorewind, AT&T style(positioned after the EOF). I don't get it... the tape is positioned after the EOF and then it is rewound?! The first movement is redundant,isn't it?

When we have autorewind, what is the difference between BEST and BESTb?
7 REPLIES 7
SoorajCleris
Honored Contributor

Re: Tape AT&T and Berkeley-style

Hi,

The word "BEST" indicates that with this device file, the highest possible capacity format will be used. This will also include data compression if it is supported by the device.This will also include data compression if it is supported by the device.

The "b" character shows that the tape drive will follow the Berkley style instead of AT&T.

The character "n" shows that the tape will not be rewound at the end of the operation.

Hope the query is answered.
Regards,
Sooraj

"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity" - Dennis Ritchie
Dennis Handly
Acclaimed Contributor

Re: Tape AT&T and Berkeley-style

>When we have autorewind, what is the difference between BEST and BESTb?

It appears you're right. From mt(7), I don't see any difference. Unless there are other operations besides the documented close(2) that are affected.

Pete Randall
Outstanding Contributor

Re: Tape AT&T and Berkeley-style

At least you bothered to read the question, Dennis - good job!


Pete

Pete
gnaid
Occasional Contributor

Re: Tape AT&T and Berkeley-style

@Sooraj - i know that ;)
@Dennis - 10x Dennis
SoorajCleris
Honored Contributor

Re: Tape AT&T and Berkeley-style

Hi gnaid ,

:) .. As Pete told I missed the important part in the q itself, However

Dennis, Here you can see

Berkeley and AT&T functional modes differ in ├в read only├в close functionality. IfBerkeley identifies a ├в read only├в close on a device file minor number, the tapemedia position will remain unchanged by the device close operation. If AT&Tidentifies a ├в read only├в close on a device file minor number, the tape media will berepositioned just after the next tape filemark (the start of the next file). Normally,Berkeley mode should be used.

The last sentence is meant for only "no rewind". ?

Regards,
Sooraj



"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity" - Dennis Ritchie
Dennis Handly
Acclaimed Contributor

Re: Tape AT&T and Berkeley-style

>Sooraj: The last sentence is meant for only "no rewind"?

That's how I read mt(7). But it applies for the whole paragraph.
Bill Hassell
Honored Contributor

Re: Tape AT&T and Berkeley-style

AT&T behavior is best described as completely bizarre. Read the man page for mt(7) (hint: man 7 mt) and look at the Tape Behavioral Characteristics. It may take 3 or 4 tries to figure out AT&T style. The preferred/recommended tap device is Berkeley as there is no repositioning after a close. The man page for mt (man 1 mt) will state:

"Only raw, no-rewind Berkeley-type devices should be specified. This type of device will not reposition the tape upon close."

For the mt command, AT&T device files can really mess up tape positioning.

Now all the above only applies to tape positioning commands. Backup programs like fbackup bypass all automatic tape driver features and manage the tape position with driver calls.


Bill Hassell, sysadmin