[comp.sys.hp] Third-party SCSI disks under HP-UX

hardy@golem.ps.uci.edu (Meinhard E. Mayer (Hardy)) (02/06/91)

Some time ago there were several queries regarding third-party SCSI
disks for HP-systems. Today I succeeded in formatting and mounting a
disk I have on trial from a local supplier *Andataco*.  It is an 
Andataco 509 A (in fact a Maxtor XT-8760S in an Andataco enclosure),
667 MB disk which is used on many Suns and DECs on our campus. 
Andataco (andataco!ucsd.edu!inquire; our local rep is 
Dan Nickel, (714) 248-7125) sells it with a 5-year warranty with a 
24-hour exchange service (I won't quote the asking
price, since it may depend on their contract with the University, but
it did not sound unreasonable). 
There is also an 800 number for Andataco. 
Here is what needs to be done to install it (as previously remarked by
someone, SAM refuses to recognize the appropriate entries in
/etc/disktab, so things have to be done by hand; note that I did not 
get the maximum capacity out of the disk, since I did not have time to
fine tune the disktab entries; I will do it when I decide to buy the
disk).
----------------
       INSTRUCTIONS FOR INSTALLING THE ANDATACO DISKS ON HP-UX
STEP 1.
Make the following (or equivalent) entries in  /etc/disktab
#ANDATACO = MAXTOR XT-8760S XT8730S
## s0 = ns * nt * nc
## nc 1632 and 660959 did not work 
## MAXTOR XT-8760S
and_ns|andataco_noswap|maxtor8760_noswap:\
	:No swap:ns#27:nt#15:nc#1629:\
	:s0#659745:b0#8192:f0#1024:\
	:se#512:rm#3600:
and_40|andataco|maxtor8760:\
	:40 Mbytes swap:ns#27:nt#15:nc#1533:\
	:s0#621270:b0#8192:f0#1024:\
	:se#512:rm#3600:
## XT8730S --- this is their smaller 353 MB drive
and507_ns|andataco8730_noswap|maxtor8730_noswap:\
	:No swap:ns#27:nt#8:nc#1629:\
	:s0#351864:b0#8192:f0#1024:\
	:se#512:rm#3600:
and507_40|andataco8730|maxtor8730:\
	:40 Mbytes swap:ns#27:nt#8:nc#1444:\
	:s0#311904:b0#8192:f0#1024:\
	:se#512:rm#3600:
****(experiment with the values -- for me the entry and_40 worked and
yielded the results given below).***

STEP 2.  
Using mknod make the two device entries 
/dev/dsk
brw-r--r--   1 root     sys        7 0x0e0200 Feb  5 13:44 2s0
/dev/rdsk
crw-rw-rw-   1 root     other     47 0x0e0200 Feb  5 13:05 2s0
(see man-page for mknod)
This assumes that the Andataco drive is at address 2 (use whatever is
free).

STEP 3. 
Halt the computer, switch everything off.
Connect the Andataco drive with terminator to
the scsi connector on the root drive, and set its address to 2 (or
whatever is free in your scsi loop). 
Switch on the drive, and restart the computer.

STEP 4. Mediainit:
Log in as root, you don't have to be in single-user mode since the
drive is not yet active.
Run mediainit: (excerpts from script file of actual initialization)
 
root@golem:/dev/rdsk[55] medianinit -v /dev/rdsk/2s0 

root@golem:/dev/rdsk[56] mediainit: initialization process starting 
mediainit: locking SCSI device 
mediainit: initializing media 
mediainit: initialization process completed 

STEP 5. 
Make a new file system on the disk.
Use newfs with the appropriate entry in /etc/disktab:
(excerpt from script file with and_40 entry -- more MB could have been
obtained but I did not try):

root@golem:/etc[61] /etc/newfs /dev/rdsk/2s0 and_40 
 /dev/rdsk/2s0:  621270 sectors in 1534 cylinders of 15 tracks, 27 sectors 
        636.2Mb in 96 cyl groups (16 c/g, 6.64Mb/g, 2048 i/g) 
super-block backups (for fsck -b#) at: 
16, 6528, 13040, 19552, 26064, 32576, 39088, 45600, 52112, 58624, 
............. (lots more)
583536, 590048, 596560, 603072, 609584, 616096, 

STEP 6.  Mounting the file system
root@golem:/etc[62] cd / 
root@golem:/[63] mkdir disk2 
root@golem:/[67] /etc/mount /dev/dsk/2s0 /disk2 
root@golem:/[68] bdf 
 Filesystem           kbytes    used   avail capacity Mounted on 
/dev/dsk/0s0         247662  208497   14398    94%   / 
/dev/dsk/2s0         595140       9  535617     0%   /disk2 
script done on Tue Feb  5 13:12:18 1991
 
Now you can move directories to disk2 as described in  the System
Administrator Task manual.  I found that using rcp -r (via a diskless
node), was much quicker -- the only disadvantage was that the
modification dates were changed.

I might post a follow-up when I have more data.



Hardy Mayer
----****----
Professor Meinhard E. Mayer
Department of Physics
University of California
Irvine, CA, 92717
USA

hardy@golem.ps.uci.edu (Meinhard E. Mayer (Hardy)) (02/07/91)

Correction to article <HARDY.91Feb5223940@golem.ps.uci.edu> :

>>   Andataco (andataco!ucsd.edu!inquire; our local rep is 
Correction:
   The correct e-mail address is:
inquire%andataco.uucp@ucsd.edu

Also, my /etc/disktab entries should not be taken too literally;
that and_ns entry may be too large; if /etc/newfs issues the error
write error: 660959 
wtfs: No space left on device 
try lowering the entry, e.g., to:

and_ns|andataco_noswap|maxtor8760_noswap:\
	:No swap:ns#27:nt#15:nc#1608:\
	:s0#651240:b0#8192:f0#1024:\
	:se#512:rm#3600:

I have not tried this -- as stated I used and_40 and that worked,
though I get about 10-11 MB less than the Suns.










Hardy Mayer
----****----
Professor Meinhard E. Mayer
Department of Physics
University of California
Irvine, CA, 92717
USA

paulp@hpfcdc.HP.COM (Paul Perlmutter) (02/07/91)

Making disktab entries is not all that difficult.  There are general
directions at the beginning of /etc/distab.  Read the header for that
file.  Also,  use /etc/diskinfo to find out the exact size of the
disk.

> and_40|andataco|maxtor8760:\
> 	:40 Mbytes swap:ns#27:nt#15:nc#1533:\
> 	:s0#621270:b0#8192:f0#1024:\
> 	:se#512:rm#3600:

Basically,  'ns' => number of sectors per track
	    'nt' => number of tracks per cylinder
	    'nc' => number of cylinders

	    s0 = ns*nt*nc

The drive should have information to help you fill in these numbers,
but it would not be unreasonable to simply make up your own  numbers
(at a small loss of performance).  The only strict rules are:

	numbers (in the disktab entry) are in terms of 1KByte
	s0 must be <= actual disk size (as reported by diskinfo)

Usually you can easily find out the number of surfaces (which helps
you determine the number of tracks) and the total number of 1K
cylinders.  If you cannot get the remaining information,  use
trial and error arithmatic.

Cheers,
Paul Perlmutter
paul@hppaul.fc.hp.com

hardy@golem.ps.uci.edu (Meinhard E. Mayer (Hardy)) (02/08/91)

I tried to post this yesterday but it did not appear:
-----------------------------------------
Correction to article <HARDY.91Feb5223940@golem.ps.uci.edu> :

>>   Andataco (andataco!ucsd.edu!inquire;
Correction:
   The correct e-mail address is:
inquire%andataco.uucp@ucsd.edu

Also, my /etc/disktab entries should not be taken too literally;
that and_ns entry may be too large; if /etc/newfs issues the error
write error: 660959 
wtfs: No space left on device 
try lowering the entry, e.g., to:

and_ns|andataco_noswap|maxtor8760_noswap:\
	:No swap:ns#27:nt#15:nc#1608:\
	:s0#651240:b0#8192:f0#1024:\
	:se#512:rm#3600:

I have not tried this -- as stated I used and_40 and that worked,
though I get about 10-11 MB less than the Suns.










Hardy Mayer
----****----
Professor Meinhard E. Mayer
Department of Physics
University of California
Irvine, CA, 92717
USA

Hardy Mayer
----****----
Professor Meinhard E. Mayer
Department of Physics
University of California
Irvine, CA, 92717
USA

ianhogg@cs.umn.edu (Ian J. Hogg) (02/09/91)

I've got a program that creates disktab entries for SCSI disks.  It was written
by Matt Endres at Imprimis.  I don't know how well it works with non Imprimis
disks.  All you do is execute a command like 

   scsi_info /dev/rdsk/0s0 SABRE_VII 75

The options are the raw device file, the disktab entry name and the amount of
swap space desired.  If anyone wants this send me e-mail.  If there is
sufficient interest, I'll just post the source.
-- 
===============================================================================
Ian Hogg						ianhogg@cs.umn.edu
                                                        (612) 225-1401

scu@otter.hpl.hp.com (Shankar Unni) (02/20/91)

In comp.sys.hp, hardy@golem.ps.uci.edu (Meinhard E. Mayer (Hardy)) writes:
 
> Now you can move directories to disk2 as described in  the System
> Administrator Task manual.  I found that using rcp -r (via a diskless
> node), was much quicker -- the only disadvantage was that the
> modification dates were changed.

If you want to copy a tree to a target on the same node, instead of using
rcp -r, an equally fast and more reliable way is to execute the following
script, which preserves access and modify times, ownerships and links, if
run by a root user:

    % copytree dir1 dir2

The copytree script looks like the following:

    ------------------------------
    #!/bin/ksh
    if [ $# != 2 ]; then
        1>&2 echo Usage: $0 dir1 dir2
	exit 1
    fi
    if [ ! -d $1 -o ! -d $2 ]; then
        1>&2 echo Usage: $0 dir1 dir2
	exit 1
    fi

    cd $1
    find . -hidden -print | cpio -paduvmx $2
    ------------------------------

The arguments "dir1" and "dir2" mean the same thing that they do for "cp -r".

-----
Shankar Unni                               E-Mail:  shankar@cup.hp.com
Hewlett-Packard Laboratories, Bristol.

DISCLAIMER:
This response does not represent the official position of, or statement by,
the Hewlett-Packard Company.  The above data is provided for informational
purposes only.  It is supplied without warranty of any kind.

hardy@golem.ps.uci.edu (Meinhard E. Mayer (Hardy)) (02/20/91)

In article <2980013@otter.hpl.hp.com> scu@otter.hpl.hp.com (Shankar Unni) writes:


   If you want to copy a tree to a target on the same node, instead of using
   rcp -r, an equally fast and more reliable way is to execute the following
   script, which preserves access and modify times, ownerships and links, if
   run by a root user:

       % copytree dir1 dir2

   The copytree script looks like the following:
  ----
Thanks for the script -- I was always a bit unhappy that rcp 
``touched'' the dates. I only used rcp because the method 
described in the Administration Tasks required more patience than I
had.

Regards, 


Hardy Mayer
----****----
Professor Meinhard E. Mayer
Department of Physics
University of California
Irvine, CA, 92717
USA

whitten@hpcuhe.cup.hp.com (Jim Whitten) (02/27/91)

Well, my fave method for cloning unlike disks is...

1) mount your new disk, preferably not on the directory path you're going
   to be cloning/copying/whathaveyou. (If you're copy all of root on down,
   use a *very* unique directory name, like funkychicken97).

2) cd to the top of the directory tree you want to copy, and do this:

    find . -hidden -depth -print | cpio -pduvmxl /funkychicken97

    the 'm' option to cpio maintains file modification times, but not
    directory mod times. Do a "man" on cpio for the other options;
    basically these preserve links and copy special files. Lose the 
    -hidden option to "find" if you don't want CDF's to be copied.
    (Actually, there's a -cpio option to "find", I just don't happen to
    use it, mostly 'cuz of the next step...)

*)  If the directory or file system you've mounted your disk to is in the
    path you're trying to copy (like when you copy the entire disk from root
    down) use an "fgrep -v" in the command line:

     find . -hidden -depth -print | fgrep -v "./funkychicken97"  | \
     cpio -pduvmxl /funkychicken97

If you're truly cloning a disk, that is copying the contents of one
(perfectly good) disk to another disk of the *exact same* type and format,
just use "dd".

Good Luck,

Jim Whitten                           "The statements and opinions expressed
(408) 447-4759                         herein are mine alone and do not reflect
INTERNET: whitten@hprasor.cup.hp.com   those of my employer."
UUCP: ...!hplabs!hpda!whitten         "Not an official statement of HP"

                         Cupertino, California