The output when I run the xfs_repair is attached. The first round of xfs_repair could not be completed. I had to use -L to run it again. After that I assume the remaining files not inside lost+found are 'clean'. But after using for some time, the file system stopped because it had detected file system corruption. On Thu, Feb 2, 2017 at 2:53 AM, Patrick Dung <mpatdung@xxxxxxxxx> wrote: > Hi guys, > > The problem happened in last year. I do not have the corrupted file > system now. But I would like to discuss it. Any comment is welcomed. > > I was using Fedora 24. I had an XFS file system in an hard drive. I > had used some kind of SSD write back caching on top of the hard > drive. > > Somehow the SSD was removed and when the system is rebooted, the XFS > file system could not be mounted. > > I run xfs_repair, it reported some files are corrupted. It had > completed the repair of file system and some files were corrupted. > Then I could mount the filesystem. I started using the existing files > that did not have corruption. After sometime, the file system stopped > again because it detected XFS file system is corrupted. > > Then I run xfs_repair again and it found additional files were still corrupted. > > So I have a question if xfs_repair is able to fully detect all files > that are corrupted by running xfs_repair only once. > > Best regards, > Patrick
# xfs_repair /dev/sdb1 Phase 1 - find and verify superblock... reporting progress in intervals of 15 minutes Phase 2 - using internal log zero log... ERROR: The filesystem has valuable metadata changes in a log which needs to be replayed. Mount the filesystem to replay the log, and unmount it before re-running xfs_repair. If you are unable to mount the filesystem, then use the -L option to destroy the log and attempt a repair. # xfs_repair -L -v /dev/sdb1 Phase 1 - find and verify superblock... reporting progress in intervals of 15 minutes block cache size set to 6109016 entries Phase 2 - using internal log zero log... zero_log: head block 3383280 tail block 3353688 ALERT: The filesystem has valuable metadata changes in a log which is being destroyed because the -L option was used. scan filesystem freespace and inode maps... agf_freeblks 17968437, counted 17966351 in ag 30 sb_icount 75200, counted 75264 sb_ifree 1598, counted 1660 sb_fdblocks 456331653, counted 456790746 11:17:50: scanning filesystem freespace - 32 of 32 allocation groups done found root inode chunk Phase 3 - for each AG... scan and clear agi unlinked lists... 11:17:50: scanning agi unlinked lists - 32 of 32 allocation groups done process known inodes and perform inode discovery... agno = 0 agno = 30 agno = 15 agno = 16 agno = 31 agno = 17 agno = 1 agno = 18 agno = 2 agno = 3 agno = 19 agno = 4 agno = 20 imap claims in-use inode 1074863332 is free, correcting imap data fork in ino 1074863333 claims free block 134358366 imap claims in-use inode 1074863333 is free, correcting imap agno = 5 Metadata corruption detected at xfs_inode block 0x11fea7d80/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7d80/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7d80/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7d80/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7d80/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7d80/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7d80/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7d80/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7d80/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7d80/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7d80/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7d80/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7d80/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7d80/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7d80/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7d80/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7d90/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7d90/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7d90/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7d90/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7d90/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7d90/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7d90/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7d90/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7d90/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7d90/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7d90/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7d90/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7d90/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7d90/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7d90/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7d90/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7da0/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7da0/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7da0/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7da0/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7da0/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7da0/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7da0/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7da0/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7da0/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7da0/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7da0/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7da0/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7da0/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7da0/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7da0/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7da0/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7db0/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7db0/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7db0/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7db0/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7db0/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7db0/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7db0/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7db0/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7db0/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7db0/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7db0/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7db0/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7db0/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7db0/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7db0/0x2000 Metadata corruption detected at xfs_inode block 0x11fea7db0/0x2000 imap claims a free inode 5369328179 is in use, correcting imap and clearing inode cleared inode 5369328179 imap claims in-use inode 5369328185 is free, correcting imap data fork in ino 5369328186 claims free block 671166485 data fork in ino 5369328186 claims free block 671166486 data fork in ino 5369328188 claims free block 671165878 data fork in ino 5369328188 claims free block 671165879 bad CRC for inode 5428127104 bad magic number 0x0 on inode 5428127104 bad version number 0x0 on inode 5428127104 inode identifier 0 mismatch on inode 5428127104 bad CRC for inode 5428127105 bad magic number 0x0 on inode 5428127105 bad version number 0x0 on inode 5428127105 inode identifier 0 mismatch on inode 5428127105 bad CRC for inode 5428127106 bad magic number 0x0 on inode 5428127106 bad version number 0x0 on inode 5428127106 inode identifier 0 mismatch on inode 5428127106 bad CRC for inode 5428127107 bad magic number 0x0 on inode 5428127107 bad version number 0x0 on inode 5428127107 inode identifier 0 mismatch on inode 5428127107 bad CRC for inode 5428127108 bad magic number 0x0 on inode 5428127108 bad version number 0x0 on inode 5428127108 inode identifier 0 mismatch on inode 5428127108 bad CRC for inode 5428127109 bad magic number 0x0 on inode 5428127109 bad version number 0x0 on inode 5428127109 inode identifier 0 mismatch on inode 5428127109 bad CRC for inode 5428127110 bad magic number 0x0 on inode 5428127110 bad version number 0x0 on inode 5428127110 inode identifier 0 mismatch on inode 5428127110 bad CRC for inode 5428127111 bad magic number 0x0 on inode 5428127111 bad version number 0x0 on inode 5428127111 inode identifier 0 mismatch on inode 5428127111 bad CRC for inode 5428127112 bad magic number 0x0 on inode 5428127112 bad version number 0x0 on inode 5428127112 inode identifier 0 mismatch on inode 5428127112 bad CRC for inode 5428127113 bad magic number 0x0 on inode 5428127113 bad version number 0x0 on inode 5428127113 inode identifier 0 mismatch on inode 5428127113 bad CRC for inode 5428127114 bad magic number 0x0 on inode 5428127114 bad version number 0x0 on inode 5428127114 inode identifier 0 mismatch on inode 5428127114 bad CRC for inode 5428127115 bad magic number 0x0 on inode 5428127115 bad version number 0x0 on inode 5428127115 inode identifier 0 mismatch on inode 5428127115 bad CRC for inode 5428127116 bad magic number 0x0 on inode 5428127116 bad version number 0x0 on inode 5428127116 inode identifier 0 mismatch on inode 5428127116 bad CRC for inode 5428127117 bad magic number 0x0 on inode 5428127117 bad version number 0x0 on inode 5428127117 inode identifier 0 mismatch on inode 5428127117 bad CRC for inode 5428127118 bad magic number 0x0 on inode 5428127118 bad version number 0x0 on inode 5428127118 inode identifier 0 mismatch on inode 5428127118 bad CRC for inode 5428127119 bad magic number 0x0 on inode 5428127119 bad version number 0x0 on inode 5428127119 inode identifier 0 mismatch on inode 5428127119 bad CRC for inode 5428127120 bad magic number 0x0 on inode 5428127120 bad version number 0x0 on inode 5428127120 inode identifier 0 mismatch on inode 5428127120 bad CRC for inode 5428127121 bad magic number 0x0 on inode 5428127121 bad version number 0x0 on inode 5428127121 inode identifier 0 mismatch on inode 5428127121 bad CRC for inode 5428127122 bad magic number 0x0 on inode 5428127122 bad version number 0x0 on inode 5428127122 inode identifier 0 mismatch on inode 5428127122 bad CRC for inode 5428127123 bad magic number 0x0 on inode 5428127123 bad version number 0x0 on inode 5428127123 inode identifier 0 mismatch on inode 5428127123 bad CRC for inode 5428127124 bad magic number 0x0 on inode 5428127124 bad version number 0x0 on inode 5428127124 inode identifier 0 mismatch on inode 5428127124 bad CRC for inode 5428127125 bad magic number 0x0 on inode 5428127125 bad version number 0x0 on inode 5428127125 inode identifier 0 mismatch on inode 5428127125 bad CRC for inode 5428127126 bad magic number 0x0 on inode 5428127126 bad version number 0x0 on inode 5428127126 inode identifier 0 mismatch on inode 5428127126 bad CRC for inode 5428127127 bad magic number 0x0 on inode 5428127127 bad version number 0x0 on inode 5428127127 inode identifier 0 mismatch on inode 5428127127 bad CRC for inode 5428127128 bad magic number 0x0 on inode 5428127128 bad version number 0x0 on inode 5428127128 inode identifier 0 mismatch on inode 5428127128 bad CRC for inode 5428127129 bad magic number 0x0 on inode 5428127129 bad version number 0x0 on inode 5428127129 inode identifier 0 mismatch on inode 5428127129 bad CRC for inode 5428127130 bad magic number 0x0 on inode 5428127130 bad version number 0x0 on inode 5428127130 inode identifier 0 mismatch on inode 5428127130 bad CRC for inode 5428127131 bad magic number 0x0 on inode 5428127131 bad version number 0x0 on inode 5428127131 inode identifier 0 mismatch on inode 5428127131 bad CRC for inode 5428127132 bad magic number 0x0 on inode 5428127132 bad version number 0x0 on inode 5428127132 inode identifier 0 mismatch on inode 5428127132 bad CRC for inode 5428127133 bad magic number 0x0 on inode 5428127133 bad version number 0x0 on inode 5428127133 inode identifier 0 mismatch on inode 5428127133 bad CRC for inode 5428127134 bad magic number 0x0 on inode 5428127134 bad version number 0x0 on inode 5428127134 inode identifier 0 mismatch on inode 5428127134 bad CRC for inode 5428127135 bad magic number 0x0 on inode 5428127135 bad version number 0x0 on inode 5428127135 inode identifier 0 mismatch on inode 5428127135 bad CRC for inode 5428127136 bad magic number 0x0 on inode 5428127136 bad version number 0x0 on inode 5428127136 inode identifier 0 mismatch on inode 5428127136 bad CRC for inode 5428127137 bad magic number 0x0 on inode 5428127137 bad version number 0x0 on inode 5428127137 inode identifier 0 mismatch on inode 5428127137 bad CRC for inode 5428127138 bad magic number 0x0 on inode 5428127138 bad version number 0x0 on inode 5428127138 inode identifier 0 mismatch on inode 5428127138 bad CRC for inode 5428127139 bad magic number 0x0 on inode 5428127139 bad version number 0x0 on inode 5428127139 inode identifier 0 mismatch on inode 5428127139 bad CRC for inode 5428127140 bad magic number 0x0 on inode 5428127140 bad version number 0x0 on inode 5428127140 inode identifier 0 mismatch on inode 5428127140 bad CRC for inode 5428127141 bad magic number 0x0 on inode 5428127141 bad version number 0x0 on inode 5428127141 inode identifier 0 mismatch on inode 5428127141 bad CRC for inode 5428127142 bad magic number 0x0 on inode 5428127142 bad version number 0x0 on inode 5428127142 inode identifier 0 mismatch on inode 5428127142 bad CRC for inode 5428127143 bad magic number 0x0 on inode 5428127143 bad version number 0x0 on inode 5428127143 inode identifier 0 mismatch on inode 5428127143 bad CRC for inode 5428127144 bad magic number 0x0 on inode 5428127144 bad version number 0x0 on inode 5428127144 inode identifier 0 mismatch on inode 5428127144 bad CRC for inode 5428127145 bad magic number 0x0 on inode 5428127145 bad version number 0x0 on inode 5428127145 inode identifier 0 mismatch on inode 5428127145 bad CRC for inode 5428127146 bad magic number 0x0 on inode 5428127146 bad version number 0x0 on inode 5428127146 inode identifier 0 mismatch on inode 5428127146 bad CRC for inode 5428127147 bad magic number 0x0 on inode 5428127147 bad version number 0x0 on inode 5428127147 inode identifier 0 mismatch on inode 5428127147 bad CRC for inode 5428127148 bad magic number 0x0 on inode 5428127148 bad version number 0x0 on inode 5428127148 inode identifier 0 mismatch on inode 5428127148 bad CRC for inode 5428127149 bad magic number 0x0 on inode 5428127149 bad version number 0x0 on inode 5428127149 inode identifier 0 mismatch on inode 5428127149 bad CRC for inode 5428127150 bad magic number 0x0 on inode 5428127150 bad version number 0x0 on inode 5428127150 inode identifier 0 mismatch on inode 5428127150 bad CRC for inode 5428127151 bad magic number 0x0 on inode 5428127151 bad version number 0x0 on inode 5428127151 inode identifier 0 mismatch on inode 5428127151 bad CRC for inode 5428127152 bad magic number 0x0 on inode 5428127152 bad version number 0x0 on inode 5428127152 inode identifier 0 mismatch on inode 5428127152 bad CRC for inode 5428127153 bad magic number 0x0 on inode 5428127153 bad version number 0x0 on inode 5428127153 inode identifier 0 mismatch on inode 5428127153 bad CRC for inode 5428127154 bad magic number 0x0 on inode 5428127154 bad version number 0x0 on inode 5428127154 inode identifier 0 mismatch on inode 5428127154 bad CRC for inode 5428127155 bad magic number 0x0 on inode 5428127155 bad version number 0x0 on inode 5428127155 inode identifier 0 mismatch on inode 5428127155 bad CRC for inode 5428127156 bad magic number 0x0 on inode 5428127156 bad version number 0x0 on inode 5428127156 inode identifier 0 mismatch on inode 5428127156 bad CRC for inode 5428127157 bad magic number 0x0 on inode 5428127157 bad version number 0x0 on inode 5428127157 inode identifier 0 mismatch on inode 5428127157 bad CRC for inode 5428127158 bad magic number 0x0 on inode 5428127158 bad version number 0x0 on inode 5428127158 inode identifier 0 mismatch on inode 5428127158 bad CRC for inode 5428127159 bad magic number 0x0 on inode 5428127159 bad version number 0x0 on inode 5428127159 inode identifier 0 mismatch on inode 5428127159 bad CRC for inode 5428127160 bad magic number 0x0 on inode 5428127160 bad version number 0x0 on inode 5428127160 inode identifier 0 mismatch on inode 5428127160 bad CRC for inode 5428127161 bad magic number 0x0 on inode 5428127161 bad version number 0x0 on inode 5428127161 inode identifier 0 mismatch on inode 5428127161 bad CRC for inode 5428127162 bad magic number 0x0 on inode 5428127162 bad version number 0x0 on inode 5428127162 inode identifier 0 mismatch on inode 5428127162 bad CRC for inode 5428127163 bad magic number 0x0 on inode 5428127163 bad version number 0x0 on inode 5428127163 inode identifier 0 mismatch on inode 5428127163 bad CRC for inode 5428127164 bad magic number 0x0 on inode 5428127164 bad version number 0x0 on inode 5428127164 inode identifier 0 mismatch on inode 5428127164 bad CRC for inode 5428127165 bad magic number 0x0 on inode 5428127165 bad version number 0x0 on inode 5428127165 inode identifier 0 mismatch on inode 5428127165 bad CRC for inode 5428127166 bad magic number 0x0 on inode 5428127166 bad version number 0x0 on inode 5428127166 inode identifier 0 mismatch on inode 5428127166 bad CRC for inode 5428127167 bad magic number 0x0 on inode 5428127167 bad version number 0x0 on inode 5428127167 inode identifier 0 mismatch on inode 5428127167 agno = 21 agno = 6 agno = 22 agno = 7 agno = 8 agno = 23 agno = 9 agno = 24 agno = 10 imap claims a free inode 6443451935 is in use, correcting imap and clearing inode cleared inode 6443451935 agno = 25 agno = 11 agno = 26 agno = 12 agno = 27 agno = 13 agno = 28 agno = 14 data fork in ino 7527988787 claims free block 1017804762 data fork in ino 7527988787 claims free block 1017804763 correcting nblocks for inode 7527988787, was 12937 - counted 12943 data fork in ino 7527988792 claims free block 1017755860 data fork in ino 7527988792 claims free block 1017755861 correcting nblocks for inode 7527988792, was 3733 - counted 3739 agno = 29 11:17:55: process known inodes and inode discovery - 75200 of 75200 inodes done process newly discovered inodes... 11:17:55: process newly discovered inodes - 64 of 32 allocation groups done Phase 4 - check for duplicate blocks... setting up duplicate extent list... 11:17:55: setting up duplicate extent list - 32 of 32 allocation groups done check for inodes claiming duplicate blocks... agno = 0 agno = 1 agno = 2 agno = 3 agno = 4 agno = 6 agno = 7 agno = 8 agno = 9 agno = 10 agno = 5 agno = 11 agno = 12 agno = 13 agno = 14 agno = 16 agno = 17 entry "directory1" at block 0 offset 1928 in directory inode 2417271845 references free inode 5640998522 clearing inode number in entry at offset 1928... agno = 18 agno = 19 agno = 20 agno = 21 agno = 22 agno = 23 agno = 24 agno = 25 agno = 26 agno = 27 agno = 28 agno = 29 entry "directory2" in shortform directory 5369328170 references non-existent inode 5428126464 junking entry "directory2" in directory inode 5369328170 corrected i8 count in directory 5369328170, was 6, now 5 agno = 30 agno = 31 agno = 15 entry "directory3" at block 1 offset 1360 in directory inode 6443451947 references free inode 6443451935 clearing inode number in entry at offset 1360... entry "file1" at block 6 offset 2704 in directory inode 6979525327 references free inode 6979832452 clearing inode number in entry at offset 2704... entry "file2" at block 6 offset 2752 in directory inode 6979525327 references free inode 6979832455 clearing inode number in entry at offset 2752... 11:17:55: check for inodes claiming duplicate blocks - 75200 of 75200 inodes done Phase 5 - rebuild AG headers and trees... agno = 0 agno = 1 agno = 2 agno = 3 agno = 4 agno = 5 agno = 6 agno = 7 agno = 8 agno = 9 agno = 10 agno = 11 agno = 12 agno = 13 agno = 14 agno = 15 agno = 16 agno = 17 agno = 18 agno = 19 agno = 20 agno = 21 agno = 22 agno = 23 agno = 24 agno = 25 agno = 26 agno = 27 agno = 28 agno = 29 agno = 30 agno = 31 11:17:55: rebuild AG headers and trees - 32 of 32 allocation groups done reset superblock... Phase 6 - check inode connectivity... resetting contents of realtime bitmap and summary inodes traversing filesystem ... agno = 0 agno = 1 agno = 2 agno = 3 agno = 4 agno = 5 agno = 6 agno = 7 agno = 8 agno = 9 bad hash table for directory inode 2417271845 (no data entry): rebuilding rebuilding directory inode 2417271845 agno = 10 agno = 11 agno = 12 agno = 13 agno = 14 agno = 15 agno = 16 agno = 17 agno = 18 agno = 19 agno = 20 agno = 21 agno = 22 agno = 23 agno = 24 bad hash table for directory inode 6443451947 (no data entry): rebuilding rebuilding directory inode 6443451947 agno = 25 bad hash table for directory inode 6711227609 (no data entry): rebuilding rebuilding directory inode 6711227609 agno = 26 rebuilding directory inode 6979525327 agno = 27 agno = 28 agno = 29 agno = 30 agno = 31 traversal finished ... moving disconnected inodes to lost+found ... disconnected dir inode 1074863332, moving to lost+found disconnected inode 6711227584, moving to lost+found disconnected dir inode 8053499445, moving to lost+found Phase 7 - verify and correct link counts... resetting inode 2417271845 nlinks from 3 to 2 resetting inode 1326595 nlinks from 2 to 4 11:18:03: verify and correct link counts - 32 of 32 allocation groups done Maximum metadata LSN (2:3515112) is ahead of log (1:8). Format log to cycle 5. XFS_REPAIR Summary Thu Jun 23 11:18:23 2016 Phase Start End Duration Phase 1: 06/23 11:17:38 06/23 11:17:38 Phase 2: 06/23 11:17:38 06/23 11:17:50 12 seconds Phase 3: 06/23 11:17:50 06/23 11:17:55 5 seconds Phase 4: 06/23 11:17:55 06/23 11:17:55 Phase 5: 06/23 11:17:55 06/23 11:17:55 Phase 6: 06/23 11:17:55 06/23 11:18:03 8 seconds Phase 7: 06/23 11:18:03 06/23 11:18:03 Total run time: 25 seconds done