Boot failure, XFS won't mount!

General support questions
Post Reply
techana
Posts: 5
Joined: 2018/09/14 07:39:43

Boot failure, XFS won't mount!

Post by techana » 2023/07/09 15:57:15

My home server failed to boot. It displays the following on the console:
Image

I did a repair dry-run (xfs_repair -n) and got the following:
Image

Any suggestion before attempting the actual repair? Should I, for example, backup the XFS metadata using xfs_metadump, or image the entire drive using Clonezilla?

Thank you!

User avatar
TrevorH
Site Admin
Posts: 33221
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Boot failure, XFS won't mount!

Post by TrevorH » 2023/07/09 17:15:56

Backups never hurt.

First step (after any backup!) would be to boot rescue media and try to mount the filesystem to see if it will replay the log it talks about.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

techana
Posts: 5
Joined: 2018/09/14 07:39:43

Re: Boot failure, XFS won't mount!

Post by techana » 2023/07/10 11:19:48

This server provides DNS, Plex and backup storage services for other devices in my home network. It has a PERC H700 card configured as RAID 10. It's the first time I have experienced an XFS failure and have to proceed carefully about it.

Should I attempt to repair the XFS drive before trying to mount it? I'm afraid that booting the server from a rescue media and mounting the drive would alter the XFS' metadata or log data and negativity affect the repair process later on!

User avatar
TrevorH
Site Admin
Posts: 33221
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Boot failure, XFS won't mount!

Post by TrevorH » 2023/07/10 11:25:44

I don't really use xfs but from what I gather, part of the fsck equivalent will tell you that it will not run because there are pending transactions in the log data that need to be processed first - your second screenshot shows this as it says there are metadata changes held in the log. And the way to process those is to mount the filesystem. If you cannot mount it then you will probably have to run xfs_repair anyway and discard those log entries and potentially lose whatever those updates were. So if this were my filesystem I would do the following

back it up - maybe take a dd image copy
attempt to mount it
if the mount works then umount then run xfs_repair
if the mount fails then you probably have to run xfs_repair anyway and lose the pending log metadata
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

techana
Posts: 5
Joined: 2018/09/14 07:39:43

Re: Boot failure, XFS won't mount!

Post by techana » 2023/07/14 13:27:50

I've successfully recovered the server without losing any data. Here is how I did it:

1. Booted a live CD (systemrescue-10.01-amd64.iso)
2. Backed up the data partition into an image on an external drive using ddrescue
3. Fixed the backup image using: xfs_repair -L (you may try it first without -L)
4. Mounted the backup image and copied the data to another external drive.
5. After securing the data, I ran xfs_repair -L on the original data partition.
6. The system operated normally after rebooting.

Post Reply