[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

autofs to mount nfs exports



Hi,

I'm trying to get the following to work on Debian Squeeze 6.6

/etc/auto.master:
/-      /etc/auto.nfs --ghost

/etc/auto.nfs
/mnt/nfs1 -fstype=ext3 :/dev/quadstor/M1

/etc/exports:
/mnt/nfs1 10.0.13.0/255.255.255.0(rw,no_root_squash,no_subtree_check)

What I'm trying to achieve above is that whenever a nfs client tries to mount /mnt/nfs1 /dev/quadstor/M1 is automatically mounted.

Now the error i get on the client is
[root@localhost quadstor]# mount -t nfs debian66:/mnt/nfs1 /mnt/iso/
mount: debian66:/srv/nfs1 failed, reason given by server: Permission denied

Also exportfs gives the following warning
# exportfs -a
exportfs: Warning: /mnt/nfs1 does not support NFS export.

At that time df does not list /mnt/nfs1

However the following works

root@debian66:/home/quadstor# cd /mnt/nfs1/
root@debian66:/mnt/nfs1# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/vda1              5886256   1207952   4379296  22% /
tmpfs                   513416         0    513416   0% /lib/init/rw
udev                    508120       132    507988   1% /dev
tmpfs                   513416         0    513416   0% /dev/shm
/dev/sda             103212320    192252  97777188   1% /mnt/nfs1

[root@localhost quadstor]# mount -t nfs debian66:/mnt/nfs1 /mnt/iso/

The behavior of exportfs/nfs-server is different than CentOS 6. On CentOS for the same configuration

[root@kvm1 rules.d]#exportfs -a

[root@kvm1 rules.d]# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/vg_kvm1-lv_root
                      38744716   6039388  30737200  17% /
tmpfs                   768388         0    768388   0% /dev/shm
/dev/vda1               495844     23521    446723   6% /boot
/dev/sda             103212320    192248  97777192   1% /mnt/nfs1

It seems that running exportfs is sufficient to automatically mount /mnt/nfs1

Which behavior is correct ? The same configuration fails on SLES 11. So far only CentOS 6.x worked. I haven't checked with CentOS 5

Am i doing something wrong here ?

Thx

Reply to: