Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#16 コメント 14 件 リアクション 5 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
linux, shell

調査の方向性

/etc/runit/3 と、報告された /etc/rc.pre-shutdown スクリプトを読んで始めます。nfs、nfs4、または cifs のマウントを使ってシャットダウンを再現し、サービスのシャットダウンとマウント処理の順序を追跡します。強制電源オフを必要とせず、シャットダウンが完了する前にネットワーク共有がアンマウントされるか読み取り専用で再マウントされれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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
主要言語
C
スター
245
フォーク
67
平均マージ
2日
マージ済み PR(30日)
2

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

void-linux/void-runit のほかの issue

void-linux/void-runit の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。