0

After a powercut, my centosOS7 server boots into emergency mode. systemctl reboot and systemctl default lands me back at the same point.

I've run the following commands and taken photos of the results:

cat /etc/fstab
fdisk -lu
pvs
vgs
lvs

fstab

fdisk

pvs-vgs-lvs

I have no clue about linux, is the problem obvious?

journalctl -xb gives a large amount of data, I've taken photos of the red lines:

1 2 3 4

1
0

Your Megento service is broken and causing a failure to boot, I would suggest disable the service from starting and then boot your system to debug the system.

0

Currently, the system expects a LV named home to also exist in the centos_magento VG, but it does not seem to be present.

As a workaround to get the system to boot fully, you might edit /etc/fstab to comment out the line referring to /home. With that line commented out, the system should get past this point, but obviously the home directories of any normal user accounts would be missing, as /home would just be an empty directory on the root filesystem that is normally used to mount the home LV.

Since there are no messages about missing LVM PVs, it seems like the LV may have been deleted with lvremove /dev/mapper/centos_magento-home or lvremove /dev/centos_magento/home (new and old LVM device name syntax, respectively).

If you need to undo the LV remove operation, /etc/lvm/archive should contain an archive of previous VG configurations. You might be able to use vgcfgrestore to go back to the previous version of the VG configuration for the centos_magento VG.

If the issue_discards option in /etc/lvm/lvm.conf was not enabled while the LV was deleted, the data should be still there on the physical disk surface unless it was overwritten, and just restoring the previous version of the VG configuration might completely fix the problem and allow you to uncomment the /home filesystem line in /etc/fstab again.

0

I found some issues in /var/log/boot.log that pointed me to an issue with the home directory.

Unlike / and swap, /home was missing for me when I looked at lvs, and home was not mounted when I looked at mount.

Executing the vgchange -ay command works for me. /home was mounted after executing the vgchange -ay command.

0
  1. boot from an iso with same major release version, latest minor if possible.
  2. go into rescue mode, then go straight to shell
  3. lvscan to get path to logical volumes
  4. lvchange -ay for each found logical volumes
  5. fsck -y for each of the found logical volumes

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.