本文以发行版为 CentOS6.5 为例 ----->>
1) 设置挂载源头:
以挂载 Windows 驱动器文件系统,打开某个 CoLinux 启动设置文件(Centos6.conf)
添加如下内容:
cofs0="c:\"
cofs1="d:\"
cofs2="e:\"
2)在 CoLinux 虚拟的 CentOS 下安装 autofs 软件包
yum -y install autofs
3) 用 vi 编辑 autofs 软件的两个配置文件
--------------------------------------------------------------------------
auto.master ----->
#
# Sample auto.master file
# This is a ‘master‘ automounter map and it has the following format:
# mount-point [map-type[,format]:]map [options]
# For details of the format look at auto.master(5).
#
/misc /etc/auto.misc --timeout=60
#
# NOTE: mounts done from a hosts map will be mounted with the
# "nosuid" and "nodev" options unless the "suid" and "dev"
# options are explicitly given.
#
/net -hosts
#
# Include central master map if it can be found using
# nsswitch sources.
#
# Note that if there are entries for /net or /misc (as
# above) in the included master map any keys that are the
# same will not be seen as the first read key seen takes
# precedence.
#
+auto.master
---------------------------------------------------------------------------
---------------------------------------------------------------------------
auto.misc ----->
# 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 entries are samples to pique your imagination
#linux -ro,soft,intr ftp.example.org:/pub/linux
#boot -fstype=ext2 :/dev/hda1
#floppy -fstype=auto :/dev/fd0
#floppy -fstype=ext2 :/dev/fd0
#e2floppy -fstype=ext2 :/dev/fd0
#jaz -fstype=ext2 :/dev/sdc1
#removable -fstype=ext2 :/dev/hdd
win_c -fstype=cofs :cofs0
win_d -fstype=cofs :cofs1
win_e -fstype=cofs :cofs2
-------------------------------------------------------------------------
4) 最后启动 autofs 服务即可
/etc/init.d/autofs start
本文出自 “问取虚空始出尘” 博客,请务必保留此出处http://svip369.blog.51cto.com/12787722/1913764
在用CoLinux虚拟Linux时,使用 autofs 软件自动挂载文件系统的一些配置
原文地址:http://svip369.blog.51cto.com/12787722/1913764