How to add one new disk to solaris(Original)

How to add one new disk to solaris?

1.add one disk, format,type,lable
root@t34 # format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
       0. c0t5000C500332C303Fd0
          /scsi_vhci/disk@g5000c500332c303f
       1. c0t5000C500332CBF1Bd0
          /scsi_vhci/disk@g5000c500332cbf1b
       2. c0t5000C5003329507Bd0
          /scsi_vhci/disk@g5000c5003329507b
       3. c0t5000C50033294337d0
          /scsi_vhci/disk@g5000c50033294337
Specify disk (enter its number): ^C
root@t34 # df -k
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/dsk/c0t5000C50033294337d0s0
                     16490024 5881604 10443520    37%    /
/devices                   0       0       0     0%    /devices
ctfs                       0       0       0     0%    /system/contract
proc                       0       0       0     0%    /proc
mnttab                     0       0       0     0%    /etc/mnttab
swap                 129189048    1704 129187344     1%    /etc/svc/volatile
objfs                      0       0       0     0%    /system/object
sharefs                    0       0       0     0%    /etc/dfs/sharetab
/platform/sun4v/lib/libc_psr/libc_psr_hwcap2.so.1
                     16490024 5881604 10443520    37%    /platform/sun4v/lib/libc_psr.so.1
/platform/sun4v/lib/sparcv9/libc_psr/libc_psr_hwcap2.so.1
                     16490024 5881604 10443520    37%    /platform/sun4v/lib/sparcv9/libc_psr.so.1
fd                         0       0       0     0%    /dev/fd
swap                 129187392      48 129187344     1%    /tmp
swap                 129187400      56 129187344     1%    /var/run
/dev/dsk/c0t5000C50033294337d0s7
                     255541075 1106714 251878951     1%    /export/home
                     
 ===================================================================================
/dev/dsk/c0t5000C50033294337d0s7 Means disk3 is using now, So it cannot be added.
 ===================================================================================  
 
 root@t34 # format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
       0. c0t5000C500332C303Fd0
          /scsi_vhci/disk@g5000c500332c303f
       1. c0t5000C500332CBF1Bd0
          /scsi_vhci/disk@g5000c500332cbf1b
       2. c0t5000C5003329507Bd0
          /scsi_vhci/disk@g5000c5003329507b
       3. c0t5000C50033294337d0
          /scsi_vhci/disk@g5000c50033294337
Specify disk (enter its number): 2

===================================================================================
I want to add one new disk (disk 2)
===================================================================================

selecting c0t5000C5003329507Bd0
[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
        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
        !     - execute , then return
        quit
format> type 0


AVAILABLE DRIVE TYPES:
        0. Auto configure
        1. Quantum ProDrive 80S
        2. Quantum ProDrive 105S
        3. CDC Wren IV 94171-344
        4. SUN0104
        5. SUN0207
        6. SUN0327
        7. SUN0340
        8. SUN0424
        9. SUN0535
        10. SUN0669
        11. SUN1.0G
        12. SUN1.05
        13. SUN1.3G
        14. SUN2.1G
        15. SUN2.9G
        16. Zip 100
        17. Zip 250
        18. Peerless 10GB
        19. SUN300G
        20. other
Specify disk type (enter its number)[19]: 0
c0t5000C5003329507Bd0: configured with capacity of 279.38GB

selecting c0t5000C5003329507Bd0
[disk formatted]
format> 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
        ! - execute , then return
        quit
partition> p
Current partition table (original):
Total disk cylinders available: 46873 + 2 (reserved cylinders)

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 - 46872      279.38GB    (46873/0/0) 585912500
  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 - 46872      279.38GB    (46873/0/0) 585912500
  7 unassigned    wm       0                0         (0/0/0)             0

partition> l
Ready to label disk, continue? y

===========================================================================
l means save current partition table
part 2 is whole disk(46872 cylinders), so It cannot be partition.
Now,part 6 from 0 to 46872 Cylinders is taged usr.
I want use part 7,and each 10 cylinders are preseved at the top and bottom
===========================================================================


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

Enter partition id tag[unassigned]: home
Enter partition permission flags[wm]:
Enter new starting cyl[0]: 10   # Means start from 10th cylinder

Enter partition size[0b, 0c, 10e, 0.00mb, 0.00gb]: 46853c
partition> p
Current partition table (unnamed):
Total disk cylinders available: 46873 + 2 (reserved cylinders)

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 - 46872      279.38GB    (46873/0/0) 585912500
  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 - 46872      279.38GB    (46873/0/0) 585912500
  7       home    wm      10 - 46862      279.27GB    (46835/0/0) 585437500

==========================================================================
Now,Part 6 and part 7 are overlap.
So Delete part 6
==========================================================================

partition> 6
Part      Tag    Flag     Cylinders         Size            Blocks
  6        usr    wm       0 - 46872      279.38GB    (46873/0/0) 585912500

Enter partition id tag[usr]:
Enter partition permission flags[wm]:
Enter new starting cyl[0]:      # strat cylinder 0
Enter partition size[585912500b, 46873c, 46872e, 286090.09mb, 279.38gb]: 0  # end cylinder 0
===========================================================================
Start cylinder 0 and end cylinder 0 means delete the part 6
===========================================================================
partition> p
Current partition table (unnamed):
Total disk cylinders available: 46873 + 2 (reserved cylinders)

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 - 46872      279.38GB    (46873/0/0) 585912500
  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       home    wm      10 - 46862      279.27GB    (46835/0/0) 585437500


partition> l
Ready to label disk, continue? y

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
        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
        !     - execute , then return
        quit
format> q

===============================================================
checking....
===============================================================
root@t34 # format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
       0. c0t5000C500332C303Fd0
          /scsi_vhci/disk@g5000c500332c303f
       1. c0t5000C500332CBF1Bd0
          /scsi_vhci/disk@g5000c500332cbf1b
       2. c0t5000C5003329507Bd0
          /scsi_vhci/disk@g5000c5003329507b
       3. c0t5000C50033294337d0
          /scsi_vhci/disk@g5000c50033294337
Specify disk (enter its number): 2
selecting c0t5000C5003329507Bd0
[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
        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
        !     - execute , then return
        quit
format> 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
        ! - execute , then return
        quit
partition> p
Current partition table (original):
Total disk cylinders available: 46873 + 2 (reserved cylinders)

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 - 46872      279.38GB    (46873/0/0) 585912500
  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       home    wm      10 - 46862      279.27GB    (46853/0/0) 585662500

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
        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
        !     - execute , then return
        quit
format> q

============================================================================
end checking
============================================================================

2. newfs one file system

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
        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
        !     - execute , then return
        quit
format> disk


AVAILABLE DISK SELECTIONS:
       0. c0t5000C500332C303Fd0
          /scsi_vhci/disk@g5000c500332c303f
       1. c0t5000C500332CBF1Bd0
          /scsi_vhci/disk@g5000c500332cbf1b
       2. c0t5000C5003329507Bd0
          /scsi_vhci/disk@g5000c5003329507b
       3. c0t5000C50033294337d0
          /scsi_vhci/disk@g5000c50033294337
Specify disk (enter its number)[2]: ^C
format> q

root@t34 # newfs /dev/rdsk/c0t5000C5003329507Bd0s7

=============================================================================
you can copy c0t5000C5003329507Bd0s7 from AVAILABLE DISK SELECTIONS
=============================================================================

newfs: construct a new file system /dev/rdsk/c0t5000C5003329507Bd0s7: (y/n)? y
Warning: 2012 sector(s) in last cylinder unallocated
/dev/rdsk/c0t5000C5003329507Bd0s7:      585662500 sectors in 95323 cylinders of 48 tracks, 128 sectors
        285968.0MB in 5958 cyl groups (16 c/g, 48.00MB/g, 5824 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 98464, 196896, 295328, 393760, 492192, 590624, 689056, 787488, 885920,
Initializing cylinder groups:
...............................................................................
.......................................
super-block backups for last 10 cylinder groups at:
 584719904, 584818336, 584916768, 585015200, 585105440, 585203872, 585302304,
 585400736, 585499168, 585597600
root@t34 #

3.mount /u01 automatically

root@t34 # mkdir /u01
root@t34 # vi /etc/vfstab
"/etc/vfstab" 14 lines, 656 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/c0t5000C50033294337d0s1        -       -       swap    -       no      -
/dev/dsk/c0t5000C50033294337d0s0        /dev/rdsk/c0t5000C50033294337d0s0       /       ufs     1       no      -
/dev/dsk/c0t5000C50033294337d0s7        /dev/rdsk/c0t5000C50033294337d0s7       /export/home    ufs     2       yes     -
/devices        -       /devices        devfs   -       no      -
sharefs -       /etc/dfs/sharetab       sharefs -       no      -
ctfs    -       /system/contract        ctfs    -       no      -
objfs   -       /system/object  objfs   -       no      -
swap    -       /tmp    tmpfs   -       yes     -
/dev/dsk/c0t5000C5003329507Bd0s7        /dev/rdsk/c0t5000C5003329507Bd0s7       /u01    ufs     2       yes     -

=======================================================================================================================================
add the last line in the file of /etc/vfstab.
you can copy
/dev/dsk/c0t5000C50033294337d0s7        /dev/rdsk/c0t5000C50033294337d0s7       /export/home    ufs     2       yes     -
then paste it to the last line
replace c0t5000C50033294337d0s7 with c0t5000C5003329507Bd0s7
=======================================================================================================================================

root@t34 # cd /
root@t34 # mount /dev/dsk/c0t5000C5003329507Bd0s7 /u01
root@t34 # cd /u01
root@t34 # ls -l
total 16
drwx------   2 root     root        8192 Sep 15 15:01 lost+found
root@t34 #

                 
        
          
                 
                

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/25196159/viewspace-697122/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/25196159/viewspace-697122/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值