[net.unix-wizards] magtape device naming conventions

norm@fluke.UUCP (Norm Seethoff) (09/11/86)

We are wrestling with a common magtape device naming scheme which can be
used across all of our UN*X systems, independent of vendor.  It seems clear
that we need to retain the /dev/{mt mt0 mt4 mt8 mt12 rmt*} conventions
for compatibility with existing software.  What we would like to do,
however, is create a parallel naming convention which would even make
sense to novice users.

We are presently considering:

                                               Device Name
              Function
                                   Rewind On Close   No Rewind On Close

              1600  bpi buffered   /dev/mt1600       /dev/nmt1600

              1600  bpi raw        /dev/rmt1600      /dev/nrmt1600

              6250  bpi buffered   /dev/mt6250       /dev/nmt6250

              6250  bpi raw        /dev/rmt6250      /dev/nrmt6250
             
The use of "n" and "r" obviously overloads the letters.  One could
easily guess that "nrmt1600" was the nonrewinding buffered 1600 bpi
device, when in fact in the above scheme it also specifies raw I/O.

Can any of you with experience in this area offer suggestions?
We are very interested in what direction UN*X system vendors may be
taking, especially AT&T, SUN, and DEC.

Norm Seethoff
John Fluke Mfg. Co., Inc.
{decvax!microso | allegra | lbl-csam | uw-beaver}!fluke!norm

wesommer@mit-trillian.MIT.EDU (William Sommerfeld) (09/16/86)

In article <355@sputnik.fluke.UUCP> norm@fluke.UUCP (Norm Seethoff) writes:
>We are wrestling with a common magtape device naming scheme which can be
>used across all of our UN*X systems, independent of vendor.  It seems clear
>that we need to retain the /dev/{mt mt0 mt4 mt8 mt12 rmt*} conventions
>for compatibility with existing software.  What we would like to do,
>however, is create a parallel naming convention which would even make
>sense to novice users.
>                                   Rewind On Close   No Rewind On Close
>              1600  bpi buffered   /dev/mt1600       /dev/nmt1600
>              1600  bpi raw        /dev/rmt1600      /dev/nrmt1600
>              6250  bpi buffered   /dev/mt6250       /dev/nmt6250
>              6250  bpi raw        /dev/rmt6250      /dev/nrmt6250
>             

We have it set up *exactly* this way on our timesharing systems, and
have found it to be quite convenient.

					- Bill

ed@mtxinu.UUCP (Ed Gould) (09/18/86)

In article <355@sputnik.fluke.UUCP> norm@fluke.UUCP (Norm Seethoff) writes:
>We are wrestling with a common magtape device naming scheme which can be
>used across all of our UN*X systems, independent of vendor. ...
>
>We are presently considering:
>                                               Device Name
>              Function
>                                   Rewind On Close   No Rewind On Close
>
>              1600  bpi buffered   /dev/mt1600       /dev/nmt1600
>              1600  bpi raw        /dev/rmt1600      /dev/nrmt1600
>              6250  bpi buffered   /dev/mt6250       /dev/nmt6250
>              6250  bpi raw        /dev/rmt6250      /dev/nrmt6250

Be sure to allow for multiple tape drives.  The scheme we use is
/dev/[n][r]mt{0,1,2}.{800,1600,6250}

-- 
Ed Gould                    mt Xinu, 2560 Ninth St., Berkeley, CA  94710  USA
{ucbvax,decvax}!mtxinu!ed   +1 415 644 0146

"A man of quality is not threatened by a woman of equality."

john@unisoft.UUCP (John Sovereign) (09/18/86)

In article <355@sputnik.fluke.UUCP> norm@fluke.UUCP (Norm Seethoff) writes:
>We are wrestling with a common magtape device naming scheme....

I believe that beginning with SVR2.?, AT&T is pushing a new convention:
subdirectories in /dev for the names of secondary storage devices, i.e.,
/dev/dsk, /dev/rdsk, /dev/mt, and /dev/rmt for blocked and non-blocked
i/o on disks and magnetic tape, respectively.

For disks, the individual nodes look something like:
	/dev/dsk/c0d0s0		controller 0, drive 0, slice 0

I don't remember the individual names given to the tape devices, but why not:
	/dev/rmt/n1600		no-rewind-on-close, 1600bpi


John Sovereign		lll-lcc!unisoft!john		415/644-1230
UniSoft Systems		739 Allston Way			Berkeley, CA  94710

randy@AMSAA.arpa (Randy Sebra) (09/18/86)

Norm,

     Perhaps I don't completely understand your question, but it seems
to me that you may be needlessly complicating things.  What is wrong
with using symbolic links, which are supported by both 4.xbsd and SYS
V?  You could then call your devices anything you wish, say t1600_nr for
the 1600 BPI no rewind device.
     One thing you don't mention about your naming convention is what to
do if you have more than one tape drive on a system{mt1 mt5 mt9 mt13}?
It is quite conceivable that this will happen.

Randy Sebra
Army Materiel Systems Analysis Activity
Attn: AMXSY-DA
Aberdeen Proving Ground, Maryland 21005
Phone: (301) 278-6679 (AV) 298-6679 (FTS) 939-6679

bzs@bu-cs.bu.EDU (Barry Shein) (09/22/86)

Re: mag tape nameing

I think a good start towards this monumental problem would be to create
a second level directory a la SYSV, like

	/dev/mt/1600r0		# rewind unit 0
	/dev/mt/6250n0		# no rewind unit 0
	/dev/rmt/1600r1		# rewind, raw, unit 1

etc. But a rose by any other name...

	-Barry Shein, Boston University

	

gwyn@brl-smoke.ARPA (Doug Gwyn ) (09/23/86)

In article <3957@brl-smoke.ARPA> Barry Shein <bzs@bu-cs.bu.EDU> writes:
>	/dev/mt/1600r0		# rewind unit 0
>	/dev/mt/6250n0		# no rewind unit 0
>	/dev/rmt/1600r1		# rewind, raw, unit 1

Note that this is also amenable to
implementing a special "magtape file system"
via the filesystem switch (present in V8 & SVR3),
as opposed to trying to encode all this stuff
in minor device numbers..

rsp@decvax.UUCP (Ricky Palmer) (09/27/86)

How about the following?

/dev/{n,r}mt{0,...,N}{l,m,h}

where {n,r} is the usual norewind and/or raw prefix, N is some upper
bound whatever that happens to be and is just a count of units on the
system, while {l,m,h} is "l"ow, "m"edium, or "h"igh density depending
on make and model of the drive. The mnemonics would "float" for
different devices, i.e., on, say, an 800-1600 drive there would only be
a low and high density, on a 1600-6250 drive there would still only be
a low and high density, on an 800-1600-6250 drive there would be a low,
medium, and, high density, but there would only be three "partition"
labels, "l", "m", and "h". For unit 0 on a system you would have:

/dev/rmt0l
/dev/rmt0m
/dev/rmt0h
/dev/nrmt0l
/dev/nrmt0m
/dev/nrmt0h

and so forth, assuming a triple density drive. On a single density drive
"h" would be the only letter used. In fact, you would always be assured
of having "/dev/{n}rmt0h" regardless of type.

	Ultimately, whatever is enunciated in the P1003.2 standardization
effort would probably be the best choice for names.

					Ricky Palmer
					DEC - Ultrix	

guy@sun.uucp (Guy Harris) (09/28/86)

> How about the following? ...while {l,m,h} is "l"ow, "m"edium, or "h"igh
> density depending on make and model of the drive.

While the scheme used in S5R2 shares the same unfortunate tendency to use a
single letter (the same "l", "m", or "h") when a longer description ("800",
"1600", or "6250") would be clearer, at least it provides a standard way of
getting at a given drive at a specified density; "l" is always 800, "m", is
always 1600, and "h" is always 6250.  There should be a standard way of
requesting a particular density that will work on all drives that support
that density; the numerical value of the density should appear in the name
used to select that density.

It might also be useful to request a "default" density (probably 1600BPI)
and a "maximum" density, but those should be kept distinct from requests for
specific densities.
-- 
	Guy Harris
	{ihnp4, decvax, seismo, decwrl, ...}!sun!guy
	guy@sun.com (or guy@sun.arpa)

chris@umcp-cs.UUCP (Chris Torek) (10/07/86)

>>How about the following? ...while {l,m,h} is "l"ow, "m"edium, or "h"igh
>>density depending on make and model of the drive.

In article <7711@sun.uucp> guy@sun.UUCP writes:
>While the scheme used in S5R2 shares the same unfortunate tendency to use a
>single letter (the same "l", "m", or "h") when a longer description ("800",
>"1600", or "6250") would be clearer, at least it provides a standard way of
>getting at a given drive at a specified density; "l" is always 800, "m", is
>always 1600, and "h" is always 6250.

Shades of EXEC-8!

But no: there `l', `m', and `h' stand for `low', `medium', and
`high' density, but these are 556, 800, and 1600 bpi respectively.
What did they use for 6250 bpi?  `s': `super-high density'.

>There should be a standard way of requesting a particular density
>that will work on all drives that support that density; the numerical
>value of the density should appear in the name used to select that
>density.

I agree.

Hey, this is Unix:

	mkdir /dev/tape
		# SysVish names (make corrections if required)
	ln /dev/rmt0 /dev/tape/rl0	#    rewind, raw, l=800,  drive 0
	ln /dev/rmt4 /dev/tape/nrl0	# no rewind, raw, l,      drive 0
	ln /dev/rmt8 /dev/tape/rm0	#    rewind, raw, m=1600, drive 0
	ln /dev/rmt12 /dev/trape/nrm0	# no rewind, raw, m,	  drive 0

		# more reasonable? names
	ln /dev/rmt0 /dev/tape/r9t800r0	  # raw, 9trk,  800, rewind, drive 0
	ln /dev/rmt4 /dev/tape/r9t800n0	  # raw, 9trk,  800, no rew, drive 0
	ln /dev/rmt8 /dev/tape/r9t1600r0  # raw, 9trk, 1600, rewind, drive 0
	ln /dev/rmt12 /dev/tape/r9t1600n0 # raw, 9trk, 1600, no rew, drive 0

No one says we have to use only one convention.  What are links for?
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 1516)
UUCP:	seismo!umcp-cs!chris
CSNet:	chris@umcp-cs		ARPA:	chris@mimsy.umd.edu