Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
NFS blocca il client se cade il server.
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Forum di discussione italiano
View previous topic :: View next topic  
Author Message
Kernel78
Moderator
Moderator


Joined: 24 Jun 2005
Posts: 3654

PostPosted: Sat Mar 24, 2007 5:23 pm    Post subject: NFS blocca il client se cade il server. Reply with quote

Ciao ragazzi, stavo facendo prove ed esperimenti vari su un vecchio portatile spostando i file tramite nfs.
Ad un certo punto un mio azzardo ha fatto completamente piantare il portatile (nemmeno i magic sysrq funzionavano) e mi è toccato spegnerlo brutalmente e riavviarlo. Torno alla mia macchina e trovo l'operazione che stava svolgendo tramite nfs completamente piantata, ctrl-c non la infastidiva nemmeno e per killarla ho dovuto usare un bel kill -9

Mi aspettavo che nfs si comportasse più o meno come ssh e in caso di server irraggiungibile si limitasse a dare un timeout, per controllare lo stato della mia macchina ho provato a dare un df per controllare se gli export risultassero ancora montati e df si è piantato dopo aver mandato in output i mount locali (quindi presumo che stesse cercando di controllare proprio gli export nfs) e anche per killare questo è stato necessario un kill -9

A questo punto ho provato a stoppare nfsmount
Code:
# /etc/init.d/nfsmount stop
 * Unmounting NFS filesystems ...
Cannot MOUNTPROG RPC: RPC: Port mapper failure - RPC: Unable to receive
umount: /mnt/nfs: device occupato
 * Error unmounting NFS filesystems                                       [ !! ]
allora ho tento con portmap
Code:
# /etc/init.d/portmap status
Killed
l'ho killata dopo 10 minuti con il solito -9

Evidentemente la mia macchina è rimasta in uno stato "sporco" ma vorrei evitare la modalità windows di risolvere i problemi, sapete aiutarmi in qualche modo ?
_________________
Le tre grandi virtù di un programmatore: pigrizia, impazienza e arroganza. (Larry Wall).
Prima di postare un file togli i commenti con
Code:
grep -vE '(^[[:space:]]*($|(#|!|;|//)))'
Back to top
View user's profile Send private message
GiRa
l33t
l33t


Joined: 07 Apr 2005
Posts: 717

PostPosted: Sun Mar 25, 2007 8:18 am    Post subject: Reply with quote

Ho sempre (con sempre intendo negli anni) avuto questi problemi con il mount in caso di devices che non rispondono bene, questo vale anche per NFS purtroppo.
Mi viene in mente che questo comportamento è un po' strano, ci vorrebbe proprio un bel layer per evitare questi problemi per i devices che non sono direttamente connessi alla macchina.
Back to top
View user's profile Send private message
Kernel78
Moderator
Moderator


Joined: 24 Jun 2005
Posts: 3654

PostPosted: Sun Mar 25, 2007 10:08 am    Post subject: Reply with quote

Ieri notte ho continuato a studiare e cercare e ho scoperto che il client è non "bloccato" ma è in attesa infinita (o quasi), infatti riavviando il server nfs il client ha ripreso a funzionare normalmente non ostante fossero passate alcune ore.
_________________
Le tre grandi virtù di un programmatore: pigrizia, impazienza e arroganza. (Larry Wall).
Prima di postare un file togli i commenti con
Code:
grep -vE '(^[[:space:]]*($|(#|!|;|//)))'
Back to top
View user's profile Send private message
GiRa
l33t
l33t


Joined: 07 Apr 2005
Posts: 717

PostPosted: Sun Mar 25, 2007 10:28 am    Post subject: Reply with quote

Si quello è vero, capita pure se cerchi di fare un
Code:
mount -t nfs ...
senza aver avviato portmap, quando portmap viene avviato il mount risponde ai segnali.
Back to top
View user's profile Send private message
Kernel78
Moderator
Moderator


Joined: 24 Jun 2005
Posts: 3654

PostPosted: Sun Mar 25, 2007 10:30 am    Post subject: Reply with quote

GiRa wrote:
Si quello è vero, capita pure se cerchi di fare un
Code:
mount -t nfs ...
senza aver avviato portmap, quando portmap viene avviato il mount risponde ai segnali.

Da quanto ho capito leggendo man nfs il mount ha un timeout di circa una settimana (10000 minuti).
_________________
Le tre grandi virtù di un programmatore: pigrizia, impazienza e arroganza. (Larry Wall).
Prima di postare un file togli i commenti con
Code:
grep -vE '(^[[:space:]]*($|(#|!|;|//)))'
Back to top
View user's profile Send private message
gutter
Bodhisattva
Bodhisattva


Joined: 13 Mar 2004
Posts: 7162
Location: Aarau, Aargau, Switzerland

PostPosted: Sun Mar 25, 2007 10:37 am    Post subject: Reply with quote

Hai provato a dare un'occhiata alla pagina man di mount:

man mount wrote:

soft This option allows the kernel to time out if the nfs server is
not responding for some time. The time can be specified with
timeo=time. This option might be useful if your nfs server
sometimes doesn't respond or will be rebooted while some process
tries to get a file from the server. Usually it just causes
lots of trouble.

_________________
Registered as User #281564 and Machines #163761
Back to top
View user's profile Send private message
Kernel78
Moderator
Moderator


Joined: 24 Jun 2005
Posts: 3654

PostPosted: Sun Mar 25, 2007 12:04 pm    Post subject: Reply with quote

gutter wrote:
Hai provato a dare un'occhiata alla pagina man di mount

Si si e penso che vada bene per prevenire situazioni come la mia (quando posso testo come si comporta con quell'opzione) ma il man non mi ha aiutato a capire come risolvere la situazione una volta che si viene a creare, ovvero montando senza soft come cavolo fermo il client se il server diventa irraggiungibile ?
_________________
Le tre grandi virtù di un programmatore: pigrizia, impazienza e arroganza. (Larry Wall).
Prima di postare un file togli i commenti con
Code:
grep -vE '(^[[:space:]]*($|(#|!|;|//)))'
Back to top
View user's profile Send private message
djinnZ
Advocate
Advocate


Joined: 02 Nov 2006
Posts: 4831
Location: somewhere in L.O.S.

PostPosted: Sun Mar 25, 2007 1:42 pm    Post subject: Reply with quote

Non ho capito bene il problema, vuoi smontare nfs o vuoi che rc lo faccia?
se non mi sbaglio il comando che viene dato è unmount -art che ovviamente non funziona, un device nfs in timeout può essere smontato solo da root od al più con l'opzione -f (che però lascerebbe tutto "appeso" se ci stai accedendo).
Un workaround potrebbe essere aggiungere -f al secondo umount ed impostare l'uso del timeo=1 all'umount -art iniziale (altrimenti hai una invocazione di mount -o remount,ro con timeout ad una settimana in corso) sempre in netmount.
Per gestirla correttamente devi usare un rc/netmount modificati, non uso più nfs stabilmente, ma se lo trovo lo posto.
_________________
scita et risus abundant in ore stultorum sed etiam semper severi insani sunt:wink:
mala tempora currunt...mater stultorum semper pregna est :evil:
Murpy'sLaw:If anything can go wrong, it will - O'Toole's Corollary:Murphy was an optimist :wink:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Forum di discussione italiano All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum