linux
分类: BSD
2012-02-17 11:38:48
在solaris 10下mount硬盘:
1.先执行format查看系统的硬盘信息
# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0t0d0
/ssm@0,0/pci@18,700000/pci@1/SUNW,isptwo@4/sd@0,0
1. c1t0d0
/ssm@0,0/pci@1d,700000/pci@2/SUNW,qlc@4/fp@0,0/ssd@w220000008713e056,0
2. c1t1d0
/ssm@0,0/pci@1d,700000/pci@2/SUNW,qlc@4/fp@0,0/ssd@w220000008713f893,0
3. c1t2d0
/ssm@0,0/pci@1d,700000/pci@2/SUNW,qlc@4/fp@0,0/ssd@w220000008713f842,0
4. c1t3d0
/ssm@0,0/pci@1d,700000/pci@2/SUNW,qlc@4/fp@0,0/ssd@w220000008713f834,0
5. c1t4d0
/ssm@0,0/pci@1d,700000/pci@2/SUNW,qlc@4/fp@0,0/ssd@w220000008713eb4f,0
6. c1t5d0
/ssm@0,0/pci@1d,700000/pci@2/SUNW,qlc@4/fp@0,0/ssd@w220000008713eb64,0
7. c1t6d0
/ssm@0,0/pci@1d,700000/pci@2/SUNW,qlc@4/fp@0,0/ssd@w220000008713cdd3,0
8. c1t16d0
/ssm@0,0/pci@1d,700000/pci@2/SUNW,qlc@4/fp@0,0/ssd@w220000008713eb68,0
9. c1t17d0
/ssm@0,0/pci@1d,700000/pci@2/SUNW,qlc@4/fp@0,0/ssd@w220000008713d9a5,0
10. c1t18d0
/ssm@0,0/pci@1d,700000/pci@2/SUNW,qlc@4/fp@0,0/ssd@w220000008713f8bd,0
11. c1t19d0
/ssm@0,0/pci@1d,700000/pci@2/SUNW,qlc@4/fp@0,0/ssd@w220000008713f772,0
12. c1t20d0
/ssm@0,0/pci@1d,700000/pci@2/SUNW,qlc@4/fp@0,0/ssd@w220000008713ee1d,0
13. c1t21d0
/ssm@0,0/pci@1d,700000/pci@2/SUNW,qlc@4/fp@0,0/ssd@w220000008713f40f,0
14. c1t22d0
/ssm@0,0/pci@1d,700000/pci@2/SUNW,qlc@4/fp@0,0/ssd@w220000008713e099,0
Specify disk (enter its number): 3
2.然后对要mount的硬盘执行:newfs 命令,如
# newfs /dev/dsk/c1t1d0s6
newfs: construct a new file system /dev/rdsk/c1t1d0s6: (y/n)? y
Warning: 3384 sector(s) in last cylinder unallocated
/dev/rdsk/c1t1d0s6: 141867720 sectors in 23091 cylinders of 48 tracks, 128 sectors
69271.3MB in 1444 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:
140971296, 141069728, 141168160, 141266592, 141365024, 141463456, 141561888,
141660320, 141758752, 141857184
3、然后执行命令mount,例如
#mkdir /usr/local/app
#mount /dev/dsk/c1t1d0s6 /usr/local/app
4、不过这个mount动作只对本次启动有效,如果希望下次启动后仍然生效,需要手工将信息添加到/etc/vfstab文件中。
# more /etc/vfstab
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
#/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr ufs 1 yes -
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/dsk/c1t0d0s3 - - swap - no -
/dev/dsk/c1t0d0s0 /dev/rdsk/c1t0d0s0 / ufs 1 no -
/dev/dsk/c1t0d0s1 /dev/rdsk/c1t0d0s1 /var ufs 1 no -
/dev/dsk/c1t0d0s7 /dev/rdsk/c1t0d0s7 /export/home ufs 2 yes -
/dev/dsk/c1t0d0s5 /dev/rdsk/c1t0d0s5 /opt ufs 2 yes -
swap - /tmp tmpfs - yes -
# cp /etc/vfstab /etc/vfstab.bak
# echo "/dev/dsk/c1t1d0s7 /dev/rdsk/c1t1d0s7 /data ufs 1 yes -" >> /etc/vfstab
# more /etc/vfstab
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
#/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr ufs 1 yes -
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/dsk/c1t0d0s3 - - swap - no -
/dev/dsk/c1t0d0s0 /dev/rdsk/c1t0d0s0 / ufs 1 no -
/dev/dsk/c1t0d0s1 /dev/rdsk/c1t0d0s1 /var ufs 1 no -
/dev/dsk/c1t0d0s7 /dev/rdsk/c1t0d0s7 /export/home ufs 2 yes -
/dev/dsk/c1t0d0s5 /dev/rdsk/c1t0d0s5 /opt ufs 2 yes -
swap - /tmp tmpfs - yes -
/dev/dsk/c1t1d0s7 /dev/rdsk/c1t1d0s7 /data ufs 1 yes -
在修改/etc/vfstab文件之前最好先做好备份。