1、安装yum支持包
yum install xfs* parted -y
2、查看磁盘信息
fdisk -l
……
Disk /dev/sdb: 9796.3 GB, 9796283531264 bytes, 19133366272 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 262144 bytes / 262144 bytes
3、创建分区
parted -s /dev/sdb mklabel gpt
parted -s /dev/sdb mkpart primary 2048s 100%
4、格式化分区
[root@localhost x86_64]# mkfs.xfs -f /dev/sdb1
meta-data=/dev/sdb1 isize=512 agcount=32, agsize=74739712 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=0, sparse=0
data = bsize=4096 blocks=2391670272, imaxpct=5
= sunit=64 swidth=64 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=1
log =internal log bsize=4096 blocks=521728, version=2
= sectsz=512 sunit=64 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
5、挂截磁盘
mkdir /u01
mount /dev/sdb1 /u01
echo “/dev/sdb1 /u01 xfs defaults 0 0 “>> /etc/fstab
6、查看磁盘信息
[root@localhost x86_64]# df -h
Filesystem Size Used Avail Use% Mounted on
……
/dev/sdb1 9.0T 34M 9.0T 1% /u01