免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2407 | 回复: 3
打印 上一主题 下一主题

谁能帮我提供一份关于mount(umount)的详细说明? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2002-09-16 10:20 |只看该作者 |倒序浏览
chinese的最好
谢谢

论坛徽章:
0
2 [报告]
发表于 2002-09-16 10:32 |只看该作者

谁能帮我提供一份关于mount(umount)的详细说明?

挂接就是将分离的文件系统附加到文件系统分成结构中。文件系统要附加到某个挂接点,也就是目录。  
挂接和卸载文件系统发生在系统启动和关闭时。  
系统启动时,将读取/etc/vfstab文件。这个文件记录系统要挂接的文件系统。因此/etc/vfstab文件中的文件系统将自动挂接。也可以从命令行方式下人工挂接文件系统。  


不加参数的mount显示系统目前已经挂接的文件系统。  
# mount  
/ on /dev/dsk/c0t3d0s0 read/write/setuid/largefiles/logging on Mon Nov 18  
17:58:19 1998  
/usr on /dev/dsk/c0t3d0s6 read/write/setuid/largefiles/logging on Mon Nov 18  
17:58:19 1998  
/proc on /proc read/write/setuid on Mon Nov 18 17:58:19 1998  
/dev/fd on fd read/write/setuid on Mon Nov 18 17:58:19 1998  
/var on /dev/dsk/c0t3d0s1 nolargefiles/read/write/setuid on Mon Nov 18 17:58:19  
1998  
/opt on /dev/dsk/c0t3d0s5 setuid/read/write/largefiles on Mon Nov 18 17:58:20  
1998  
/tmp on swap read/write on Mon Nov 18 17:58:20 1998  
/pns on dbserver:/export/pse soft/nosuid/remote on Mon Nov 18 19:04:36 1998  

1.mount的选项,可以用-o标定mount的选项

nolargefiles参数将使文件系统中所有新建的文件小于2G字节。
remount 向mount表明它应该向一个已经加载的文件系统重新加载的文件系统重新加载。这通常用来改变文件系统的加载标记,特别可用来将一个只读的文件系统改成可读写的文件系统。
ro 将文件系统加载为只读
rw 将文件系统加载为可读写
intr 允许杀死文件系统中正在等待的进程。
  
# mount -o nolargefiles /dev/dsk/c0t3d0s7 /export/home  

文件系统中文件的大小不能超过2G,使用这个参数可能出现错误,原因是由于文件系统包含了大于2G的文件,注意:是/dev/dsk/下的而不是/dev/rdsk下的,
因为/dev/rdsk下的设备是物理设备,/dev/dsk下的文件是连接到/dev/rdsk下的

要挂接在/etc/vfstab中已有的某个文件系统时,只需要用命令  
# mount /export/home  

/etc/vfstab文件格式  
#device device mount FS fsck mount mount  
#to mount to fsck point type pass at boot ops  
#/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr ufs 1 yes -  
/proc - /proc proc - no -  
fd - /dev/fd fd - no -  
swap - /tmp tmpfs - yes -  
/dev/dsk/c0t3d0s0 /dev/rdsk/c0t3d0s0 / ufs 1 no -  
/dev/dsk/c0t3d0s6 /dev/rdsk/c0t3d0s6 /usr ufs 1 no -  
/dev/dsk/c0t3d0s3 /dev/rdsk/c0t3d0s3 /export ufs 5 yes -  
/dev/dsk/c0t3d0s7 /dev/rdsk/c0t3d0s7 /export/home ufs 5 yes -  
/dev/dsk/c0t3d0s5 /dev/rdsk/c0t3d0s5 /opt ufs 8 yes -  
/dev/dsk/c0t3d0s1 - - swap - no -  
注意:一般不用yes用no -


#mount -a 通知mount应加载的所有文件系统,等同于/usr/sbin/mountall
通常不由管理员使用而是在系统启动时候/etc/init.d/MOUNTFSYS自动发出。

列出加载的文件系统
#mount


查看文件系统

umount卸载文件系统  
# umount /dev/dsk/c0t3d0s7  
或  
# umount /export/home  
如果文件系统中某个文件正在使用,则不能卸载这个文件系统。

当一个设备busy状态时
可以用
#umount -f /mount_point 强制卸载一个目录 (容易丢失数据)
或用如下:(推荐)

Using the fuser Command
To stop all processes from accessinga file system:
As root,list all the processes accessing the file system
#fuser -cu mount_point
2.Kill all processes accessing the file system.
#fuser -ck mount_point
3.Verify there are no processes accessing the file system.
#fuser -c mount_point
4.Unmount the file system.
# umount mount_point

论坛徽章:
0
3 [报告]
发表于 2002-09-16 11:04 |只看该作者

谁能帮我提供一份关于mount(umount)的详细说明?

thank you very much !!

论坛徽章:
0
4 [报告]
发表于 2003-04-06 00:30 |只看该作者

谁能帮我提供一份关于mount(umount)的详细说明?

good
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP