- 用format命令,看看系统是不是已经识别了该硬盘,如果识别了,可以继续;如果没有识别,先想办法。
- bash-3.00# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0d0 <DEFAULT cyl 17750 alt 2 hd 15 sec 63>
/pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0
1. c2t0d0 <DEFAULT cyl 508 alt 2 hd 128 sec 32>
/pci@0,0/pci1000,30@10/sd@0,0 - 1号盘就是我新添加的硬盘,在Specify disk (enter its number):后面键入1,表示要对1号盘进行操作。
- 在format〉提示符下键入p
- Warning: Current Disk has mounted partitions.
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> 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>提示符下输入m,进行分区
partition> m
Select partitioning base:
0. Current partition table (d)
1. All Free Hog
Choose base (enter number) [0]?
选择1,重新进行分区;选择0 就是用已经保存的配置。我是新的所以选择1 - 我们这里,把这块盘的所有空间都分配给7;
Enter size of partition '0' [0b, 0c, 0.00mb, 0.00gb]:[在这里添加几都可以]
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 '6' [0b, 0c, 0.00mb, 0.00gb]:
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 - 24619 33.92GB (24620/0/0) 71127180
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 - 24619 33.92GB (24620/0/0) 71127180
可以看出,分区7和硬盘的总大小(2)相等
下面是给该分区设置table为disk1_7
Okay to make this the current partition table[yes]? disk1_7 - save,然后退出format
- 至此格式化完毕!
- bash-3.00# newfs /dev/dsk/c2t0d0s7
newfs: construct a new file system /dev/rdsk/c2t0d0s7: (y/n)? y
/dev/rdsk/c2t0d0s7: 1912832 sectors in 467 cylinders of 128 tracks, 32 sectors
934.0MB in 30 cyl groups (16 c/g, 32.00MB/g, 15360 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 65600, 131168, 196736, 262304, 327872, 393440, 459008, 524576, 590144,
1311392, 1376960, 1442528, 1508096, 1573664, 1639232, 1704800, 1770368,
1835936, 1901504, - bash-3.00# mount /dev/dsk/c2t0d0s7 /newdisk/
- bash-3.00# df -h
Filesystem size used avail capacity Mounted on
/dev/dsk/c0d0s0 3.7G 2.5G 1.2G 68% /
/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 867M 492K 867M 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
/usr/lib/libc/libc_hwcap1.so.1
3.7G 2.5G 1.2G 68% /lib/libc.so.1
fd 0K 0K 0K 0% /dev/fd
swap 867M 4K 867M 1% /tmp
swap ...
Solaris 10 x86系统上添加新硬盘
最新推荐文章于 2024-02-01 07:30:00 发布