Initialization of IRIX Disk Drives

 

 

 
Initializing IRIX Hard Disks

Background

IRIX can use to different file systems, EFS and XFS and the drives can be set up as a systems disk or an option drive.

The disk utility, fx, is used to initialize raw hard disk drives for SGI systems. 

fx is an interactive, menu-driven disk utility. It detects and maps out bad blocks on a disk. It also displays information stored on the label of the disk, including partition sizes, disk drive parameters, and the volume directory.

The INITIALIZE option creates only the volume header and partition table; this is the minimum that needs to be done for a disk drive to be usable.

There are two versions of fx. One runs in the standalone environment and must be used when the system disk is modified; it can be used for most other purposes as well, but may be less convenient. The -d, -l, -c, and -C options are not supported in standalone.

The other version runs as an IRIX command and is normally used by the superuser. While an ordinary user can use some features, if the disk device permissions permit, other features (typically formatting and bad block management) have permission checks within the various drivers that can only be used by the super user. A notable exception is that as shipped, all floppy-related fx features can be used by any user. When used on a mounted disk, or a disk whose partitions are part of mounted logical volume, this version warns you not to do anything destructive, but does not otherwise prohibit it.

A copy of the standalone version is normally kept in /stand/fx and can be invoked when the system is not running by giving the following command at the PROM Command Monitor:

          boot stand/fx

A standalone fx is provided in the /stand directory of CD-ROM discs containing software distributions with install tools, and can be invoked by the Command Monitor command: For systems with the 32 bit ARCS PROM (Indigo, Indigo2, Indy, Onyx, Challenge and O2), use this command:

          boot -f dksc(ctlr,unit,8)sashARCS dksc(ctlr,unit,7)stand/fx.ARCS

For systems with 64-bit ARCS PROM (for example, Power Challenge, Power Onyx, Power Indigo2, Indigo2 10000, Origin, Onyx2, and OCTANE ) use this command:

          boot -f dksc(ctlr,unit,8)sash64 dksc(ctlr,unit,7)stand/fx.64

where ctlr is the controller number (usually 0), unit is the SCSI id of the CD-ROM drive. 

Use the hinv command within the PROM to list the installed drives.

>> hinv

On an R5200 300MHz O2 with a 2GB and 9GB hard drive the response will look like this:

System:    IP32

Processor:  30Mhz R5000 with FPU

Primary I-cache size:   32 Kbytes

Primary D-cache size:  32 Kbytes

Secondary cache size:  1024 Kbytes

Memory size:  128 Mbytes

Graphics:   CRM, Rev C

Audio:   A3 version 1

SCSI Disk:   scsi(0)disk(1)

SCSI Disk:  scsi(0)disk(2)

SCSI Disk: scsi(0)cdrom(4)

In this output, the controller number is the "scsi" number and the drive address is the "disk" number. The type of controller is not listed.  As a rule, workstations have integral controllers and servers may have integral SCSI controllers or non-integral controllers that are SCSI or VME. On some Challenge systems, the output of hinv in the PROM monitor shows only disks on the boot IOP (I/O processor).

Using fx

When the standalone version of fx is booted without the -x option, it prompts to see if you wish to use the expert mode, because it is often forgotten on the command line.

The command version of fx is invoked by name like any IRIX command.

Unless the -d option is used, fx will prompt for disk type, controller, target, and lun numbers. Recognized controller types are dksc for SCSI disk drives, and fd for floppy drives. Note that fd is not available in the standalone version.

fx next prompts for controller number, drive number (SCSI target ID), and lun (logical unit) number.

The controller type, controller number, drive number, and optional lun number can be given as command line parameters, bypassing the interactive questions just described (see also the -d option). The format is:

          fx "controllertype(controller_number, drive_number[, lun_number])"

For example:

          fx "dksc(0,1)"

This is equivalent to:

          fx "dksc(0,1,0)"

because the lun number defaults to 0 if it is not specified. The quotes are necessary in the first argument in the command version, because parentheses are shell special characters, and in the second because the drive name contains a space. For floppy disk drives, you are also prompted for the density to use.

Once controller type, controller number, drive number, and lun number have been selected, fx issues a diagnostic command to the drive. For SCSI drives, the drive information from the inquiry command is displayed, including the firmware revision; for other drive types, the previously assigned type from the volume header is displayed. A controller or drive self test is performed, followed by sanity checks on the partition layout. If any 'major' differences are found, you are asked if you want to use the existing values. It is almost always correct to keep the existing values, unless you are going to initialize the disk anyway.

If it appears that no valid volume header is present, fx asks if you want to use the defaults; you can answer no if you plan to set up custom parameters or partitions.

fx then enters its main menu. Menu items can be selected by typing the least unambiguous prefix (the portion included between [ and ]) or the full name. A menu item can be an action (for example, exit) or the name of a submenu (for example, badblock). Submenus have a trailing / to indicated that they are submenus.

Selecting a submenu name causes that submenu to be displayed, and items from it can be selected. To return to a parent menu from a submenu, enter two dots (..). The menus are organized as a hierarchy, so you can go up two levels by typing ../.., or use a command several levels down by separating each level by a /. By typing a command pathname, such as

          /label/show/partition

a command can be executed from any point in the menu hierarchy. Similarly, typing the full pathname of any menu moves you to that menu (this includes typing / for the top level).

To obtain help for the items on the current menu, enter a question mark (?) at the prompt. Many of the functions listed below have options to modify their actions; to obtain more information about them than the summary, enter ? item where item can be either the least unambiguous prefix, or the full name. Most of the (non-default) options are not listed in this document.

To exit from fx, select exit at the main menu; a shorthand for exiting from any level is /exit. Entering /.. from any menu allows you to select a different disk using normal controller/target/lun prompts, without having to exit and restart.

Internal Drive

Set the drive SCSI ID to 2 or another free address.  Remember that IRIX expects the system drive to be set to SCSI ID 1, does not recognize SCSI 0 as a valid SCSI drive address, no 2 devices on a particular SCSI controller can have the same SCSI address, and if you have a narrow SCSI device connected to the SCSI controller the maximum device address is 7.

External Drive

Mount the drive in an external enclosure and connect it to the external SCSI connector on the workstation you are using to initialize the drive.  Make sure that a terminator is attached to the last device on the daisy chain.

Set the drive SCSI ID to 2 or another free address.  Remember that IRIX expects the system drive to be set to SCSI ID 1, does not recognize SCSI 0 as a valid SCSI drive address, no 2 devices on a particular SCSI controller can have the same SCSI address, and if you have a narrow SCSI device connected to the SCSI controller the maximum device address is 7.

Starting fx to Initialize an Option Disk Drive

EFS (IRIX 5.X, IRIX 6.0, IRIX6.1, IRIX6.2, IRIX6.3)

You will need to use a system running IRIX 5.X or an IRIX 5.X installation CD in a CD-ROM to accomplish this task.

1.      Mount the drive to be initialized in a drive bay of the computer

2.      When

 
appears press the Esc button to get the System Maintenance Menu.

3.      Type 5 to enter the Command Monitor.

4.      Type hinv at the command prompt to verify that both the system drive and the drive you are initializing are seen by the computer.  You should also verify the controller and drive device numbers.

If you are using a system running IRIX 5.X you can use the stand alone shell that resides in the 0 partition of the system drive type

boot stand/fx --x

 If you are  booting from a CDROM type the following (based on the CDROM being on controller 0 with scsi id 4)

 boot -f dksc(0,4,8)sashARCS dksc(0,4,7)/stand/fx.ARCS --x

 At this point the stand alone shell will boot and load fx.  After fx loads it will query you for the type of device (dksc), controller (ctrl) and device number.  If the displayed default is correct simply press Enter to accept the default.  If the displayed default value is incorrect type the correct value and then press Enter.

Note: In order to partition a 9GB or larger drive for use with IRIX 5.3 or earlier, you need to configure the drive into smaller partitions where each partition is less than 8GB due to operating system limitations.

Once the main menu issue the following commands.

/r/o

 This will execute the repartition/option drive command.

 You will next be asked whether you want to create an EFS or XFS file system, select EFS.

 Next you will be asked if you want to create a log partition.  Answer yes.

 You will then be asked to confirm that you want to create the partition.  Type �yes� to have the partition created.

Note:  If you are creating multiple partitions on a hard disk larger than 8Gbytes for use with IRIX 5.3 or earlier, you will need to modify the above instructions as follows:

(r)epartition [enter]

(e)xpert [enter]

continue? yes [enter]

change partition = (0) 6 [enter]

part type = (volhdr) efs [enter]

base cyl = (0) 3 [enter]

# of cyls (max XXXX) = (0) XXX ** here type in l/2 of the number in the parentheses where is says max** [enter]

change partition = (7) 7 [enter]

part type = (volhdr) efs [enter]

base cyl = (0) XXX [enter] ** number here is base cyls from 5 plus max # of cyls from 5 plus one** [enter]

# of cyls (max XXXX) = (0) XXX ** number here is the actual number in the parenthesis [enter]

change partition = (8) . .

// [enter]

 Once the partition has been created you need to write the information about the partition out to the label record of the disk.  To accomplish this type the following command:

/l/sy

This will execute the label/synchronize command, which writes the in-core copy of the disk label back to disk, as well as changing the parameters in the disk driver.

You now need to exit fx which you accomplish by typing

/exit

Once the Maintenance Menu reappears, power down the computer and remove the drive you have just initialized.

XFS (IRIX 6.X)

You will need to use a system running IRIX 6.X or an IRIX 6.X installation CD in a CD-ROM to accomplish this task.

5.      Mount the drive to be initialize
6.      When  
appears press the Esc button to get the System Maintenance Menu.

7.      Type 5 to enter the Command Monitor.

8.      Type hinv at the command prompt to verify that both the system drive and the drive you are initializing are seen by the computer.  You should also verify the controller and drive device numbers.

If you are using a system running IRIX 5.X you can use the stand alone shell that resides in the 0 partition of the system drive type

boot stand/fx --x

If you are  booting from a CDROM type the following (based on the CDROM being on controller 0 with scsi id 4)

 boot -f dksc(0,4,8)sashARCS dksc(0,4,7)/stand/fx.ARCS --x

 At this point the stand alone shell will boot and load fx.  After fx loads it will query you for the type of device (dksc), controller (ctrl) and device number.  If the displayed default is correct simply press Enter to accept the default.  If the displayed default value is incorrect type the correct value and then press Enter.

 Once the main menu issue the following commands.

 /r/o

 This will execute the repartition/option drive command.

 You will next be asked whether you want to create an EFS or XFS file system, select XFS.

 Next you will be asked if you want to create a log partition.  Answer yes.

 You will then be asked to confirm that you want to create the partition.  Type �yes� to have the partition created.

 Once the partition has been created you need to write the information about the partition out to the label record of the disk.  To accomplish this type the following command:

/l/sy

 This will execute the label/synchronize command, which writes the in-core copy of the disk label back to disk, as well as changing the parameters in the disk driver.

 You now need to exit fx which you accomplish by typing

 /exit

 Once the Maintenance Menu reappears, power down the computer and remove the drive you have just initialized.

 Starting fx to Initialize a System Disk Drive

 EFS (IRIX 5.X, IRIX 6.0, IRIX6.1, IRIX6.2, IRIX6.3)

You will need to use a system running IRIX 5.X or an IRIX 5.X installation CD in a CD-ROM to accomplish this task.

1        Mount the drive to be initialized in a drive bay of the computer

2        When  appears press the Esc button to get the System Maintenance Menu.

3        Type 5 to enter the Command Monitor.

4        Type hinv at the command prompt to verify that both the system drive and the drive you are initializing are seen by the computer.  You should also verify the controller and drive device numbers.

If you are using a system running IRIX 5.X you can use the stand alone shell that resides in the 0 partition of the system drive type

boot stand/fx --x

If you are  booting from a CDROM type the following (based on the CDROM being on controller 0 with scsi id 4)

 boot -f dksc(0,4,8)sashARCS dksc(0,4,7)/stand/fx.ARCS --x

 At this point the stand alone shell will boot and load fx.  After fx loads it will query you for the type of device (dksc), controller (ctrl) and device number.  If the displayed default is correct simply press Enter to accept the default.  If the displayed default value is incorrect type the correct value and then press Enter.

 Once the main menu issue the following commands.

 /r/ro

 This will execute the repartition/root drive command.

 You will next be asked whether you want to create an EFS or XFS file system, select EFS.

 You will then be asked to confirm that you want to create the partition.  Type �yes� to have the partition created.

 Now you need to set the swap space on the drive.  To accomplish this type the command

 /r/re

 You will see a prompt asking which partition to resize with a default of swap.  Press the Enter key to accept the default.  If the default is not swap change it to swap.

 Next you will be asked for the size of the desired swap partition.  Type m followed by the Enter key to signify your entry will be in Mbytes.  Then enter the desired size for the swap partition followed by the Enter key.

 You will be asked if you want to create the partition, type yes followed by the Enter key.

Once the partition has been created you need to write the information about the partition out to the label record of the disk.  To accomplish this type the following command:

/l/sy

This will execute the label/synchronize command, which writes the in-core copy of the disk label back to disk, as well as changing the parameters in the disk driver.

You now need to exit fx which you accomplish by typing

 /exit

 Once the Maintenance Menu reappears, power down the computer and remove the drive you have just initialized.

XFS (IRIX 6.X)

You will need to use a system running IRIX 6.X or an IRIX 6.X installation CD in a CD-ROM to accomplish this task.

1        Mount the drive to be initialized in a drive bay of the computer

2        When

 appears press the Esc button to get the System Maintenance Menu.

3        Type 5 to enter the Command Monitor.

4        Type hinv at the command prompt to verify that both the system drive and the drive you are initializing are seen by the computer.  You should also verify the controller and drive device numbers.

 If you are using a system running IRIX 5.X you can use the stand alone shell that resides in the 0 partition of the system drive type

boot stand/fx --x

 If you are  booting from a CDROM type the following (based on the CDROM being on controller 0 with scsi id 4)

 boot -f dksc(0,4,8)sashARCS dksc(0,4,7)/stand/fx.ARCS --x

 At this point the stand alone shell will boot and load fx.  After fx loads it will query you for the type of device (dksc), controller (ctrl) and device number.  If the displayed default is correct simply press Enter to accept the default.  If the displayed default value is incorrect type the correct value and then press Enter.

 Once the main menu issue the following commands.

 /r/ro

 This will execute the repartition/root drive command.

 You will next be asked whether you want to create an EFS or XFS file system, select EFS.

 You will then be asked to confirm that you want to create the partition.  Type �yes� to have the partition created.

Now you need to set the swap space on the drive.  To accomplish this type the command

 /r/re

You will see a prompt asking which partition to resize with a default of swap.  Press the Enter key to accept the default.  If the default is not swap change it to swap.

Next you will be asked for the size of the desired swap partition.  Type m followed by the Enter key to signify your entry will be in Mbytes.  Then enter the desired size for the swap partition followed by the Enter key.

You will be asked if you want to create the partition, type yes followed by the Enter key.

This will execute the repartition/option drive command.

You will next be asked whether you want to create an EFS or XFS file system, select XFS.

Next you will be asked if you want to create a log partition.  Answer yes.

You will then be asked to confirm that you want to create the partition.  Type �yes� to have the partition created.

Once the partition has been created you need to write the information about the partition out to the label record of the disk.  To accomplish this type the following command:

 /l/sy

This will execute the label/synchronize command, which writes the in-core copy of the disk label back to disk, as well as changing the parameters in the disk driver.

 You now need to exit fx which you accomplish by typing

/exit

Once the Maintenance Menu reappears, power down the computer and remove the drive you have just initialized.

 

Comments