autofsを利用してnfsマウントのメモ
1 2 3 4 5 6 7 8 9 |
[root@host1 ~]# cat /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). # # nfs /backup /etc/auto.nfs --timeout 60 |
1 2 |
[root@host1 ~]# cat /etc/auto.nfs server01 -nfsvers=3,tcp,hard,intr 192.168.1.10:/nfs/server01 |
autofsの自動起動
1 2 3 4 5 6 |
[root@host1 ~]# chkconfig autofs on [root@host1 ~]# chkconfig --list | grep autofs autofs 0:off 1:off 2:on 3:on 4:on 5:on 6:off [root@host1 ~]# /etc/init.d/autofs start Loading autofs4: [ OK ] Starting automount: [ OK ] |
/backupはautofsが作成するので事前に作成する必要はない(はず)