Masalahnya
Sistem tidak dapat melakukan boot-up dengan benar dengan log di bawah ini:
[ 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.
Ini menunjukkan bahwa pemindaian PV LVM2 gagal dimulai yang juga kehabisan waktu menunggu perangkat dev-disk-by\x2dlabel-DBORA.device. Setelah mencoba menonaktifkan lvmetad dan membangun kembali initramfs dan kemudian melakukan reboot, boot sistem macet dengan log di bawah ini:
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
Setelah memasukkan kata sandi root untuk menampilkan detail status 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.
Solusinya
Volume logis (/ dev/VolGroup/LogicalVolume) tidak dapat diaktifkan karena volume fisik yang hilang terkait dengan grup volume. Melihat /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 } }
Volume fisik /dev/xvdf1 ditandai sebagai hilang yang menyebabkan masalah aktivasi volume logis VolGroup/LogicalVolume yang mengakibatkan kegagalan start-up lvm2-activation-net.service.
Menggunakan vgextend, pulihkan perangkat yang ditandai sebagai hilang. Setelah perangkat ditandai sebagai hilang (seperti jika tidak dapat ditemukan selama pemindaian dan grup volume diaktifkan dalam mode "sebagian"), perangkat mungkin perlu dipulihkan secara manual. Perintah vgextend --restoremissing dapat melakukan ini.
CATATAN :Resolusi ini hanya berlaku untuk situasi di mana perangkat ditandai sebagai hilang, tetapi sebenarnya tersedia, berisi metadata yang diharapkan, dan muncul di output pemindaian lvm.# vgextend --restoremissing VolGroup /dev/xvdf1 Volume group "VolGroup" successfully extended
Aktifkan volume Logika:
# lvchange -ay /dev/VolGroup/LogicalVolume [ 1552.936304] systemd-fsck[11319]: DBORA: clean, 182121/3932160 files, 10770808/15728640 blocks
Periksa apakah lvm2-acivation-net.service dapat dimulai tanpa kesalahan:
# systemctl start lvm2-activation-net.service # systemctl status lvm2-activation-net.service
Mulai ulang sistem:
# shutdown -r now