XfS檔案系統是SGI開發的進階日志檔案系統,XFS極具伸縮性,非常健壯。
關于其安裝和使用和ext4都是一樣,就是格式化不一樣。
其次是格式化都是一樣的,它可以支援ext4單個檔案超過16T的限制。
#/sbin/mkfs.xfs –f /dev/sda6
#mount –t xfs /dev/sda6 /xfs
關于其經常會出現錯誤,進行修複
$ cd /data3
$ ls
ls: cannot open directory .: Input/output error
修改包括三步:解除安裝,修複和檢查
[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
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 ~]# 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
本文轉自zsaisai 51CTO部落格,原文連結:http://blog.51cto.com/3402313/1739830