solaris硬盘挂载
给一台安装了solaris系统的T5120划分zone的时候,由于系统所在的磁盘空间不足,所以需要将另外一块闲置的
硬盘进行挂载,以下是我的挂载过程。
先使用df查看系统现在在使用的是那个硬盘,在使用的盘是:c1t0d0
运行下面的命令查看
磁盘信息:
bash-3.00# format
Searching for disks...done
AVAILABLE
DISK SELECTIONS:
0. c1t0d0 <SUN146G cyl 14087 alt 2 hd 24
sec 848>
/pci@0/pci@0/pci@2/scsi@0/sd@0,0
1.
c1t1d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
/pci@0/pci@0/pci@2/scsi@0/sd@1,0
Specify disk (enter its number):1
selecting
c1t1d0
有两块磁盘,其中c1t0d0已经使用,需要挂载的是c1t1d0这块硬盘。
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> p /显示磁盘现有分区情况/
Current
partition table (default): Total disk cylinders available: 14087 + 2
(reserved cylinders)
Current partition table (original):
Total
disk cylinders available: 14087 + 2 (reserved cylinders)
Part
Tag Flag Cylinders Size Blocks
0
root wm 0 - 10304 129.19MB (10305/0/0) 209727360
1
swap wu 10305 - 14086 129.19MB (3782/0/0) 76971264
2 backup wu 0 - 14086 136.71GB (14087/0/0)
286698624
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
136.46GB (0/0/0) 0
7 unassigned wm
0 0 (0/0/0) 0 partition> m /修改分区/
Select
partitioning base:
0. Current partition table (default)
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 - 14086 136.71GB (14087/0/0)
286698624
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
Do you wish to
continue creating a new partition
table based on above table[yes]?
Yes
Free Hog partition[6]? 1
Enter size of partition '0' [0b, 0c,
0.00mb, 0.00gb]: 100gb /分一个100G的卷/
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]:
Enter
size of partition '7' [0b, 0c, 0.00mb, 0.00gb]:
Part Tag
Flag Cylinders Size Blocks
0 root
wm 0 - 10304 100.01GB (10305/0/0) 209727360
1
swap wu 10305 - 14086 36.70GB (3782/0/0) 76971264
2
backup wu 0 - 14086 136.71GB (14087/0/0) 286698624
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
Okay to make this the current
partition table[yes]? Yes
partition>quit
# newfs
/dev/dsk/c1t1d0s1 /建文件系统/
newfs: construct a new file system
/dev/rdsk/c1t1d0s1: (y/n)? y
………..
# mount /dev/dsk/c1t1d0s1
/export /挂载到export目录下/
# ls
bak dev export
lib net platform sbin tmp vol
bin
devices home lost+found opt proc
swapfile usr export
cdrom etc kernel
mnt oss root system var
# df
Filesystem
size used avail capacity Mounted on
/dev/dsk/c1t0d0s0
29G 5.3G 23G 19% /
/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 26G 1.4M 26G 1%
/etc/svc/volatile
objfs 0K 0K 0K 0%
/system/object
/platform/SUNW,SPARC-Enterprise-T5120/lib/libc_psr/libc_psr_hwcap2.so.1
29G 5.3G 23G 19%
/platform/sun4v/lib/libc_psr.so.1
/platform/SUNW,SPARC-Enterprise-T5120/lib/sparcv9/libc_psr/libc_psr_hwcap2.so
.1
29G 5.3G 23G 19%
/platform/sun4v/lib/sparcv9/libc_psr.so.1
fd 0K
0K 0K 0% /dev/fd
swap 26G 1.2M
26G 1% /tmp
swap 26G 88K 26G 1%
/var/run
/dev/dsk/c1t1d0s0 98G 3.3G 94G 4%
/export /* mount 上来的卷*/
可以使用以下的命令来查看mount上来的空间大小
df -h | grep
/export
/dev/dsk/c1t1d0s0 98G 3.3G 94G 4% /export
That’s
over!
solaris硬盘挂载
最新推荐文章于 2021-05-08 01:54:25 发布