インストールは自動的に失敗します。デバッグして修正する方法は?

インストールは自動的に失敗します。デバッグして修正する方法は?

/dev/md1ext2を持つ(n MD)デバイスがあります/boot。ただし、/bootそのデバイスが属する場所にはマウントできません。

# mount | grep boot
Exit 1
# mount | grep md1
Exit 1

# fsck /dev/md1
fsck from util-linux 2.23.2
e2fsck 1.42.9 (28-Dec-2013)
/dev/md1: clean, 362/40960 files, 121097/163696 blocks

# mount -v /dev/md1 /boot
mount: /dev/md1 mounted on /boot.
# ll /boot/
total 0
# umount -v /boot
umount: /boot: not mounted
# umount /dev/md1
umount: /dev/md1: not mounted

他の場所にデバイスを取り付けると、次のことができます。

# ll /mnt/tmp/ | wc 
      1       2       8
# mount -v /dev/md1 /mnt/tmp
mount: /dev/md1 mounted on /mnt/tmp.
# ll /mnt/tmp/ | wc 
     35     308    2811
# umount /mnt/tmp
umount: /mnt/tmp (/dev/md1) unmounted
umount: /mnt/tmp: not mounted
Exit 32

何が問題なのでしょうか?

表示して更新してくださいこの同様の質問:何かがパーティションをすぐにマウント解除しています。

# mount -v /dev/md1 /boot ; ll /boot/ | wc; sleep 0.1; ll /boot/| wc 
mount: /dev/md1 mounted on /boot.
     35     308    2811
      1       2       8

systemdバックグラウンドで削除できます。私はまだ何をすべきかわかりません。 systemctl daemon-reload役に立ちません。文字列またはをsystemctl status含めません。/bootmount

アップデート2:

# systemctl list-unit-files -t mount
UNIT FILE                     STATE   
dev-hugepages.mount           static  
dev-mqueue.mount              static  
proc-fs-nfsd.mount            static  
proc-sys-fs-binfmt_misc.mount static  
sys-fs-fuse-connections.mount static  
sys-kernel-config.mount       static  
sys-kernel-debug.mount        static  
tmp.mount                     disabled
var-lib-nfs-rpc_pipefs.mount  static  

9 unit files listed.

したがって、ここには何もありませんboot。しかし(私にはこれまで)隠されたユニットがありますboot.mount

# journalctl -u boot.mount | filter-lines-by-hand
Jan 12 09:57:46 server systemd[1]: Unit boot.mount is bound to inactive unit dev-md-1.device. Stopping, too.
Jan 12 09:57:46 server systemd[1]: Unmounting /boot...
Jan 12 09:57:46 server umount[3069]: umount: /boot: target is busy.
Jan 12 09:57:46 server umount[3069]: (In some cases useful info about processes that use
Jan 12 09:57:46 server umount[3069]: the device is found by lsof(8) or fuser(1))
Jan 12 09:57:46 server systemd[1]: boot.mount mount process exited, code=exited status=32
Jan 12 09:57:46 server systemd[1]: Failed unmounting /boot.
Jan 12 09:57:46 server systemd[1]: Unit boot.mount is bound to inactive unit dev-md-1.device. Stopping, too.
Jan 12 09:57:46 server systemd[1]: Unmounting /boot...
Jan 12 09:57:46 server umount[3071]: umount: /boot: target is busy.
Jan 12 09:57:46 server umount[3071]: (In some cases useful info about processes that use
Jan 12 09:57:46 server umount[3071]: the device is found by lsof(8) or fuser(1))
Jan 12 09:57:46 server systemd[1]: boot.mount mount process exited, code=exited status=32
Jan 12 09:57:46 server systemd[1]: Failed unmounting /boot.
Jan 12 09:57:46 server systemd[1]: Unit boot.mount is bound to inactive unit dev-md-1.device. Stopping, too.
Jan 12 09:57:46 server systemd[1]: Unmounting /boot...
Jan 12 09:57:46 server umount[3073]: umount: /boot: target is busy.
Jan 12 09:57:46 server umount[3073]: (In some cases useful info about processes that use
Jan 12 09:57:46 server umount[3073]: the device is found by lsof(8) or fuser(1))
Jan 12 09:57:46 server systemd[1]: boot.mount mount process exited, code=exited status=32
Jan 12 09:57:46 server systemd[1]: Failed unmounting /boot.
Jan 12 09:57:46 server systemd[1]: Unit boot.mount is bound to inactive unit dev-md-1.device. Stopping, too.
Jan 12 09:57:46 server systemd[1]: Unmounting /boot...
Jan 12 09:57:46 server systemd[1]: Unmounted /boot.
Jan 12 09:57:46 server systemd[1]: Unit boot.mount entered failed state.

はい。静かで面倒なsystemd私の/bootパーティションをアンマウントしています。systemdアップデートがインストールされていない状態でどのように機能するかを「考える」と思います。

復活できますか?

# systemctl restart boot.mount
Authorization not available. Check if polkit service is running or see debug message for more information.
(approx. 2 minute wait)
A dependency job for boot.mount failed. See 'journalctl -xe' for details.
Exit 1

# journalctl -u boot.mount | tail -2
Jan 12 10:07:26 server systemd[1]: Dependency failed for /boot.
Jan 12 10:07:26 server systemd[1]: Job boot.mount/start failed with result 'dependency'.

本当にjournalctl -xeそのようなニュースがありました。

Unit dev-md-1.device has failed.

それでは、残りの唯一の質問は、systemdmd1が実際に良いことをしていることをどうやって知ることができるかということです。これはサーバーなので、再起動したくありません。

アップデート3:

md1デバイスが本当にかなり良いとsystemdに伝えてください。

# systemctl reset-failed dev-md-1.device
Authorization not available. Check if polkit service is running or see debug message for more information.
# systemctl reset-failed \*
Authorization not available. Check if polkit service is running or see debug message for more information.
# mount -v /dev/md1 /boot ; ll /boot/ | wc ; sleep 0.1 ; ll /boot/ | wc
mount: /dev/md1 mounted on /boot.
     35     308    2811
      1       2       8

失敗しました。また失敗しました。

# systemctl start dev-md-1.device
Authorization not available. Check if polkit service is running or see debug message for more information.
(approx. 2 minute wait)
Job for dev-md-1.device timed out.
Exit 1
# journalctl -u boot.mount | tail -4
Jan 12 15:19:19 server systemd[1]: Unit boot.mount is bound to inactive unit dev-md-1.device. Stopping, too.
Jan 12 15:19:19 server systemd[1]: Unmounting /boot...
Jan 12 15:19:19 server systemd[1]: Unmounted /boot.
Jan 12 15:19:19 server systemd[1]: Unit boot.mount entered failed state.

解決策:

# mount /dev/md1 /boot ; cd /boot ; nohup sleep 99000h < /dev/null > & /dev/null &

/bootこれにより、デバイスが使用中であるため、マウント解除できないようにCWDでプロセスが開始されますsystemd/bootただし、systemd1分ごとに18000行以上のエラーメッセージがログに生成されます。

# journalctl -u boot.mount | fgrep 15:28: | awk '{ print $6 " " $7 " " $8 " " $9 " " $10 " " $11 " " $12 " " $13 " " $14 }' | sort | uniq --count
   1054 boot.mount mount process exited, code=exited status=32   
   4502 Failed unmounting /boot.      
   1792 (In some cases useful info about processes that use
   3279 the device is found by lsof(8) or fuser(1)) 
   5277 umount: /boot: target is busy.    
   1053 Unit boot.mount is bound to inactive unit dev-md-1.device. Stopping,
   1053 Unmounting /boot...       

わずか1分で同じ行の数です!

ベストアンサー1

この問題を解決するには:

  1. システムの「mount」タイプのすべてのユニットファイルを一覧表示します。

    systemctl リスト単位ファイル -t マウント

  2. 「boot.mount」のようなものを探してください。

  3. ジャーナルで組織を監視する

    Journalctl -u boot.mount -f

  4. ファイルシステムをマウントしてみてください

おすすめ記事