Tips & Tricks

Option Drives

Introduction

Getting started

Option disks get installed if the space on the drives installed is no longer sufficient. This guide assumes a third party drive is to be installed into a SGI workstation - adopting the information to server-level systems should not be too difficult.

This guide assumes that the system in question is an SGI workstation like the Indigo 2 which has 2 SCSI controllers - one internal and one external. The system has currently only one harddisk installed on SCSI ID #1 in one of the internal drivebays. The external SCSI controller is used to attach a DAT drive (SCSI ID #4). The hinv output of such a system is as follows:

FPU: MIPS R10010 Floating Point Chip Revision: 0.0
CPU: MIPS R10000 Processor Chip Revision: 2.5
1 195 MHZ IP28 Processor
Main memory size: 256 Mbytes
Secondary unified instruction/data cache size: 1 Mbyte
Instruction cache size: 32 Kbytes
Data cache size: 32 Kbytes
Integral SCSI controller 0: Version WD33C93B, revision D
Disk drive: unit 1 on SCSI controller 0
Integral SCSI controller 1: Version WD33C93B, revision D
Tape drive: unit 4 on SCSI controller 0: DAT
On-board serial ports: 2
On-board bi-directional parallel port
Graphics board: High Impact
Integral Ethernet: ec0, version 1
Iris Audio Processor: version A2 revision 1.1.0
EISA bus: adapter 0

Preparation

Finding a SCSI ID

Every device on a SCSI bus needs it's own unique ID. Finding an empty ID# is fairly simple, just have a look at the output of the hinv command. The one for the Indigo 2 of the example is printed above. Assuming that the drive is to be installed on the internal controller the relevant section is this:

Integral SCSI controller 0: Version WD33C93B, revision D
  Disk drive: unit 1 on SCSI controller 0

On SGI systems the controller normally has the SCSI ID# 0 and ID# 1 is occupied by the harddrive already installed, so the remaining ones are 2-7.

As this system has a narrow SCSI bus 8 devices is the maximum number of devices that can be attached (one of them being the controller itself). For wide SCSI controllers the maximum number of devices is 16 - again including the controller.

Setting the Jumpers

How the drive obtains it's SCSI ID# depends on where and how it is installed. In any case information on jumper settings can be obtained on most drive vendor web pages - if all else fails try using Google.

This is an overview on the most likely cases for internal drives on SGI machines:

SCA drives
This is trivial. The single connector of the SCA drives is also used to assign the SCSI ID# to the drive.
Other SCSI drives, drivesled with ID# cables
In these cases the ID# cables have to be attached to the appropriate jumpers. The ID# is set either automatically by the position in the drivebay or a small switch on the sled itself.
Other SCSI drives, drivesled without ID# cables
The SCSI ID# has to be set using jumpers on the drive itself.

How the SCSI ID# are assigned to external harddisks depends on the enclosure so it is not covered here. The common cases are similar to case 2 and 3 mentioned above.

Once the ID# is set or it is determined that it will be automatically set we are ready to mount the drive on the sled (or in the external chassis).

In the next step we will continue with the example. It is assumed that we have mouted the drive on an Indigo 2 sled and attached all cables. The SCSI ID# will be automatically set when the drive is in the system.

Installing the drive

At first the system needs to be shut down if it is powered up. SCSI devices on typical SGI workstations are not hot-pluggable. Trying to add or remove drives while the system is up and running can result in damage to both drive and system. So shut down the system if it is running.

Take the Owners Guide of the system and read how the drive has to be installed. For the Indigo 2 of the example the lockbar has to be removed as well as the front plastics. When the drive is inserted make sure everything is in place and connected firmly. Reassemble the system.

Once everything is back in place the system has to be powered up to continue with the software side of the installation procedure.

Checking if it is there

When the installation was successful the hinv output should show the new drive:

FPU: MIPS R10010 Floating Point Chip Revision: 0.0
CPU: MIPS R10000 Processor Chip Revision: 2.5
1 195 MHZ IP28 Processor
Main memory size: 256 Mbytes
Secondary unified instruction/data cache size: 1 Mbyte
Instruction cache size: 32 Kbytes
Data cache size: 32 Kbytes
Integral SCSI controller 0: Version WD33C93B, revision D
  Disk drive: unit 1 on SCSI controller 0
  Disk drive: unit 2 on SCSI controller 0
Integral SCSI controller 1: Version WD33C93B, revision D
  Tape drive: unit 4 on SCSI controller 0: DAT
On-board serial ports: 2
On-board bi-directional parallel port
Graphics board: High Impact
Integral Ethernet: ec0, version 1
Iris Audio Processor: version A2 revision 1.1.0
EISA bus: adapter 0

Setup

Creating volume header and partitions

The volume header and partitions are created using the fx -x command. The -x parameter invokes the program in expert mode. When it starts up select the controller number and device ID# of your new drive. This is how it is done in the example:

# fx -x
fx version 6.5, Jan  9, 2003
fx: "device-name" = (dksc)
fx: ctlr# = (0) 0
fx: drive# = (1) 2
fx: lun# = (0)
...opening dksc(0,2,0)
...drive selftest...OK
Scsi drive type == SEAGATE ST31200N SUN1.058722

You are then presented a menu from where you navigate to the option that lets you create all labels on the disk. Here is the example:

----- please choose one (? for help, .. to quit this menu)-----
[exi]t             [d]ebug/           [l]abel/           [a]uto
[b]adblock/        [exe]rcise/        [r]epartition/
fx> l

----- please choose one (? for help, .. to quit this menu)-----
[sh]ow/         [sy]nc          [se]t/          [c]reate/
fx/label> c

----- please choose one (? for help, .. to quit this menu)-----
[p]artitions   [s]giinfo      [b]ootinfo     [d]irectory    [a]ll
fx/label/create> a

...creating default bootinfo
...created default partitions, use /repartition menu to change
...creating default sgiinfo
...creating default volume directory

After the labels are created go back to the root of the menu and then enter the repartition submenu to repartition the drive to be an option drive. The filesystem we select for the data partition is xfs. On older systems another choice can be efs, but for IRIX 6.5 xfs is strongly recommended.

Again here is the output of the example:

----- please choose one (? for help, .. to quit this menu)-----
[exi]t             [d]ebug/           [l]abel/           [a]uto
[b]adblock/        [exe]rcise/        [r]epartition/
fx> r

----- partitions-----
part  type        blocks            Megabytes   (base+size)
  0: xfs      210206 + 1850902      103 + 904
  1: raw        4096 + 206110         2 + 101
  8: volhdr        0 + 4096           0 + 2
 10: volume        0 + 2061108        0 + 1006

capacity is 2061108 blocks

----- please choose one (? for help, .. to quit this menu)-----
[ro]otdrive           [o]ptiondrive         [e]xpert
[u]srrootdrive        [re]size
fx/repartition> o

fx/repartition/optiondrive: type of data partition = (xfs)
Warning: you will need to re-install all software and restore user data
from backups after changing the partition layout.  Changing partitions
will cause all data on the drive to be lost.  Be sure you have the drive
backed up if it contains any user data.  Continue? yes

----- partitions-----
part  type        blocks            Megabytes   (base+size)
  7: xfs        4096 + 2057012        2 + 1004
  8: volhdr        0 + 4096           0 + 2
 10: volume        0 + 2061108        0 + 1006

capacity is 2061108 blocks

Now go back to the top of the menu and type exi to leave the fx program. This concludes our partitioning session.

Making filesystems

Making the filesystem is pretty easy. Just type use the mkfs command and give it the appropriate device of the data partition. The devices are in the /dev/dsk directory, the correct file for the example is dks0d2s7 (Controller# 0, SCSI ID# 2, partition #7).

# mkfs /dev/dsk/dks0d2s7
meta-data=/dev/dsk/dks0d2s7      isize=256    agcount=8, agsize=32141 blks
data     =                       bsize=4096   blocks=257126, imaxpct=25
         =                       sunit=0      swidth=0 blks, unwritten=1
naming   =version 2              bsize=4096
log      =internal log           bsize=4096   blocks=1200
realtime =none                   extsz=65536  blocks=0, rtextents=0

mkfs automatically invokes either mkfs_xfs or mkfs_efs depending on the filesystem type that has been selected during the partitioning of the drive.

Temporary Mount

The drive in the example is to be mounted to /storage, a directory which already exists. In this case all that has to be done is:

# mount /dev/dsk/dks0d2s7 /storage

The drive can be unmounted by either issuing umount /storage or umount /dev/dsk/dks0d2s7. Like the mount command this umount does not output anything upon successful completion.

Permanent Mount

If the drive has to be mounted upon every reboot a line has to be added to /etc/fstab. The line for the example can look like this (use your favourite text editor to add it to the file):

/dev/dsk/dks0d2s7 /storage xfs rw,raw=/dev/rdsk/dks0d2s7 0 0

To mount it now it is not necessary to reboot the system. It is possible to mount it as stated above, it is also possible to use the short form:

# mount /storage