[Gluster-users] NFS - failing mounting subdir
janne at citynetwork.se
Thu Nov 11 10:33:28 UTC 2010
On 11/11/10 11:21, davide f wrote:
> --- Gio 11/11/10, Janne Aho<janne at citynetwork.se> ha scritto:
>> Da: Janne Aho<janne at citynetwork.se>
>> Oggetto: Re: [Gluster-users] NFS - failing mounting subdir
>> A: "Stefano Baronio"<stefano.baronio at gmail.com>
>> Cc: "davide f"<davidef1986 at yahoo.it>, gluster-users at gluster.org
>> Data: Giovedì 11 novembre 2010, 10:53
>> On 11/11/10 10:44, Stefano Baronio
>>> 2010/11/11 davide f<davidef1986 at yahoo.it>
>>>> I'm trying to setup gluster with nfs.If I mount
>> the root directory of
>>>> the share it works just fine, but (for various
>> reasons) I need to mount only
>>>> a subdir of that share (ex. mount
>>>> /mnt/gluster/) but it fails with
>> "reason given by server: No such file or
>>>> directory", that directory, of course, exists into
>> the share.Any ideas on
>>>> how to solve this problem ?
>>> I have the same problem..
>> As far as I can recall, glusterfs uses NFS3 and the mount
>> point is the "root" directory, so the subdirectories won't
>> be directly mountable, I think you need NFS4 to be able to
>> do what you are thinking of.
> I've just tried with the standard linux NFS server and it works also with NFSv3 (mount -o nfsvers=3 192.168.0.244:/tmp/subdir /tmp/test/) so it's not a protocol problem; I think it's a gluster related issue.
On NFS server (NFS3 only):
$ cat /etc/exports
$ ls -ld /var/log/apache2
drwxr-xr-x 2 apache apache 90112 Nov 11 03:11 /var/log/apache2
You see that on the server we export /var/log and we do have a
subdirectory called apache2.
On NFS client (NFS3 mounting):
# mount -o nfsserv=3 peggy:/var/log/apache2 /media
mount.nfs: an incorrect mount option was specified
You see that it fails.
I could add the subdirectory to the nfs exports on the server, then I
could just mount the subdirectory.
I don't think this is a glusterfs issue. I do suggest you do use the
workaround. It could be possible you can modify the exports on the
glusterfs, have to say I haven't been using NFS on glusterfs more than
once for a short testing.
>> A work around would be to mount the whole share to a
>> location on the client which isn't accessible for all users
>> and then bind the directory you wanted to mount to the
>> location where you wanted.
>> Example for fstab:
>> 192.168.0.1:/share /protected/share nfs
>> noauto,nfsvers=3,rw,bg,hard,intr,async 0 0
>> /protected/share /reallocation none bind 0 0
>> -- Janne Aho (Developer) | City Network Hosting AB -
>> Phone: +46 455 690022 | Cell: +46 733 312775
>> EMail/MSN: janne at citynetwork.se
>> ICQ: 567311547 | Skype: janne_mz | AIM: janne4cn | Gadu:
> Gluster-users mailing list
> Gluster-users at gluster.org
Janne Aho (Developer) | City Network Hosting AB - www.citynetwork.se
Phone: +46 455 690022 | Cell: +46 733 312775
EMail/MSN: janne at citynetwork.se
ICQ: 567311547 | Skype: janne_mz | AIM: janne4cn | Gadu: 16275665
More information about the Gluster-users