GNU/Linux >> Linux の 問題 >  >> Cent OS

「LVM2 論理ボリュームのアクティベーションを開始できませんでした」および「ユニット lvm2-activation-net.service が失敗状態になりました」 – CentOS/RHEL 7 の起動の問題

問題

システムが以下のログで正しく起動できません:

[ OK ] Started File System Check on /dev/xvdd.
[ OK ] Started File System Check on /dev/xvdg.
[ OK ] Started File System Check on /dev/xvdb.
[ OK ] Started File System Check on /dev/xvdc.
[ OK ] Started File System Check on /dev/disk/by-label/BOOT.
Mounting /boot...
[ OK ] Mounted /boot.
[FAILED] Failed to start LVM2 PV scan on device 202:65. 
See 'systemctl status lvm2-pvscan@202:65.service' for details.
[FAILED] Failed to start LVM2 PV scan on device 202:81.
See 'systemctl status lvm2-pvscan@202:81.service' for details.
[ TIME ] Timed out waiting for device dev-disk-by\x2dlabel-DBORA.device.
[DEPEND] Dependency failed for File System Check on /dev/disk/by-label/DBORA.
[DEPEND] Dependency failed for /u01.

LVM2 PV スキャンが開始に失敗し、デバイス dev-disk-by\x2dlabel-DBORA.device の待機中にタイムアウトしたことが示されています。 lvmetad を無効にして initramfs を再構築し、再起動を実行すると、システムの起動が次のログで停止します:

Starting Availability of block devices...

[ OK ] Started Availability of block devices.
[FAILED] Failed to start Activation of LVM2 logical volumes. 
See 'systemctl status lvm2-activation-net.service' for details. 

[ OK ] Reached target Remote File Systems (Pre).
[ OK ] Started Cellirqbalance.
Welcome to emergency mode! After logging in, typGive root password for maintenance

root パスワードを入力して systemctl ステータス lvm2-activation-net.service の詳細を表示した後:

lvm2-activation-net.service - Activation of LVM2 logical volumes
Loaded: loaded (/etc/lvm/lvm.conf; bad; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2020-06-29 22:10:58 EDT; 2min 55s ago
Docs: man:lvm2-activation-generator(8)
Process: 6457 ExecStart=/usr/sbin/lvm vgchange -aay --ignoreskippedcluster (code=exited, status=5)
Process: 6447 ExecStartPre=/usr/bin/udevadm settle (code=exited, status=0/SUCCESS)
Main PID: 6457 (code=exited, status=5)

Jun 29 22:10:58 hostname systemd[1]: Starting Activation of LVM2 logical volumes...
Jun 29 22:10:58 hostname lvm[6457]: Refusing activation of partial LV VolGroup/LogicalVolume. Use '--activationmode partial' to override. 
Jun 29 22:10:58 hostname lvm[6457]: 4 logical volume(s) in volume group "VolGroup" now active
Jun 29 22:10:58 hostname systemd[1]: lvm2-activation-net.service: main process exited, code=exited, status=5/NOTINSTALLED
Jun 29 22:10:58 hostname systemd[1]: Failed to start Activation of LVM2 logical volumes.
Jun 29 22:10:58 hostname systemd[1]: Unit lvm2-activation-net.service entered failed state.
Jun 29 22:10:58 hostname systemd[1]: lvm2-activation-net.service failed.

解決策

ボリューム グループに関連付けられた物理ボリュームが見つからないため、論理ボリューム (/dev/VolGroup/LogicalVolume) をアクティブ化できません。 /etc/lvm/archive/VolGroup.cfg を見る:

pv2 {
  id = "s1sKXM-29tw-ArT0-7sKW-C6mE-X8ES-QUbOor"
  device = "/dev/xvdf1" # Hint only <<<<<

  status = ["ALLOCATABLE"]
  flags = ["MISSING"] 
  dev_size = 83881985 # 39.998 Gigabytes
  pe_start = 2048
  pe_count = 10239 # 39.9961 Gigabytes
  }
}

物理ボリューム /dev/xvdf1 が見つからないとマークされているため、論理ボリューム VolGroup/LogicalVolume のアクティブ化の問題が発生し、lvm2-activation-net.service の起動に失敗しました。

vgextend を使用して、行方不明としてマークされたデバイスを復元します。デバイスが見つからないとマークされると (スキャン中にデバイスが見つからず、ボリューム グループが「部分」モードでアクティブ化されている場合など)、手動で復元する必要がある場合があります。 vgextend --restoremissing コマンドでこれを行うことができます。

注意 :この解決策は、デバイスが見つからないとマークされているが、実際には使用可能であり、予期されるメタデータが含まれており、lvm スキャンの出力に表示される場合にのみ適用されます。
# vgextend --restoremissing VolGroup /dev/xvdf1
Volume group "VolGroup" successfully extended

論理ボリュームをアクティブ化:

# lvchange -ay /dev/VolGroup/LogicalVolume
[ 1552.936304] systemd-fsck[11319]: DBORA: clean, 182121/3932160 files, 10770808/15728640 blocks

エラーなしで lvm2-acivation-net.service を開始できるかどうかを確認します:

# systemctl start lvm2-activation-net.service
# systemctl status lvm2-activation-net.service

システムを再起動します:

# shutdown -r now


Cent OS
  1. CentOS / RHEL :Apache httpd サービスをインストールして開始する方法

  2. Nagios サービスを開始できません (CentOS/RHEL)

  3. CentOS/RHEL 7 で論理メモリをホット アドおよび削除する方法

  1. Centos – Apache Httpサーバーの起動に失敗しました– Httpd.serviceに失敗しましたか?

  2. 「polkit code=exited status=1/FAILURE」 – CentOS/RHEL 7 および 8 で PolicyKit の起動に失敗する

  3. CentOS/RHEL 7 および 8 でサービスをマスクまたはマスク解除する方法

  1. CentOS / RHEL 7 :レガシー コマンド service および chkconfig の systemctl 置換

  2. CentOS / RHEL 7 :ftp サーバー (vsftpd) をインストールして構成する方法

  3. CentOS / RHEL 7:vsftpd サービスを開始できません