Xfs

xfs_repair 已經執行了一天,它真的在做什麼嗎?

  • December 6, 2012

我的 1 TB XFS LVM 邏輯卷有問題。這以前駐留在產生 IO 錯誤的物理卷上,所以我使用“pvmove”遷移到新磁碟。遷移後,我能夠讀取和寫入該卷,但開始看到“結構需要清理”錯誤。所以我決定解除安裝卷並執行 xfs_repair。

這從以下消息開始(我已經用“<snipped>”替換了一些經常重複的冗餘消息以減少文本量):

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
entry "/rca.orca_gui_find.indexcache.2012-11-13T22:29:05-05:00.snapshot.gz" at block 147
       clearing inode number in entry at offset 2912...
entry at block 147 offset 2912 in directory inode 1893017 has illegal name "/rca.orca_gui
&lt;snipped&gt;
entry at block 0 offset 1616 in directory inode 3728154 has illegal name "/andler.html.zh
cleared inode 3728972
imap claims a free inode 3729023 is in use, correcting imap and clearing inode
cleared inode 3729023
&lt;snipped&gt;
bad magic number 0x0 on inode 3729024
bad version number 0x0 on inode 3729024
&lt;snipped&gt;
entry "/gi.html.en" at block 0 offset 696 in directory inode 3729503 references invalid i
       clearing inode number in entry at offset 968...
&lt;snipped&gt;
entry at block 0 offset 968 in directory inode 3729503 has illegal name "/taccess.html": 
       will junk block
no . entry for directory 3996998
no .. entry for directory 3996998
problem with directory contents in inode 3996998
cleared inode 3996998
bad directory block magic # 0 in block 0 for directory inode 3997000
&lt;snipped&gt;
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
bad directory block magic # 0 in block 0 for directory inode 4003024
corrupt block 0 in directory inode 4003024
       will junk block
no . entry for directory 4003024
no .. entry for directory 4003024
entry "Authoring.pod" at block 0 offset 160 in directory inode 14276983 references free i
       clearing inode number in entry at offset 160...
entry "Base.pm" at block 0 offset 216 in directory inode 14276983 references free inode 3
&lt;snipped&gt;
       - agno = 1
entry "wireless" at block 0 offset 688 in directory inode 2207138636 references free inod
       clearing inode number in entry at offset 688...
entry "xfrm" at block 0 offset 728 in directory inode 2207138636 references free inode 39
       clearing inode number in entry at offset 728...
entry "seq" at block 0 offset 64 in directory inode 2207276722 references free inode 4001
       clearing inode number in entry at offset 64...
       - agno = 2
       - agno = 3
Phase 5 - rebuild AG headers and trees...
       - reset superblock...
Phase 6 - check inode connectivity...
       - resetting contents of realtime bitmap and summary inodes
       - traversing filesystem ...

從昨天開始,xfs_repair 已經停止向螢幕輸出任何新內容。我用 strace 進行了檢查,但沒有看到任何活動。xfs_repair 程序仍然存在於程序表中,並且正在消耗記憶體但沒有 CPU。

那麼它有什麼作用嗎?我應該讓它執行還是終止該過程?我可以使用現有的文件系統,還是需要使用新的、乾淨的 XFS 卷重新開始?

我想我可能會做的是停止程序,重新啟動機器,看看“修復的”段是否可以掛載….如果可以的話沒問題。如果沒有,那麼您可以再次重新啟動該過程。

您嘗試轉換的分區有多大?

引用自:https://serverfault.com/questions/455800