因為做raid的關係, 硬碟超過了16T
不管是ext3 或ext4的格式都只能支援到16T
所以為了掛載這超過16T 的硬碟,必須用xfs file system格式
 
Centos 5.11 需要先下載 這2個rpm
xfsprogs-2.9.4-1.el5.centos.x86_64.rpm
xfsprogs-devel-2.9.4-1.el5.centos.x86_64.rpm

在Centos 5.11 中安裝

s01: ~ >rpm -ivh xfsprogs-2.9.4-1.el5.centos.x86_64.rpm
warning: xfsprogs-2.9.4-1.el5.centos.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
Preparing...                ########################################### [100%]
   1:xfsprogs               ########################################### [100%]
s01: ~ >rpm -ivh xfsprogs-devel-2.9.4-1.el5.centos.x86_64.rpm
warning: xfsprogs-devel-2.9.4-1.el5.centos.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
Preparing...                ########################################### [100%]
   1:xfsprogs-devel         ########################################### [100%]

確認硬碟

s01: ~ > parted -l

Model: Compaq Smart Array (cpqarray)
Disk /dev/cciss/c1d0: 20.0TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name     Flags
 1      17.4kB  20.0TB  20.0TB  xfs          primary       



Model: Compaq Smart Array (cpqarray)
Disk /dev/cciss/c0d0: 900GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End    Size   Type     File system  Flags
 1      32.3kB  107MB  107MB  primary  ext3         boot 
 2      107MB   900GB  900GB  primary               lvm  


掛載硬碟失敗

s01: ~ >mount -t xfs /dev/cciss/c1d0 /home01
mount: wrong fs type, bad option, bad superblock on /dev/cciss/c1d0,
       missing codepage or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

硬碟格式化成 xfs

s01: ~ >mkfs.xfs -f /dev/cciss/c1d0
meta-data=/dev/cciss/c1d0        isize=256    agcount=32, agsize=152615760 blks
         =                       sectsz=512   attr=0
data     =                       bsize=4096   blocks=4883704320, imaxpct=25
         =                       sunit=0      swidth=0 blks, unwritten=1
naming   =version 2              bsize=4096  
log      =internal log           bsize=4096   blocks=32768, version=1
         =                       sectsz=512   sunit=0 blks, lazy-count=0
realtime =none                   extsz=4096   blocks=0, rtextents=0

掛載 20T硬碟

s01: ~ >mount -t xfs /dev/cciss/c1d0 /home01

修改 /etc/fstab 讓開機時自動掛載20T 硬碟 加入以下內容

/dev/cciss/c1d0         /home01                  xfs     defaults        0 0

Tags: ,