Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!hp-pcd!hpfcso!chance From: chance@hpfcso.FC.HP.COM (Chance Brohm) Newsgroups: comp.sys.hp Subject: Re: Using the DDS drive Message-ID: <7370326@hpfcso.FC.HP.COM> Date: 1 Mar 91 03:00:55 GMT References: <1991Feb14.233141.10571@objy.com> Organization: Hewlett-Packard, Fort Collins, CO, USA Lines: 48 / cochran@hpcupt1.cup.hp.com (Bob Cochran) / > This may or may not be your problem but it is a common mistake to attempt > to use the mt(1) utility (whose man page specifies that the device file > must be Berkeley-style) with the /dev/rmt/* device files which are shipped > (with AT&T-style specified). If the minor number associated with > the device file has been ORed with 0x100000, then Berkeley-style is specified Note that this (specific minor-bit) is architecture-dependent. On PA-RISC (9000/[68]xx) systems with HP-UX 7.0, this information is correct. A safer approach on these systems for making device files is the mksf(1m) command (/etc/mksf). Using mksf (instead of mknod), you can specify "-d tape1 -u" on the commandline to make a Berkeley-style tape device special-file. Read the manpage (especially the TAPE1 section) for the whole truth. See also the lssf(1m) manpage for the (useful!) ability to decipher the minor-bits of existing device special-files. On 300s, the situation is both easier and harder. The easier part is that 300s don't really have the concept of "LUN"s (Logical Unit Number) per se; instead the minor bits of the device special-file indicate the select code and bus address directly - you choose (without having to reconfigure/reboot) how/if to assign LUNs. The harder part is that the mksf command does not exist for MC68K (9000/[34]xx) systems (reason: no kernel-wired LUNs => no /etc/devices file => no mksf); you need to obtain (& read) the HP-UX System Admin Manual (for S300/400) to decipher the driver-specific minor bits. My (sorry, ancient! but still valid) copy of the HP-UX SA manual (HP Part # 98597-90059 10/87) has this information on pages 178-181 (9-track magtape). In case you don't have the manual handy (bad! bad! ;-), here's (some of) the bits for the 9000/[34]xx HP-UX 7.x tape drivers (character-major 5 and 9): Minor number mask SET (=1) RESET (=0) 0x000001 NoRewind RewindOnClose 0x000002 Berkeley AT&T 0x00FF00 Put the bus address here (MinorNum |= HPIBaddr << 8) 0xFF0000 Put the select code here (MinorNum |= SelectCode << 16) So for example, if you had an HPIB DDS drive set to 7978-compatibility mode at HPIB address 0 and connected to the internal 300 HPIB (select code 7), you could use the following commands to create Berkeley-style rewind and no-rewind device special-files respectively: /etc/mknod /dev/dds0 c 9 0x070002 # make a BSD rewind-on-close special-file /etc/mknod /dev/dds0n c 9 0x070003 # make a BSD no-rewind special-file Enjoy! -Chance This message must not be considered to be an official statement of any kind; the information is presented as-is with no warranty of correctness or fitness for any purpose.