I had a power failure and lost my server.
Now on boot, my proxmox machine is stuck at: /sbin/fsck.xfs: XFS file system
Tried to manually scan the disk in recovery mode using
root@pve:~#xfs_repair -n /dev/mapper/pve-root
Unfortunately, can't unmount the active device, and thus can't perform the repair.
Found the following fix:
"The fix is to manually start services required for LVM, then run fsck (checking that root is mounted read-only), and reboot.
I've written a script to do this currently located on grid02 and attached (inline here since the forum says it is an invalid file)
=========================================
#!/bin/sh
# Karsten M. Self
# Thu Jan 22 23:18:04 GMT 2009
#
# If we fail fsck on boot we need to enable LVM before we can fsck.
#
/etc/init.d/glibc.sh start
/etc/init.d/mountkernfs.sh start
/etc/init.d/udev start
/etc/init.d/mountdevsubfs.sh start
/etc/init.d/libdevmapper1.02 start
/etc/init.d/lvm start
# Hail Mary fsck
mount -o remount,ro / && e2fsck -y /dev/mapper/pve-root
echo "Check for the smell of burning rubber. You should probably reboot." "
Understand that I need to write the above script, but I need a bit of additional info:
1. Where to write the script? What type of file? Maybe update any of the existing scripts?
2. How to point to the script so it will be loaded before fsck begins?
3. Can I write the script with vim or nano in recovery mode or do I have to use rescue disk?
4. I there any easier way to fix it?
Now on boot, my proxmox machine is stuck at: /sbin/fsck.xfs: XFS file system
Tried to manually scan the disk in recovery mode using
root@pve:~#xfs_repair -n /dev/mapper/pve-root
Unfortunately, can't unmount the active device, and thus can't perform the repair.
Found the following fix:
"The fix is to manually start services required for LVM, then run fsck (checking that root is mounted read-only), and reboot.
I've written a script to do this currently located on grid02 and attached (inline here since the forum says it is an invalid file)
=========================================
#!/bin/sh
# Karsten M. Self
# Thu Jan 22 23:18:04 GMT 2009
#
# If we fail fsck on boot we need to enable LVM before we can fsck.
#
/etc/init.d/glibc.sh start
/etc/init.d/mountkernfs.sh start
/etc/init.d/udev start
/etc/init.d/mountdevsubfs.sh start
/etc/init.d/libdevmapper1.02 start
/etc/init.d/lvm start
# Hail Mary fsck
mount -o remount,ro / && e2fsck -y /dev/mapper/pve-root
echo "Check for the smell of burning rubber. You should probably reboot." "
Understand that I need to write the above script, but I need a bit of additional info:
1. Where to write the script? What type of file? Maybe update any of the existing scripts?
2. How to point to the script so it will be loaded before fsck begins?
3. Can I write the script with vim or nano in recovery mode or do I have to use rescue disk?
4. I there any easier way to fix it?