[Gluster-users] XenServer and Glusterfs 3.1
Michael Patterson
mpatterson at superb.net
Wed Dec 8 22:23:13 UTC 2010
Hi Shehjar,
I'm currently running gluster 3.1.1 on Centos 5.5 x64 and I am unable to
mount NFS subdirectories from xenserver. Was support for this feature added
in gluster 3.1.1? I've also tried using various options defined here, with
no luck:
http://gluster.org/faq/index.php?sid=2118&lang=en&action=artikel&cat=5&id=55&artlang=en
Like Stefano, I'm using the 'option nfs.port 2049*'*' in my
/etc/glusterd/nfs/nfs-server.vol configuration. Xenserver can create the SR,
but it cannot mount the subdirectory (see below).
---------------------
# glusterd -V
glusterfs 3.1.1 built on Nov 29 2010 10:07:44
Mounting SR subdirectory from xenserver fails:
---------------------------
# mount 10.0.0.1:/vol0/2e8a14e9-83d6-6e68-7c1a-464e6691988b /mnt
mount: 10.0.0.1:/vol0/2e8a14e9-83d6-6e68-7c1a-464e6691988b failed, reason
given by server: No such file or directory
---------------------------
However, mounting JUST the vol0 directory works:
---------------------------
# mount 10.0.0.1:/vol0 /mnt
# ls -l /mnt/
total 8
drwxr-xr-x 2 root root 4096 Dec 8 11:40
2e8a14e9-83d6-6e68-7c1a-464e6691988b
---------------------------
Any insight into this is much appreciated. Thanks!
Mike
On Thu, Nov 11, 2010 at 3:15 AM, Shehjar Tikoo <shehjart at gluster.com> wrote:
> Davide Ferri wrote:
>
>> I've the same issue.
>> Of course it works (both nfsv3 and nfsv4) with the standard NFS
>> deamon. If you share /media you can mount /media/subdir1 (if exists)
>> without any change to the /etc/exports.
>>
>
> Thanks. I understand that now. Thats not hard to fix. We'll try squeezing
> it into 3.1.1 release.
>
> -Shehjar
>
>
>> Davide
>>
>> On Thu, Nov 11, 2010 at 11:47 AM, Shehjar Tikoo <shehjart at gluster.com>
>> wrote:
>>
>>> Stefano Baronio wrote:
>>>
>>>> Thank you Shehjar,
>>>> as we are planning to use glsuterfs in a production environment, we
>>>> prefer to stay with the 3.1 stable version.
>>>> As for now the port forwarding seems to work properly, because
>>>> XenServer,
>>>> after the testing step on port 2049, correctly connects to the nfs
>>>> share
>>>> using the right ports.
>>>> I just have the problem that I cannot mount a NFS share subdirectory.
>>>> XenServer, when creating the sr, makes a new directory (the sr uuid)
>>>> just
>>>> under the share root and put its VM file under that directory.
>>>> When mounting that subdir, Glusterfs returns the "No such file or
>>>> directory" error.
>>>>
>>> Thats because by default Gluster NFS only exports volumes as NFS exports
>>> not
>>> the directories inside those volumes.
>>>
>>> How does this work with knfs? Even that will return the same error
>>> because
>>> the newly created directory will not exist in /etc/exports.
>>>
>>> Thanks
>>> -Shehjar
>>>
>>>
>>> Thank you
>>>> Stefano Baronio
>>>>
>>>> 2010/11/11 Tikoo <shehjart at gluster.com <mailto:shehjart at gluster.com>>
>>>>
>>>> Yes. That was a limitation on 3.1 release and is already fixed in
>>>> mainline. This support allows you to change the nfs port number that
>>>> Gluster NFS uses by default. It'll be available in 3.1.1 but if
>>>> you'd like to test right away, please use 3.1.1qa5 by checking it
>>>> out from the repository:
>>>>
>>>> $ git clone git://git.gluster.com/glusterfs.git
>>>> <http://git.gluster.com/glusterfs.git>
>>>> $ cd glusterfs
>>>> $ git checkout -b v3.1.1qa5 3.1.1qa5
>>>>
>>>> Then build and install.
>>>>
>>>> To change the nfs port, locate the volume section nfs/server in
>>>> /etc/glusterd/nfs/nfs-server.vol and add the following line:
>>>>
>>>> option nfs.port 2049
>>>>
>>>> Note that this option is not yet available in the gluster CLI, so
>>>> you'll have to manually edit this file and restart the gluster nfs
>>>> daemon. Be careful while using that tool, because on a restart of a
>>>> volume using gluster CLI, your edited volume file will get
>>>> over-written with the default version.
>>>>
>>>>
>>>> Thanks
>>>> -Shehjar
>>>>
>>>> Stefano Baronio wrote:
>>>>
>>>> Hello all,
>>>> I'm new to the list and I'm working on glusterfs since a month
>>>> right now.
>>>> I'm posting a request about how to get XenServer working with
>>>> Glusterfs.
>>>>
>>>> I have a standard setup of both XenServer and Glusterfs.
>>>> I can mount the glusterfs nfs share from the Xen CLI, write in
>>>> it and mount
>>>> it as an ISO library as well.
>>>> I just can't mount it for storage purpose.
>>>> It seems that XenServer is testing the NFS share directly to
>>>> port 2049,
>>>> without checking with portmapper.
>>>>
>>>> I have tried to make glusterfs listen on port 2049 without any
>>>> success, so I
>>>> have setup a port forwarding on the gluster server.
>>>> Lets say:
>>>> xen01 - 192.168.14.33
>>>> xenfs01 (gluster nfs) - 192.168.14.61
>>>>
>>>> The iptables settings are:
>>>> iptables -A PREROUTING -d 192.168.14.61 -p tcp -m tcp --dport
>>>> 2049 -j DNAT
>>>> --to-destination 192.168.14.61:38467 <http://192.168.14.61:38467>
>>>> iptables -A FORWARD -d 192.168.14.61 -p tcp -m tcp --dport 38467
>>>> -j ACCEPT
>>>>
>>>> Now XenServer can correctly test the gluster nfs share. It
>>>> creates the
>>>> sr-uuid directory in it, but it can't mount it, with the
>>>> following error:
>>>> FAILED: (errno 32) stdout: '', stderr: 'mount:
>>>> xenfs01:/xenfs/1ca32487-42fe-376e-194c-17f78afc006c failed,
>>>> reason given by
>>>> server: No such file or directory
>>>>
>>>> Any help appreciated.
>>>> Thank you
>>>>
>>>> Stefano
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------
>>>>
>>>> _______________________________________________
>>>> Gluster-users mailing list
>>>> Gluster-users at gluster.org <mailto:Gluster-users at gluster.org>
>>>> http://gluster.org/cgi-bin/mailman/listinfo/gluster-users
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>> Gluster-users mailing list
>>> Gluster-users at gluster.org
>>> http://gluster.org/cgi-bin/mailman/listinfo/gluster-users
>>>
>>>
> _______________________________________________
> Gluster-users mailing list
> Gluster-users at gluster.org
> http://gluster.org/cgi-bin/mailman/listinfo/gluster-users
>
--
Michael Patterson, Systems Engineer
mpatterson at superb.net * 888-354-6128 x 4317
Superb Internet Corp. - www.superb.net
Web Hosting "Ahead of the Rest"(R), since 1996
More information about the Gluster-users
mailing list