文件名称:自动挂载-RHCE认证用户基础
文件大小:522KB
文件格式:PPT
更新时间:2024-05-15 11:42:10
RHCE认证
自动挂载 系统通过autofs服务自动挂载文件系统 需要后台的automount进程 autofs服务的开闭由/etc/init.d/autofs脚本控制 主要应用于软驱与光驱等场合 如果该设备一段时间没有被使用,autofs会自动卸载 一般我们通过更改/etc/auto.master和/etc/auto.misc文件来完成automount的设定。 [root @stationxx root] # cat /etc/auto.master #$Id : auto.master,v 1.2 1997/10/06 21:52:03 hpa Exp $ #Sample auto.master file # Format of this file: #mountpoint map options #For details of the format look at autofs(8) # /misc /etc/auto.misc --timeout=60 [root @stationxx root] # cat /etc/auto.misc #$Id : auto.master,v 1.2 1997/10/06 21:52:03 hpa Exp $ #This is an automounter map and it has the following format # key [ -mount-options-separated-by-comma ] location # Details may be found in the autofs(5) manpage cd -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom # the following enteries are samples to pique you imagination # linux -ro,soft,intr ftp.example.org:/pub/linux # boot -fstype=ext2 :/dev/hda1 …… ……. ……. auto.master文件每一行表示一个自动挂载集群。每一行的格式为: 自动挂载目录集合 参考文件(默认为/etc/auto.misc) auto.misc文件中记录的则是每一个自动挂载的设备。每一行的格式为: 挂载点(实际挂载点为“/自动挂载目录集合/挂载点”)自动卸载等待时间 设备文件名