教学文章
Technology Exchange
热门课程
400电话

免费咨询热线
400-090-9964

教学文章

solaris学习之建立文件系统

时间:2016-01-12 来源:

1、关闭solaris虚拟机,去storage新建一个磁盘
2、新建磁盘要执行下面两条语句才有效
   #touch /reconfigure
   #sync;sync;reboot
3、对分区格式化
  #format
  选择磁盘c0d1
  format> p
  这里有warming,提示要输入fdisk【第一次分区,一般都要求先fdisk】
  format>fdisk
  partition>print  查看分区的信息
  选择0,改变0分区
Enter partition id tag[unassigned]: 回车
Enter partition permission flags[wm]: 回车
Enter new starting cyl[0]: 0【盘片号,0分区的肯定是0,其他分区的就用print查看一分区信息】
Enter partition size[0b, 0c, 0e, 0.00mb, 0.00gb]: 10gb【分区的大小】
 选择1,改变1分区
Enter partition id tag[unassigned]: 
Enter partition permission flags[wm]: 
Enter new starting cyl[0]: 1306
Enter partition size[0b, 0c, 1306e, 0.00mb, 0.00gb]: 10gb
 选择3,改变3分区【2分区备份用的,8、9分区不用】
Enter partition id tag[unassigned]: 
Enter partition permission flags[wm]: 
Enter new starting cyl[0]: 2612
Enter partition size[0b, 0c, 2612e, 0.00mb, 0.00gb]: help
Expecting up to 25093530 blocks, 1562 cylinders,  1562 end cylinder,  12252.70 megabytes, or 
 
11.97 gigabytes
Enter partition size[0b, 0c, 2612e, 0.00mb, 0.00gb]: 11.9gb
退回到format主菜单,选择label,保存当前的分区信息
4、格式化分区
#newfs /dev/dsk/c0d1s0
#newfs /dev/dsk/c0d1s1
#newfs /dev/dsk/c0d1s3
5、新建几个目录作为挂载点,用来挂在新的文件系统
#mkdir disk1 disk2 disk3
6、文件系统挂载
#mount /dev/dsk/c0d1s0 /disk1
#mount /dev/dsk/c0d1s1 /disk2
#mount /dev/dsk/c0d1s3 /disk3
#df -k 查看文件系统的信息
这样mount,一重启就没了,所以要去编辑/etc/vfstab
7、开机自动挂载【在文件里新加上这三句话就可以啦~~】
/dev/dsk/c0d1s0 /dev/rdsk/c0d1s0        /disk1  ufs     1       yes     -
/dev/dsk/c0d1s1 /dev/rdsk/c0d1s1        /disk2  ufs     1       yes     -
/dev/dsk/c0d1s3 /dev/rdsk/c0d1s3        /disk3  ufs     1       yes     -

版权所有@北京神脑资讯技术有限公司(CUUG,中国UNIX用户协会) Copyright ALL Rights Reserved 京ICP备11008061号-1

CUUG旗下网站:www.cuug.com.cn www.cuug.com oracle.cuug.com bbs.cuug.com www.cuug.net

电话:010-59426307 010-59426319 邮政编码:100089

地址:北京市海淀区北清路164号28-38号院