1 .创建xfs文件系统
元数据=/dev/VD B1 isize=256 ag count=4,agsize=1966102 blks
=sectsz=512 attr=2,projid32bit=0
data=bsize=4096 blocks=7864408,imaxpct=25
=sunit=0 swidth=0 blks
naming=版本2 bsize=4096 ascii-ci=0
log=internallogbsize=4096 blocks=3840,version=2
=sectsz=512 sunit=0 blks,lazy-count=1
/dev/vdb1 /test xfs defaults 0 0
/dev/vdb1 30G 610M 30G 2% /test
2 .卸载文件系统/test并破坏superblock
1 0 records in
10记录输出
512字节(512 b )复制,0.00251096 s,204 kB/s
3 .再次装载并报告错误
mount: wrong fs type,bad option,bad superblock on /dev/vdb1,
缺少代码页or helper program,or other error
insomecasesusefulinfoisfoundinsyslog-try
dmesg | tail or so
恢复superblock
第1阶段查找和验证超级用户块.
badprimarysuperblock-badmagicnumber!
attemptingtofindsecondarysuperblock .
. foundcandidatesecondarysuperblock .
验证的次级超级用户块.
writingmodifiedprimarysuperblock
sbrealtimebitmapinode 1844674407370951615 (nullfs ino ) inconsistentwithcalculatedvalue 129
resettingsuperblockrealtimebitmapinopointerto 129
sbrealtimesummaryinode 1844674407370951615 (nullfs ino ) inconsistentwithcalculatedvalue 130
resettingsuperblockrealtimesummaryinopointerto 130
阶段2 -使用国际日志
- zero log .
- scanfilesystemfreespaceandinodemaps .
sb_icount 0,counted 64
sb_ifree 0,counted 60
sb_fdblocks 7860552,counted 7712768
- found root inode chunk
Phase 3 - for each AG .
-扫描和清除agi unlinked lists .
- processknowninodesandperforminodediscovery .
- agno=0
- agno=1
- agno=2
- agno=3
-进程新建发现索引.
Phase 4 - check for duplicate blocks .
-设置up duplicate extent list .
- checkforinodesclaimingduplicateblocks .
- agno=0
- agno=1
- agno=2
- agno=3
phase5- rebuildagheadersandtrees .
-重置super block .
第6阶段-检查索引连接.
- resettingcontentsofrealtimebitmapandsummaryinodes
- traversing文件系统.
- traversal finished .
- movingdisconnectedinodestolostfound .
phase7- verifyandcorrectlinkcounts .
note-stripeunit(0)和width (0)0) fields have been reset。
Please set with mount -o sunit=,swidth=
道恩
5 .确认是否恢复
/dev/vdb1 30G 610M 30G 2% /test