cleanest way to restart the client process ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Here is a personal script I use to check all related processes (open
FD/cwd) on a dir (and its subdirectories) -- specifically written to
address the exact issue you are facing. lsof over a crashed mountpoint
does not work since it stat()'s the dead mountpoint. This script uses
/proc instead. Hope this helps -

--snip--
amp:~$ cat /home/avati/bin/whodir
#!/bin/sh

DIR=$1

find /proc 2>/dev/null | grep -E 'cwd|exe' | xargs ls -l 2>/dev/null |
grep "> $DIR" | sed 's/  */ /g' | cut -f8 -d' ' | cut -f3 -d/ | sort |
uniq | while read line; do echo $line $(cat /proc/$line/cmdline); done
amp:~$
--snip--


Avati

2008/12/17 Daniel Maher <dma+gluster at witbe.net>:
> Hello all,
>
> When the Gluster client config changes, or (sadly) when the Gluster
> client process crashes entirely, what is the best way to reload Gluster
> ?  For example, after a crash, i get the dreaded ? transport endpoint
> not connected ? message, and am left without a clean way to resume
> normal activities.
>
> I ask because, normally, the Gluster mountpoint is ? in use ?, so the
> kernel refuses to unmount the partition.  I can (and have) gone through
> the process list with a fine-tooth comb and killed off every process
> that might be touching mount, but it's clunky and time-consuming - and i
> tend to anger the developers when exit their sessions without warning. :P
>
> Rebooting is a sure-fire solution, but, of course, this has obvious
> downsides as well.
>
> Does anybody have a more elegant way to go about reloading the client
> process - especially in the case of crashes ?
>
> --
> Daniel Maher <dma+gluster AT witbe DOT net>
>
> _______________________________________________
> Gluster-users mailing list
> Gluster-users at gluster.org
> http://zresearch.com/cgi-bin/mailman/listinfo/gluster-users
>



[Index of Archives]     [Gluster Development]     [Linux Filesytems Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux