I have Linux Centos 7.
My server keeps booting in emergency mode:
xfs (dm-0): failed to recover intents
journalctl gives me: Failed to mount /sysroot
Mounting /dev/dm-0 fails to mount.
I'm trying to use xfs_repair but:
xfs_repair /dev/dm-0 xfs_repair: cannot open /dev/dm-0: Device or resource busy
So I tried to unmount it.
umount /dev/dm-0 umount: /dev/dm-0: not mounted
I went ahead and tried to kill all active processes on the mountpoint.
So I did:
dmsetup table vg_cpanel-lv-root (252:2) vg_cpanel-swap dmsetup remove vg_cpanel-lv_root device-mapper: remove ioctl on vg_cpanel-lv_root failed: Device or resource busy.
Trying to find the PID on 252:2.
lsof | grep 252,2 lsof: command not found. sudo lsof | grep 252,2 sudo: command not found.
Going in circles here. Why can't I use lsof in emergency mode and is there an alternative?