Soul Makossa wrote: > I'm trying to get the following to work on Debian Squeeze 6.6 Although I have previously used the autofs automounter quite a bit now time has passed and my memory has grown vague. But seeing no one else with an answer I will respond hoping to be helpful. > /etc/auto.master: > /- /etc/auto.nfs --ghost > > /etc/auto.nfs > /mnt/nfs1 -fstype=ext3 :/dev/quadstor/M1 That doesn't look right to me. Are you trying to export a device that is itself automounted? I didn't think that was ever supported. I thought you could only export a device that was hard mounted. In any case you can't daisy-chain nfs mount a device that is already presented as an nfs mount. And I believe an automounted device is presented as an nfs mount. At least that is how it used to be. YMMV. > /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. You are trying to have machine A automount machine B and on machine B have it automount a device? As far as I know that behavior does not work and is not supported. > 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 That is definitely going to be a problem. You can't export it unless it is mounted. If it isn't mounted then it can't be exported. > [root@localhost quadstor]# mount -t nfs debian66:/mnt/nfs1 /mnt/iso/ Normally it is not necessary to specify the "-t nfs" option like that. Simply mount the filesystem. Simple is better. mount 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 Are you sure that it wasn't already mounted there? An autofs mounted filesystem presents itself as an nfs filesystem even if it is a local device. It eats its own dogfood and interfaces with the system as an nfs device. This means that an autofs mounted device hasn't been able to be presented again for export. Can't daisy-chain nfs mount an nfs device. Probably CentOS is using a different scheme entirely that isn't autofs to mount that device. If it ends up being mounted directly without an nfs layer then it can be exported. > Am i doing something wrong here ? If you pardon the statement, yes, it looks to me like something isn't right. It looks to me like you are trying to set up an autofs direct map to mount an automounted filesystem. But it has been long enough that I would need to go back and learn all about autofs again in order to know the details. So very sorry but I can't say anything solid. Hopefully someone else will have solid information about your problem. Bob
Attachment:
signature.asc
Description: Digital signature