bash-3.00# df -h //查看大小
文件系统 大小 用了 可用 容量 挂接在
/dev/dsk/c1t0d0s0 1.4G 439M 925M 33% /
/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 785M 992K 784M 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
sharefs 0K 0K 0K 0% /etc/dfs/sharetab
/dev/dsk/c1t0d0s6 6.0G 4.1G 1.8G 70% /usr
/usr/lib/libc/libc_hwcap1.so.1
6.0G 4.1G 1.8G 70% /lib/libc.so.1
fd 0K 0K 0K 0% /dev/fd
swap 784M 48K 784M 1% /tmp
swap 784M 28K 784M 1% /var/run
/tmp/VMwareDnD 0K 0K 0K 0% /var/run/vmblock
bash-3.00# ls -la /export/home
总数 12
drwxr-xr-x 2 root root 512 9月 21日 22:50 .
drwxr-xr-x 3 root sys 512 9月 18日 11:43 ..
-rw-r--r-- 1 root root 4096 9月 18日 14:57 tes.tar
bash-3.00# format //准备分区
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c1t0d0
/pci@0,0/pci15ad,1976@10/sd@0,0
Specify disk (enter its number): 0
selecting c1t0d0
[disk formatted]
Warning: Current Disk has mounted partitions.
/dev/dsk/c1t0d0s0 is currently mounted on /. Please see umount(1M).
/dev/dsk/c1t0d0s1 is currently used by swap. Please see swap(1M).
/dev/dsk/c1t0d0s6 is currently mounted on /usr. Please see umount(1M).
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
! - 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: 4092 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 root wm 257 - 989 1.43GB (733/0/0) 3002368
1 swap wu 1 - 256 512.00MB (256/0/0) 1048576
2 backup wm 0 - 4091 7.99GB (4092/0/0) 16760832
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 990 - 4091 6.06GB (3102/0/0) 12705792
7 unassigned wm 0 0 (0/0/0) 0
8 boot wu 0 - 0 2.00MB (1/0/0) 4096
9 unassigned wm 0 0 (0/0/0) 0
partition> 3 //选择3好分区
Part Tag Flag Cylinders Size Blocks
3 unassigned wm 0 0 (0/0/0) 0
Enter partition id tag[unassigned]:
Enter partition permission flags[wm]: wm
Enter new starting cyl[0]: 991 //输入片号
Enter partition size[0b, 0c, 991e, 0.00mb, 0.00gb]: 50mb //输入大小
partition> l
Ready to label disk, continue? y
partition> q
format> q
bash-3.00# newfs /dev/rdsk/c1t0d0s3
newfs: 建构新的文件系统 /dev/rdsk/c1t0d0s3: (y/n)? y
警告:最后一个未分配柱面中的 2048 扇区
/dev/rdsk/c1t0d0s3: 在 17 磁道上,48 扇区的 128 柱面的 102400 扇区
50.0MB 在 2 柱面群组 (13 c/g, 39.00MB/g, 18624 i/g)
超块 (fsck -F ufs -o b=#) 备份在:
32, 80032,
bash-3.00# mount /dev/dsk/c1t0d0s3 /export/home //挂载分区
bash-3.00# vi /etc/vfstab 修改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/c1t0d0s1 - - swap - no -
/dev/dsk/c1t0d0s0 /dev/rdsk/c1t0d0s0 / ufs 1 no -
/dev/dsk/c1t0d0s6 /dev/rdsk/c1t0d0s6 /usr ufs 1 no -
/dev/dsk/c1t0d0s3 /dev/rdsk/c1t0d0s3 /usr ufs 1 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 -
bash-3.00# df -h //查看分区结果
文件系统 大小 用了 可用 容量 挂接在
/dev/dsk/c1t0d0s0 1.4G 440M 925M 33% /
/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 762M 992K 761M 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
sharefs 0K 0K 0K 0% /etc/dfs/sharetab
/dev/dsk/c1t0d0s6 6.0G 4.1G 1.8G 70% /usr
/usr/lib/libc/libc_hwcap1.so.1
6.0G 4.1G 1.8G 70% /lib/libc.so.1
fd 0K 0K 0K 0% /dev/fd
swap 762M 48K 761M 1% /tmp
swap 762M 28K 761M 1% /var/run
/tmp/VMwareDnD 0K 0K 0K 0% /var/run/vmblock
/dev/dsk/c1t0d0s3 45M 1.0M 40M 3% /export/home