CentOS 5 Suppy XFS Filesystem 的方法如下...
1) Yum
centosplus enable=1
| [root@sys /]# vi /etc/yum.repos.d/CentOS-Base.repo |
| [centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 |
2) Yum Update
centos.plus 的核心版本,安裝完成請重新開機。
| [root@sys /]# yum update kernel-2.6.18-164.10.1.el5.centos.plus |
3) 新增 mockbuild 的帳號。( kernel Source rpm )
| [root@sys /]# adduser mockbuild |
4) Yum 安裝以下套件 ( kmod-xfs & xfsprogs 為必要套件 )
* kmod-xfs
* xfsprogs
* xfsprogs-devel
* dmapi
* dmapi-devel
5) xfs 核心模組載入
| [root@sys /]# modprobe xfs
[root@sys /]# lsmod | grep xfs
xfs 508625 0 |
6) 分割區格式化成 xfs,且將分割區標籤命名為 xfsTest。
| [root@sys /]# mkfs.xfs -L xfsTest /dev/sda6
meta-data=/dev/sda6 isize=256 agcount=6, agsize=4096 blks
= sectsz=512 attr=0
data = bsize=4096 blocks=24576, imaxpct=25
= sunit=0 swidth=0 blks, unwritten=1
naming =version 2 bsize=4096
log =internal log bsize=4096 blocks=1200, version=1
= sectsz=512 sunit=0 blks, lazy-count=0
realtime =none extsz=4096 blocks=0, rtextents=0 |
7) 將分割區掛載,透過「
df -T」檢查分割區檔案格式。
| [root@sys /]# mount /dev/sda6 /xfsTest |
| [root@sys /]# df -T
Filesystem Type 1K-blocks Used Available Use% Mounted on
/dev/sda2 ext3 121888732 3876012 111721268 4% /
/dev/sda1 ext3 194443 16181 168223 9% /boot
tmpfs tmpfs 4083000 0 4083000 0% /dev/shm
/dev/sda5 ext4 102740 4144 93380 5% /ext4Test
/dev/sda6 xfs 93504 4320 89184 5% /xfsTest |
8) 若要檢查 xfs 標籤為何?可透過 「
xfs_admin -l 」 檢查。
| [root@sys /]# xfs_admin -l /dev/sda6
label = "xfsTest" |
補充說明:
* 若安裝 dmapi 出現以下錯誤,新增「mockbuild」帳號後,再次安裝即可!
| warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root |
話說,網路上還是有達人針對各種檔案格式進行檢測研究,若各
位有興趣,可以查看以下這篇文章,按自己的需求選擇適合的檔
案系統。 :)
延伸閱讀:
Linux 支援的檔案系統小評測 - 最後的選擇是...
Paul