1> 使用命令 devfsadm命令识别出新增硬盘
bash-3.00# format
Searching for disks...done

AVAILABLE DISK SELECTIONS:
       0. c0d0 <DEFAULT cyl 4092 alt 2 hd 128 sec 32>
          /pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0
Specify disk (enter its number): ^C
bash-3.00# devfsadm

2> 格式化新增硬盘
bash-3.00# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
       0. c0d0 <DEFAULT cyl 4092 alt 2 hd 128 sec 32>
          /pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0
       1. c2t0d0 <DEFAULT cyl 1303 alt 2 hd 255 sec 63>
          /pci@0,0/pci15ad,1976@10/sd@0,0
Specify disk (enter its number): 1                     //选择新增加的硬盘 c2t0d0
selecting c2t0d0
[disk formatted]
FORMAT MENU:
        disk       - select a disk
        type       - select (define) a disk type
        partition  - select (define) a partition table
        current    - describe the current disk
        format     - format and analyze the disk
        fdisk      - run the fdisk program
        repair     - repair a defective sector
        label      - write label to the disk
        analyze    - surface analysis
        defect     - defect list management
        backup     - search for backup labels
        verify     - read and display labels
        save       - save new disk/partition definitions
        inquiry    - show vendor, product and revision
        volname    - set 8-character volume name
        !<cmd>     - execute <cmd>, then return
        quit
format> fdisk                              //建立分区表
No fdisk table exists. The default partition for the disk is:
 a 100% "SOLARIS System" partition
Type "y" to accept the default partition,  otherwise type "n" to edit the
 partition table.
y
format> label
Ready to label disk, continue? y

format> p                        // p进入分区状态
PARTITION MENU:
        0      - change `0' partition
        1      - change `1' partition
        2      - change `2' partition
        3      - change `3' partition
        4      - change `4' partition
        5      - change `5' partition
        6      - change `6' partition
        7      - change `7' partition
        select - select a predefined table
        modify - modify a predefined partition table
        name   - name the current table
        print  - display the current table
        label  - write partition map and label to the disk
        !<cmd> - execute <cmd>, then return
        quit
partition> print                 //显示当前分区表
Current partition table (original):
Total disk cylinders available: 1302 + 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 - 1302        9.98GB    (1303/0/0) 20932695
  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        7.84MB    (1/0/0)       16065
  9 unassigned    wm       0               0         (0/0/0)           0
partition> modify                          //进入修改分区表信息
Select partitioning base:
        0. Current partition table (unnamed)
        1. All Free Hog
Choose base (enter number) [0]? 1               //选择未使用的分区
Part      Tag    Flag     Cylinders        Size            Blocks
  0       root    wm       0               0         (0/0/0)           0
  1       swap    wu       0               0         (0/0/0)           0
  2     backup    wu       0 - 1301        9.97GB    (1302/0/0) 20916630
  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        usr    wm       0               0         (0/0/0)           0
  7 unassigned    wm       0               0         (0/0/0)           0
  8       boot    wu       0 -    0        7.84MB    (1/0/0)       16065
  9 alternates    wm       0               0         (0/0/0)           0

Do you wish to continue creating a new partition
table based on above table[yes]? yes
Free Hog partition[6]?
Enter size of partition '0' [0b, 0c, 0.00mb, 0.00gb]: 6gb           //将分区0设置为6G
Enter size of partition '1' [0b, 0c, 0.00mb, 0.00gb]:
Enter size of partition '3' [0b, 0c, 0.00mb, 0.00gb]:
Enter size of partition '4' [0b, 0c, 0.00mb, 0.00gb]:
Enter size of partition '5' [0b, 0c, 0.00mb, 0.00gb]:
Enter size of partition '7' [0b, 0c, 0.00mb, 0.00gb]:

Part      Tag    Flag     Cylinders        Size            Blocks
  0       root    wm       1 -  784        6.01GB    (784/0/0)  12594960
  1       swap    wu       0               0         (0/0/0)           0
  2     backup    wu       0 - 1301        9.97GB    (1302/0/0) 20916630
  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        usr    wm     785 - 1301        3.96GB    (517/0/0)   8305605   //剩余空间默认分配此分区
  7 unassigned    wm       0               0         (0/0/0)           0
  8       boot    wu       0 -    0        7.84MB    (1/0/0)       16065
  9 alternates    wm       0               0         (0/0/0)           0

Okay to make this the current partition table[yes]? yes
Enter table name (remember quotes): oracle
Ready to label disk, continue? y
partition> p                           //打印分区信息
Current partition table (oracle):
Total disk cylinders available: 1302 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders        Size            Blocks
  0 unassigned    wm       1 -  784        6.01GB    (784/0/0)  12594960
  1 unassigned    wm       0               0         (0/0/0)           0
  2     backup    wu       0 - 1301        9.97GB    (1302/0/0) 20916630
  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     785 - 1301        3.96GB    (517/0/0)   8305605
  7 unassigned    wm       0               0         (0/0/0)           0
  8       boot    wu       0 -    0        7.84MB    (1/0/0)       16065
  9 unassigned    wm       0               0         (0/0/0)           0

partition>
partition> q                   //退出分区
FORMAT MENU:
        disk       - select a disk
        type       - select (define) a disk type
        partition  - select (define) a partition table
        current    - describe the current disk
        format     - format and analyze the disk
        fdisk      - run the fdisk program
        repair     - repair a defective sector
        label      - write label to the disk
        analyze    - surface analysis
        defect     - defect list management
        backup     - search for backup labels
        verify     - read and display labels
        save       - save new disk/partition definitions
        inquiry    - show vendor, product and revision
        volname    - set 8-character volume name
        !<cmd>     - execute <cmd>, then return
        quit
format> q                      //退出

3> 建立新的文件系统
bash-3.00#
bash-3.00# newfs /dev/rdsk/c2t0d0s0             
newfs: 建构新的文件系统 /dev/rdsk/c2t0d0s0: (y/n)? y
警告:最后一个未分配柱面中的 240 扇区
/dev/rdsk/c2t0d0s0:     在 2050 磁道上,48 扇区的 128 柱面的 12594960 扇区
        6149.9MB 在 129 柱面群组 (16 c/g, 48.00MB/g, 5824 i/g)
超块 (fsck -F ufs -o b=#) 备份在:
 32, 98464, 196896, 295328, 393760, 492192, 590624, 689056, 787488, 885920,
 11705248, 11803680, 11902112, 12000544, 12098976, 12197408, 12295840,
 12394272, 12492704, 12582944
bash-3.00# newfs /dev/rdsk/c2t0d0s6
newfs: 建构新的文件系统 /dev/rdsk/c2t0d0s6: (y/n)? y
警告:最后一个未分配柱面中的 1084 扇区
/dev/rdsk/c2t0d0s6:     在 1352 磁道上,48 扇区的 128 柱面的 8305604 扇区
        4055.5MB 在 85 柱面群组 (16 c/g, 48.00MB/g, 5824 i/g)
超块 (fsck -F ufs -o b=#) 备份在:
 32, 98464, 196896, 295328, 393760, 492192, 590624, 689056, 787488, 885920,
 7374240, 7472672, 7571104, 7669536, 7767968, 7866400, 7964832, 8063264,
 8161696, 8260128

4> 建立挂载点
bash-3.00# mkdir /u01 /u02
bash-3.00# mount /dev/rdsk/c2t0d0s6 /u02
mount: /dev/rdsk/c2t0d0s6 不是块设备
bash-3.00# mount /dev/dsk/c2t0d0s6 /u02
bash-3.00# mount /dev/dsk/c2t0d0s0 /u01
bash-3.00# df -h
文件系统               大小   用了   可用 容量      挂接在
/dev/dsk/c0d0s0        5.5G   3.2G   2.2G    59%    /
/devices                 0K     0K     0K     0%    /devices
ctfs                     0K     0K     0K     0%    /system/contract
proc                     0K     0K     0K     0%    /proc
mnttab                   0K     0K     0K     0%    /etc/mnttab
swap                   1.6G   636K   1.6G     1%    /etc/svc/volatile
objfs                    0K     0K     0K     0%    /system/object
/usr/lib/libc/libc_hwcap1.so.1
                       5.5G   3.2G   2.2G    59%    /lib/libc.so.1
fd                       0K     0K     0K     0%    /dev/fd
swap                   1.6G    48K   1.6G     1%    /tmp
swap                   1.6G    32K   1.6G     1%    /var/run
/dev/dsk/c0d0s7        940M   1.0M   883M     1%    /export/home
/dev/dsk/c2t0d0s6      3.9G   4.0M   3.9G     1%    /u02
/dev/dsk/c2t0d0s0      5.9G   6.0M   5.8G     1%    /u01


5> 将磁盘加入系统自启动加载文件。
vi /etc/vfstab
/dev/dsk/c2t0d0s6 /dev/rdsk/c2t0d0s6 /u02 ufs 2 yes -
/dev/dsk/c2t0d0s0 /dev/rdsk/c2t0d0s0 /u01 ufs 2 yes -

bash-3.00# cat /etc/vfstab
#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      -
/dev/dsk/c0d0s7 /dev/rdsk/c0d0s7        /export/home    ufs     2       yes     -
/devices        -       /devices        devfs   -       no      -
ctfs    -       /system/contract        ctfs    -       no      -
objfs   -       /system/object  objfs   -       no      -
swap    -       /tmp    tmpfs   -       yes     -
/dev/dsk/c2t0d0s6       /dev/rdsk/c2t0d0s6      /u02    ufs     2       yes     -
/dev/dsk/c2t0d0s0       /dev/rdsk/c2t0d0s0      /u01    ufs     2       yes     -

bash-3.00#reboot