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

相关文章
相关标签/搜索