root@rac2 # stmsboot -e -D fp #这个命令是让系统发现刚才分给他的磁盘,按照提示进行设置即可,注意会要求重启系统
root@rac2 # devfsadm -C #重启系统之后执行这个命令,作用是让format命令能认出新的硬盘
root@rac2 #format #对磁盘进行分区
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0t0d0
/pci@0,600000/pci@0/pci@8/pci@0/scsi@1/sd@0,0
1. c0t1d0
/pci@0,600000/pci@0/pci@8/pci@0/scsi@1/sd@1,0
2. c1t201700A0B847BE32d31
/pci@2,600000/SUNW,qlc@0/fp@0,0/ssd@w201700a0b847be32,1f
3. c3t201600A0B847BE32d31
/pci@3,700000/SUNW,qlc@0/fp@0,0/ssd@w201600a0b847be32,1f
4. c5t600C0FF000000000086BEE5EAE284C00d0
/scsi_vhci/ssd@g600c0ff000000000086bee5eae284c00
5. c5t600144F09307FD8700004FB0BC450008d0
/scsi_vhci/ssd@g600144f09307fd8700004fb0bc450008
#我们要对5号磁盘分区并格式化,设备号要记住(这个长串号也就是上面图—3里面的设备号)
6. c5t600144F09584A02F00004FA8B7E00007d0
/scsi_vhci/ssd@g600144f09584a02f00004fa8b7e00007
7. c5t600144F09584A02F00004FA8B8D70008d0
/scsi_vhci/ssd@g600144f09584a02f00004fa8b8d70008
8. c5t600144F09584A02F00004FA8B8E30009d0
/scsi_vhci/ssd@g600144f09584a02f00004fa8b8e30009
9. c5t600144F09584A02F00004FA8B25B0001d0
/scsi_vhci/ssd@g600144f09584a02f00004fa8b25b0001
10. c5t600144F09584A02F00004FA8B78D0005d0
/scsi_vhci/ssd@g600144f09584a02f00004fa8b78d0005
11. c5t600144F09584A02F00004FA8B79A0006d0
/scsi_vhci/ssd@g600144f09584a02f00004fa8b79a0006
12. c5t600144F09584A02F00004FA8B981000Ad0
/scsi_vhci/ssd@g600144f09584a02f00004fa8b981000a
13. c5t600144F09584A02F00004FA8B7620002d0
/scsi_vhci/ssd@g600144f09584a02f00004fa8b7620002
14. c5t600144F09584A02F00004FA8B7730003d0
/scsi_vhci/ssd@g600144f09584a02f00004fa8b7730003
15. c5t600144F09584A02F00004FA8B7800004d0
/scsi_vhci/ssd@g600144f09584a02f00004fa8b7800004
Specify disk (enter its number):5 #这里输入5回车,也就是我们刚才看到的要格式化的盘的号
selectingc5t600144F09307FD8700004FB0BC450008d0
[disk formatted]
FORMAT MENU:
disk - select a disk
type - select (define) adisk type
partition - select (define) apartition table
current - describe the currentdisk
format - format and analyzethe disk
repair - repair a defectivesector
label - write label to thedisk
analyze - surface analysis
defect - defect listmanagement
backup - search for backuplabels
verify - read and displaylabels
inquiry - show vendor, productand revision
volname - set 8-character volumename
!
quit
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
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 andlabel to the disk
!
quit
partition>0 #输入0回车,要做的第一个分区,从0开始
Part Tag Flag First Sector Size Last Sector
0 usr wm 34 1.00TB 2147483681
Enter partition id tag[usr]: #默认回车即可
Enter partition permission flags[wm]: #默认回车即可
Enter new starting Sector[34]: #默认回车即可
Enter partition size[2147483648b,2147483681e, 1048576mb, 1024gb, 1tb]:1tb #这里要输入分区的大小,我们要分1T,所以输入1tb 回车
partition>p #输入p回车,继续分区
Current partition table (unnamed):
Total disk sectors available: 4571774942 +16384 (reserved sectors)
Part Tag Flag First Sector Size Last Sector
0 usr wm 34 1.00TB 2147483681
1 usr wm 2147483682 1.10TB 4509715745
2unassigned wm 0 0 0
3unassigned wm 0 0 0
4unassigned wm 0 0 0
5unassigned wm 0 0 0
6 unassigned wm 0 0 0
8 reserved wm 4571774943 8.00MB 4571791326
partition>1 输入1回车,做第二个分区。
Part Tag Flag First Sector Size Last Sector
1 usr wm 2147483682 1.10TB 4509715745
Enter partition id tag[usr]: #默认回车即可
Enter partition permission flags[wm]: #默认回车即可
Enter new starting Sector[2147483682]: #默认回车即可
Enter partition size[2362232064b,4509715745e, 1153433mb, 1126gb, 1tb]:1.1tb #这里要输入分区的大小,我们要分1.1T,所以输入1.1tb 回车
partition>p #输入p回车查看下
Current partition table (unnamed):
Total disk sectors available: 4571774942 +16384 (reserved sectors)
Part Tag Flag First Sector Size Last Sector
0 usr wm 34 1.00TB 2147483681
1 usr wm 2147483682 1.10TB 4509715745
2unassigned wm 0 0 0
3unassigned wm 0 0 0
4unassigned wm 0 0 0
5unassigned wm 0 0 0
6 unassigned wm 0 0 0
8 reserved wm 4571774943 8.00MB 4571791326
partition>l #输入小写L 回车,写入lable
Ready to label disk, continue? y
partition>q #输入q回车退出界面
FORMAT MENU:
disk - select a disk
type - select (define) adisk type
partition - select (define) apartition table
current - describe the currentdisk
format - format and analyzethe disk
repair - repair a defectivesector
label - write label to thedisk
analyze - surface analysis
defect - defect listmanagement
backup - search for backuplabels
verify - read and displaylabels
inquiry - show vendor, productand revision
volname - set 8-charactervolume name
!
quit
format>q #再次输入q回车退出
root@rac2 #
root@rac2 #cd /dev/
root@rac2 #cd /dev/rds
rds rdsk/
root@rac2 # cd /dev/rdsk/
root@rac2 # ls -al | grep g600144f09307fd8700004fb0bc450008
lrwxrwxrwx 1 root root 68 Jun 13 09:58 c5t600144F09307FD8700004FB0BC450008d0#注意这个是进行分区的硬盘-> ../../devices/scsi_vhci/ssd@g600144f09307fd8700004fb0bc450008:wd,raw
lrwxrwxrwx 1 root root 67 Jun 13 09:58 c5t600144F09307FD8700004FB0BC450008d0s0 #注意这个就是分的第一个分区->../../devices/scsi_vhci/ssd@g600144f09307fd8700004fb0bc450008:a,raw
lrwxrwxrwx 1 root root 67 Jun 13 09:58 c5t600144F09307FD8700004FB0BC450008d0s1#注意这个就是分的第二个分区->../../devices/scsi_vhci/ssd@g600144f09307fd8700004fb0bc450008:b,raw
lrwxrwxrwx 1 root root 67 Jun 13 09:58 c5t600144F09307FD8700004FB0BC450008d0s2 ->../../devices/scsi_vhci/ssd@g600144f09307fd8700004fb0bc450008:c,raw
lrwxrwxrwx 1 root root 67 Jun 13 09:58 c5t600144F09307FD8700004FB0BC450008d0s3 ->../../devices/scsi_vhci/ssd@g600144f09307fd8700004fb0bc450008:d,raw
lrwxrwxrwx 1 root root 67 Jun 13 09:58 c5t600144F09307FD8700004FB0BC450008d0s4 ->../../devices/scsi_vhci/ssd@g600144f09307fd8700004fb0bc450008:e,raw
lrwxrwxrwx 1 root root 67 Jun 13 09:58 c5t600144F09307FD8700004FB0BC450008d0s5 -> ../../devices/scsi_vhci/ssd@g600144f09307fd8700004fb0bc450008:f,raw
lrwxrwxrwx 1 root root 67 Jun 13 09:58 c5t600144F09307FD8700004FB0BC450008d0s6 ->../../devices/scsi_vhci/ssd@g600144f09307fd8700004fb0bc450008:g,raw
root@rac2 #
root@rac2 #
root@rac2 #newfs /dev/rdsk/c5t600144F09307FD8700004FB0BC450008d0s0
#这是对第一个分区进行格式化
newfs: construct a new file system/dev/rdsk/c5t600144F09307FD8700004FB0BC450008d0s0: (y/n)? y
Warning: 4096 sector(s) in last cylinderunallocated
/dev/rdsk/c5t600144F09307FD8700004FB0BC450008d0s0: 2147483648 sectors in 349526 cylinders of48 tracks, 128 sectors
1048576.0MB in 2445 cyl groups (143 c/g, 429.00MB/g, 448 i/g)
super-block backups (for fsck -F ufs -ob=#) at:
32,878752, 1757472, 2636192, 3514912, 4393632, 5272352, 6151072, 7029792,
7908512,
Initializing cylinder groups:
................................................
super-block backups for last 10 cylindergroups at:
2139371936, 2140250656, 2141129376,2142008096, 2142886816, 2143765536,
2144644256, 2145522976, 2146401696, 2147280416
root@rac2 #newfs /dev/rdsk/c5t600144F09307FD8700004FB0BC450008d0s1
#这是对第二个分区进行格式化
newfs: construct a new file system/dev/rdsk/c5t600144F09307FD8700004FB0BC450008d0s1: (y/n)? y
Warning: 768 sector(s) in last cylinderunallocated
/dev/rdsk/c5t600144F09307FD8700004FB0BC450008d0s1: 2362232064 sectors in 384478 cylinders of48 tracks, 128 sectors
1153433.6MB in 2689 cyl groups (143 c/g, 429.00MB/g, 448 i/g)
super-block backups (for fsck -F ufs -ob=#) at:
32,878752, 1757472, 2636192, 3514912, 4393632, 5272352, 6151072, 7029792,
7908512,
Initializing cylinder groups:
.....................................................
super-block backups for last 10 cylindergroups at:
2353755040, 2354633760, 2355512480,2356391200, 2357269920, 2358148640,
2359027360, 2359906080, 2360784800, 2361655328
root@rac2 #
root@rac2 #
#下面步骤创建目录,并将新的分区挂载到目录上。
root@rac2 #mkdir /u0
root@rac2 #mkdir /u1
root@rac2 #mount /dev/dsk/c5t600144F09307FD8700004FB0BC450008d0s0 /u0
root@rac2 #mount /dev/dsk/c5t600144F09307FD8700004FB0BC450008d0s1 /u1
root@rac2 # df -h
Filesystem size used avail capacity Mounted on
/dev/md/dsk/d10 223G 12G 209G 6% /
/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 181G 1.7M 181G 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
sharefs 0K 0K 0K 0% /etc/dfs/sharetab
fd 0K 0K 0K 0% /dev/fd
swap 181G 32K 181G 1% /tmp
swap 181G 64K 181G 1% /var/run
/dev/md/dsk/d70 202G 205M 200G 1% /export/home
/dev/dsk/c5t600144F09307FD8700004FB0BC450008d0s0
1.0T 256M 1013G 1% /u0
/dev/dsk/c5t600144F09307FD8700004FB0BC450008d0s1
1.1T 256M 1.1T 1% /u1
root@rac2 # cd /u0
root@rac2 # ls -al
total 34
drwxr-xr-x 3 root root 512 Jun 13 11:16 .
drwxr-xr-x 35 root root 1024 Jun 13 11:18 ..
drwx------ 2 root root 8192 Jun 13 11:16 lost+found
root@rac2 #
root@rac2#