Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

network shares hang on restart / shutdown - consequence: hard shutdown required

Aperta
#16 14 commenti 5 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
30/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
linux, shell

Direzione di ricerca

Inizia leggendo /etc/runit/3 e lo script /etc/rc.pre-shutdown segnalato. Riproduci lo spegnimento con mount nfs, nfs4 o cifs e traccia l’ordine di arresto dei servizi e di gestione dei mount. Il lavoro è completato quando le condivisioni di rete vengono smontate o rimontate in sola lettura prima del completamento dello spegnimento, senza richiedere uno spegnimento forzato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Hi,

If I have mounted network shares (nfs, nfs4, cifs), these are unable to be unmounted / re-mounted as read during shutdown / restart, consequently the shutdown process hangs and I need to do a forced shutdown. The reason is that in /etc/runit/3 the network services are taken offline before before the drives are unmounted / re-mounted as read occurs.

I've created my own /etc/rc.pre-shutdown script (below) that is called by /etc/runit/3 before the services are closed that unmounts / re-mounts as read the network shares. This works.

Apologies if I've missed an obvious option / setting that renders my "fix" not needed, I'm just an enthusiastic Linux user, as opposed to developer.

Hope this is useful for someone.

Rob

echo "   trying to unmount network shares..."

umount -a -r -t nfs,nfs4,cifs

if grep -qs -e 'nfs ' -e 'nfs4 ' -e 'cifs ' /proc/mounts; then
   echo
   echo "...... failed to unmount network some network shares ......"
   rem_shares=$(grep -e 'nfs ' -e 'nfs4 ' -e 'cifs ' /proc/mounts)
   if echo $rem_shares | grep -qs 'rw,'; then
         echo "failed to mount read only as well"
         echo "will attempt forced, lazy unmount"
         echo "if this hangs then will need to hard shutdown..."
         umount -a -f -l -t nfs,nfs4,cifs
   elif echo $rem_shares | grep -qs 'ro,'; then
         echo "shares were mounted read only instead."
         echo "hopefully this is ok. If hangs...hard shutdown required"
   else
         echo "I should not be here..."
   fi
   echo
fi
Lingua principale
C
Stelle
245
Fork
67
Merge medio
2g
PR unite (30g)
2

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di void-linux/void-runit

Tutte le issue di void-linux/void-runit

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.