Solaris 10 Commad Line Guide – Adding New Disk

ADDING NEW DISK:
-first show all attached targets

# cfgadm -al

root@solaris10 # cfgadm -al
Ap_Id                          Type         Receptacle   Occupant     Condition
c0                             scsi-bus     connected    configured   unknown
c0::dsk/c0t0d0                 CD-ROM       connected    configured   unknown
c1                             scsi-bus     connected    configured   unknown
c1::dsk/c1t0d0                 disk         connected    configured   unknown
c1::sg/c0t0l0                  unknown      connected    configured   unknown
c1::sg/c0t1l0                  unknown      connected    configured   unknown
c2                             scsi-bus     connected    configured   unknown
c2::rmt/0                      tape         connected    configured   unknown
c2::sg/c0t5l0                  unknown      connected    configured   unknown
c3                             fc           connected    unconfigured unknown
c4                             fc           connected    unconfigured unknown
usb0/1                         unknown      empty        unconfigured ok
usb0/2                         unknown      empty        unconfigured ok
usb0/3                         unknown      empty        unconfigured ok
usb1/1.1                       unknown      empty        unconfigured ok
usb1/1.2                       unknown      empty        unconfigured ok
usb1/1.3                       unknown      empty        unconfigured ok

Existing disk is c1t0d0, now attach new disk, then check with “cfgadm -al” command:

root@solaris10 # cfgadm -al
Ap_Id                          Type         Receptacle   Occupant     Condition
c0                             scsi-bus     connected    configured   unknown
c0::dsk/c0t0d0                 CD-ROM       connected    configured   unknown
c1                             scsi-bus     connected    configured   unknown
c1::dsk/c1t0d0                 disk         connected    configured   unknown
c1::dsk/c1t1d0                 disk         connected    unconfigured   unknown
c1::sg/c0t0l0                  unknown      connected    configured   unknown
c1::sg/c0t1l0                  unknown      connected    configured   unknown
c2                             scsi-bus     connected    configured   unknown
c2::rmt/0                      tape         connected    configured   unknown
c2::sg/c0t5l0                  unknown      connected    configured   unknown
c3                             fc           connected    unconfigured unknown
c4                             fc           connected    unconfigured unknown
usb0/1                         unknown      empty        unconfigured ok
usb0/2                         unknown      empty        unconfigured ok
usb0/3                         unknown      empty        unconfigured ok

My new disk is C1t1d0 and the status is “unconfigured”.

Now, run “cfgadm -c configure”

# cfgadm -c configure c1::dsk/c1t1d0

{run cfgadm -al to check the status again:

# cfgadm -al

{run “format”, then you will see the new disk..
Howto add an SATA disk to Solaris 10
# devfsadm -vC
# format

bash-3.00# format
Searching for disks...done

AVAILABLE DISK SELECTIONS:
 0. c0d0 <DEFAULT cyl 1981 alt 2 hd 255 sec 63>
 /pci@0,0/pci-ide@1,1/ide@0/cmdk@0,0
 1. c0d1 <DEFAULT cyl 1020 alt 2 hd 128 sec 32>
 /pci@0,0/pci-ide@1,1/ide@0/cmdk@1,0
Specify disk (enter its number): 1

format> fdisk
format> label
format> verify
format> par
partition> p

Current partition table (original):
Total disk cylinders available: 1020 + 2 (reserved cylinders)

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    wu       0 - 1019        1.99GB    (1020/0/0) 4177920
 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
 8       boot    wu       0 -    0        2.00MB    (1/0/0)       4096
 9 alternates    wm       1 -    2        4.00MB    (2/0/0)       8192

partition> 0
Part      Tag    Flag     Cylinders        Size            Blocks
0 unassigned    wm       0               0         (0/0/0)          0

Enter partition id tag[unassigned]:
Enter partition permission flags[wm]:
Enter new starting cyl[0]:
Enter partition size[0b, 0c, 0e, 0.00mb, 0.00gb]: 1gb

format> save
Saving new disk and partition definitions
Enter file name[“./format.dat”]:
format> q

{enter the mount points in /etc/vfstab:

bash-3.00# vi /etc/vfstab
"/etc/vfstab" 14 lines, 570 characters
#device         device          mount           FS      fsck    mount   mount
#to mount       to fsck         point           type    pass    at boot options
#
fd      -       /dev/fd fd      -       no      -
/proc   -       /proc   proc    -       no      -
/dev/dsk/c0d0s1 -       -       swap    -       no      -
/dev/dsk/c0d0s0 /dev/rdsk/c0d0s0        /       ufs     1       no      -
/devices        -       /devices        devfs   -       no      -
sharefs -       /etc/dfs/sharetab       sharefs -       no      -
ctfs    -       /system/contract        ctfs    -       no      -
objfs   -       /system/object  objfs   -       no      -
swap    -       /tmp    tmpfs   -       yes     -
/export/install/media/sol_10_509_x86/boot - /tftpboot/I86PC.Solaris_10-1 lofs - yes ro
/dev/dsk/c0d1s0 /dev/rdsk/c0d1s0        /export/backup    ufs     1       no      -

~

{newfs the new partitions:
#newfs /dev/rdsk/c0d1s0

{mount the new partitions:
#mount /dev/dsk/c0d1s0 /export/backup
# df -h /export/backup

Advertisement

5 responses to “Solaris 10 Commad Line Guide – Adding New Disk

  1. I need to add new disk in solaris 10, I am in remote location, How can I identify the new disk and create filesystem. please help.

  2. Pingback: Solaris Articles « Center Point for Oracle DBA & Kuwait Info

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.