Return to Solaris Home Page.


Adding Second IDE Hard Drive into a Blade 100/150

by Jeff Hunter, Sr. Database Administrator

There are seven steps, all relatively easy.

  1. Install the physical hard drive. Basic instructions are in the Sun Blade 100/150 Service Manual, available from the Sun website:

  2. Reboot the machine and get to the ok prompt. In most cases, you can just init 0.
    (Ignore error messages about a bad label on the disk, if any)

  3. At the ok prompt, probe the new IDE device using probe-ide then reboot the system using the rescan option "-r" as show in the following example:
    ok probe-ide
    This command may hang the system if a Stop-A or halt command
    has been executed.  Please type reset-all to reset the system
    before executing this command.
    Do you wish to continue? (y/n) y
      Device 0  ( Primary Master )
              ATA Model: WDC WD400BB-22DEA0
    
      Device 1  ( Primary Slave )
             Removable ATAPI Model: LTN486S
    
      Device 2  ( Secondary Master )
              ATA Model: WDC WD400BB-22DEA0
    
      Device 3  ( Secondary Slave )
             Not Present
    
    ok boot -r

  4. Next is to partition the disk. Under Solaris, the command to partition disks is: format. This is an interactive tool similar to FDISK under MS-DOS. In most cases, you will be allocating all available space to one partition. If this is the case, simply allocate all cylinders to a partition on slice 7 of the disk. You will also see that slice 2 is already labeled "backup". You can just leave this as is. When the partition table is ready, then write the table to disk and label the disk. Labeling the disk can also be done within the interactive format session.

  5. Put a UFS filesystem on the disk using the newfs command. The device name should be /dev/rdsk/c0t2d0s7 if you partitioned as above.
      # newfs /dev/rdsk/c0t2d0s7

  6. Create a mount point that will be used to mount the new disk somewhere in you current filesystem. For example, if you wanted to mount the new disk on /db2:
      # mkdir /db2

  7. Edit /etc/vfstab and add a line for the new filesystem. It should look like this (all one line with tabs separating the fields):
    #device         device          mount           FS      fsck    mount   mount
    #to mount       to fsck         point           type    pass    at boot options
    #
    #/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr          ufs     1       yes     -
    fd      -       /dev/fd fd      -       no      -
    /proc   -       /proc   proc    -       no      -
    /dev/dsk/c0t0d0s3       -       -       swap    -       no      -
    /dev/dsk/c0t0d0s0       /dev/rdsk/c0t0d0s0      /       ufs     1       no      -
    /dev/md/dsk/d0  /dev/md/rdsk/d0 /db0    ufs     2       yes     -
    /dev/md/dsk/d1  /dev/md/rdsk/d1 /db1    ufs     2       yes     -
    /dev/dsk/c0t2d0s7       /dev/rdsk/c0t2d0s7      /db2  ufs     2       yes     -
    swap    -       /tmp    tmpfs   -       yes     -
    This will mount the filesystem to /db2 at boot time.

That's it! It doesn't take long. The hardest part is getting the drive installed into the chassis without damaging all the various cables.


To check your disk configuration use the format command. In the example below, I include settings on a Sun Blade 150 configured with two 40GB IDE disks. First login as the root userid and perform the following. Notice that by convention, slice 2 is always used as a backup partition and is always the size of the entire disk.

# format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
       0. c0t0d0 <WDC WD400BB-22DEA0 cyl 19156 alt 2 hd 16 sec 255>
          /pci@1f,0/ide@d/dad@0,0
       1. c0t2d0 <WDC WD400BB-22DEA0 cyl 19156 alt 2 hd 16 sec 255>
          /pci@1f,0/ide@d/dad@2,0
Specify disk (enter its number): 0

selecting c0t0d0
[disk formatted, no defect list found]
Warning: Current Disk has mounted partitions.

format> verify

Primary label contents:

Volume name = <        >
ascii name  = <WDC WD400BB-22DEA0 cyl 19156 alt 2 hd 16 sec 255>
pcyl        = 19158
ncyl        = 19156
acyl        =    2
nhead       =   16
nsect       =  255
Part      Tag    Flag     Cylinders       Size            Blocks
  0       root    wm       0 - 18640     36.27GB    (18641/0/0) 76055280
  1       swap    wu   18641 - 19155      1.00GB    (515/0/0)    2101200
  2     backup    wm       0 - 19155     37.27GB    (19156/0/0) 78156480
  3 unassigned    wm       0              0         (0/0/0)            0
  4 unassigned    wm       0              0         (0/0/0)            0
  5 unassigned    wm       0              0         (0/0/0)            0
  6 unassigned    wm       0              0         (0/0/0)            0
  7 unassigned    wm       0              0         (0/0/0)            0


format> disk

AVAILABLE DISK SELECTIONS:
       0. c0t0d0 <WDC WD400BB-22DEA0 cyl 19156 alt 2 hd 16 sec 255>
          /pci@1f,0/ide@d/dad@0,0
       1. c0t2d0 <WDC WD400BB-22DEA0 cyl 19156 alt 2 hd 16 sec 255>
          /pci@1f,0/ide@d/dad@2,0
Specify disk (enter its number)[0]: 1
selecting c0t2d0
[disk formatted, no defect list found]
Warning: Current Disk has mounted partitions.

format> verify

Primary label contents:

Volume name = <        >
ascii name  = <WDC WD400BB-22DEA0 cyl 19156 alt 2 hd 16 sec 255>
pcyl        = 19158
ncyl        = 19156
acyl        =    2
nhead       =   16
nsect       =  255
Part      Tag    Flag     Cylinders       Size            Blocks
  0 unassigned    wm       0              0         (0/0/0)            0
  1 unassigned    wm       0              0         (0/0/0)            0
  2     backup    wm       0 - 19155     37.27GB    (19156/0/0) 78156480
  3 unassigned    wm       0              0         (0/0/0)            0
  4 unassigned    wm       0              0         (0/0/0)            0
  5 unassigned    wm       0              0         (0/0/0)            0
  6 unassigned    wm       0              0         (0/0/0)            0
  7 unassigned    wm       0 - 19155     37.27GB    (19156/0/0) 78156480



Last modified on: Saturday, 18-Sep-2010 18:23:19 EDT
Page Count: 32176