linux触发式挂载auto.master

# 触发式挂载

1、 主配置文件
/misc   /etc/auto.misc

2、 辅配置文件
[root@www ~]# vim /etc/auto.master
# Sample auto.master file
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# For details of the format look at autofs(5).
#
/misc   /etc/auto.misc


3、 添加Fu助配置文件的名称和目录
/auto   /etc/sda5.auto

[root@www ~]# vim /etc/sda5.auto


4、 名称的文件类型 默认为ext3
sda5 -fstype=auto :/dev/sda5

5、 建立文件夹
[root@www ~]# mkdir /auto

6、 重启autofs服务
[root@www ~]# /etc/init.d/autofs restart
Stopping automount:                                        [  OK  ]
Starting automount:                                          [  OK  ]

7、 重启后进入auto目录,查看不到任何东西,直接cd进入sda5后,触发挂载
[root@localhost ~]# cd /auto/
[root@localhost auto]# ls
[root@localhost auto]# cd sda5
[root@localhost sda5]# ls
bb
[root@localhost sda5]# cd ..
[root@localhost auto]# ls
sda5
[root@localhost auto]#

# 自动挂载光盘镜像
1、修改/etc/iso.auto配置文件:(其它同上)
iso -fstype=iso9660,loop :/root/rhel5.iso

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值