CentOSに自動マウント(mount)を設定する方法

1./etc/rc.local
mount -o acl,grpquota,usrquota,rw,sync /dev/sda5 /mnt/

2./etc/fstab
/dev/sda6 /opt ext3 defaults,rw,acl 0 0
mount -a

3.autofs
1) vim /etc/auto.master
/test /etc/auto.test

2) mkdir /test
touch /etc/auto.test

3) vim /etc/auto.test
disk7 -fstype=ext3,rw :/dev/sda7

4)service autofs restart

テスト
cd /test/disk7
ls /test/disk7
mount
watch -n 1 mount

Comments are closed.