0

I'm trying to troubleshoot some issues with multiple database engines crashing and logs suggesting corruption while reading from disk, so I'm running xfs_repair on a 2TB NVMe which contains the files.

However the program runs instantly which doesn't seem right, surely this should take some time to run?

# time xfs_repair /dev/nvme1n1
Phase 1 - find and verify superblock...
Phase 2 - using internal log
        - zero log...
        - scan filesystem freespace and inode maps...
        - found root inode chunk
Phase 3 - for each AG...
        - scan and clear agi unlinked lists...
        - process known inodes and perform inode discovery...
        - agno = 0
        - agno = 1
        - agno = 2
        - agno = 3
        - process newly discovered inodes...
Phase 4 - check for duplicate blocks...
        - setting up duplicate extent list...
        - check for inodes claiming duplicate blocks...
        - agno = 0
        - agno = 3
        - agno = 2
        - agno = 1
Phase 5 - rebuild AG headers and trees...
        - reset superblock...
Phase 6 - check inode connectivity...
        - resetting contents of realtime bitmap and summary inodes
        - traversing filesystem ...
        - traversal finished ...
        - moving disconnected inodes to lost+found ...
Phase 7 - verify and correct link counts...
done

real    0m0.060s
user    0m0.033s
sys     0m0.025s
synkyo
  • 101
  • 2

1 Answers1

1

0.06 seconds is quite a long time for a computer...

xfs_repair does not read data, it sanity checks file system metadata. A database might have a small number of files, which is a small number of metadata I/Os. Helps that NVMe storage is typically fast. Yes, xfs_repair is complete when it says done.

Getting to the root cause of corruption problems is not easy. Enlist the help of database and file system support willing to stare at block dumps with you. Sometimes the mystery might remain unsolved for a long time, might need to fix storage hardware, restore or rebuild data, and leave it at that.

John Mahowald
  • 32,050
  • 2
  • 19
  • 34