xfs文件系統元數據損壞修復

XfS文件系統是SGI開發的高級日誌文件系統,XFS極具伸縮性,很是健壯。node

關於其安裝和使用和ext4都是同樣,就是格式化不同。app

其次是格式化都是同樣的,它能夠支持ext4單個文件超過16T的限制。ide

#/sbin/mkfs.xfs –f /dev/sda6this

#mount –t xfs /dev/sda6 /xfslua

 

關於其常常會出現錯誤,進行修復spa

 $ cd /data3日誌

$ ls開發

ls: cannot open directory .: Input/output errorit

修改包括三步:卸載,修復和檢查io

 

 

[root@gpsg32 ~]# xfs_repair /dev/sdd
Phase 1 - find and verify superblock...
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.
Note that destroying the log may cause corruption -- please attempt a mount
of the filesystem before doing this.

[root@gpsg32 ~]# mount /data3
mount: 結構須要清理
[root@gpsg32 ~]# mount -f /data3
[root@gpsg32 ~]# xfs_repair -L /dev/sdd
Phase 1 - find and verify superblock...
Phase 2 - using internal log
        - zero log...
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...
sb_icount 128, counted 4922112
sb_ifree 123, counted 25707
sb_fdblocks 731556628, counted 438595794
        - found root inode chunk
Phase 3 - for each AG...

[root@gpsg32 ~]# xfs_check /dev/sdd      檢查後從新掛載OK

[root@gpsg32 ~]# mount /data3[root@gpsg32 ~]# df -h文件系統              容量  已用  可用 已用%% 掛載點/dev/mapper/VolGroup-lv_root                       50G  3.1G   44G   7% /tmpfs                  79G     0   79G   0% /dev/shm/dev/sda1             485M   63M  397M  14% /boot/dev/mapper/VolGroup-lv_home                       20G   15G  4.3G  78% /home/dev/mapper/VolGroup-lv_tmp                       50G  180M   47G   1% /tmp/dev/sdb              2.8T  1.1T  1.7T  40% /data1/dev/sdc              2.8T  1.1T  1.7T  40% /data2/dev/sdd              2.8T  1.1T  1.7T  41% /data3

相關文章
相關標籤/搜索