[Gluster-devel] GlusterFS 1.3.0-pre2.3: glusterfs command option: --server

Anand Babu Periasamy ab at gnu.org.in
Fri Apr 6 00:05:29 UTC 2007


Gerry Reno writes:

> Anand Babu Periasamy wrote:
>> Gerry Reno writes:
>>> Is this a bug with the client command option: --server ? Or is
>>> something else expected as an argument?
>>>
>>> glusterfs -l /var/log/glusterfs.log -L DEBUG --spec-file
>>> /usr/local/etc/glusterfs/test-client.vol --server=192.168.1.25
>>> --port=6996 /mnt/glusterfs0/ #THIS COMMAND DOES NOT WORK
>>>
>>> glusterfs -l /var/log/glusterfs.log -L DEBUG --spec-file
>>> /usr/local/etc/glusterfs/test-client.vol --port=6996
>>> /mnt/glusterfs0/ #THIS COMMAND DOES WORK (run from 192.168.1.25)
>>
>> Hi Gerry,
>> --server option overrides --spec-file to fetch the spec file from
>> the server instead. Also --port requires --server.
>>
>> I fixed it to behave as you expected. Now glusterfs client will
>> error out with an appropriate message for the following cases:
>> * if you combine --spec-file and --server
>> * if you pass --port and not --server
>>
>> Thanks for reporting. Fix is in GNU TLA archive.
> I'm not sure I understand this. If --server is to override
> --spec-file, then how does it know where to find the specfile
> without the --spec-file argument? I mean I could put the specfile
> anywhere.

(Brent already replied correctly..)

If you pass --server, then it asks the GlusterFS server for a spec
file. GlusterFS server picks it up from standard path say
$prefix/etc/glusterfs/glusterfs-client.vol or as described by
glusterfs-server.vol: protocol/server volume: option
client-volume-filename /path/to/glusterfs-client.vol.

Advantage of having glusterfs-client.vol file centrally is to make
updates easier. You don't have push the updates to each client system.

> My original concern was that the combination of --server and --port
> did not work at least not if the specified server was the same as
> the server from which you ran the command.
> In random fiddling with the arguments I was able to find that when I
> left out the --server then the command would work which seemed a
> little odd.

If you want to run the GlusterFS server on a non-standard port, then
you will have to update the client vol spec file too.
 path/to/glusterfs-client.vol:protocol/client: option remote-port PORT

Passing --server and --port to GlusterFS client is just to fetch the
spec file. After fetching, the vol spec file dictates how to connect
back to the server and construct the volume map.

When --server is not passed, --port will be ignored. Because you
additionally passed --spec-file too, it was taken into consideration.
Current TLA fix will prevent you from such combinations. It will guide
you what correct arguments are required and what combinations are
allowed. 

You actually reported a UI bug and it is fixed now.

Thanks,
-- 
Anand Babu 
GPG Key ID: 0x62E15A31
Blog [http://ab.freeshell.org]              
The GNU Operating System [http://www.gnu.org]  






More information about the Gluster-devel mailing list