[Gluster-users] Problem with glusterd init.d stop
Xavier Hernandez
xhernandez at datalab.es
Mon Nov 11 11:01:00 UTC 2013
El 11/11/13 11:22, Emir Imamagic ha escrit:
> Hello,
>
> thanks for the info. Few questions inline below.
>
> On 11.11.2013. 10:55, Xavier Hernandez wrote:
>> the glusterfs process is the responsible of managing a mount point and
>> it is started by the mount operation, not by the glusterd daemon. A
>> glusterfs process will be started for each mount of the volume and it
>> will be stopped once the volume is umounted.
>
> Sorry, I should have been more precise here. I was talking about the
> NFS glusterfs process which is started by glusterd on each brick if
> the NFS is enabled:
> /usr/sbin/glusterfs -s localhost --volfile-id gluster/nfs -p
> /var/lib/glusterd/nfs/run/nfs.pid -l /var/log/glusterfs/nfs.log -S
> /var/run/c51406652e9e402c096101f64f8cba58.socket
>
> This process doesn't get stopped even with the glusterfsd init.d
> script stop.
>
I only though about fuse, sorry.
In this case, init.d scripts cannot stop NFS or self-heal daemons. These
processes are bounded to the volume and they will only stop when the
volume is stopped. NFS can also be stopped with a 'gluster volume set
<volname> nfs.disable on', but this will disable NFS on all servers.
>> To manually stop all gluster processes, you should do this:
>>
>> 1. Umount the volume
>> 2. Execute 'gluster volume <volname> stop' or '/etc/init.d/glusterfsd
>> stop'
>> 3. Execute '/etc/init.d/glusterd stop'
>>
>> Note that if you stop the volume with 'gluster volume <volname> stop',
>> it won't automatically start when glusterd is started again, a manual
>> 'gluster volume <volname> start' will be needed. However a 'glusterfsd
>> stop' will kill all glusterfsd processes from all volumes.
>
> Stopping the whole volume is a bit too invasive. In case of failover
> setup one might not want to stop the whole volume, but just gracefully
> bring down a single brick (glusterd and all volumes attached to it). I
> guess the right way is to use both glusterfsd and glusterd init.d
> scripts for stopping and only glusterd for starting (assuming the
> volume wasn't stopped of course)?
>
If you want to gracefully stop the bricks of a server, you only need to
stop the glusterfsd. This will prevent any access to the physical disks
and you can do any maintenance on the disks. You don't need to stop the
NFS process because it can still work using other bricks (if the volume
is replicated) and some clients might be already connected to it. Also,
glusterd can be left running to be able to participate in other
management operations (volume modifications, start, stop, ...). If you
really want to bring down the server, you will need to stop glusterd and
manually kill the remaining processes, or directly shutdown the server.
I don't know any better way.
Best regards,
Xavi
More information about the Gluster-users
mailing list