引自: http://blog.sina.com.cn/s/blog_406127500102uyr9.html
传统的fdisk分区不支持2T以上的磁盘分区,而parted分区可以支持,而ext4格式不支持16T以上的磁盘空间分区,必须使用xfs分区;
#parted /dev/sdb
将 mbr转换成 gpt
# mklabel gpt
将所有磁盘都分这个一个区
#mkpart primary 0 -1
忽视警告
Warning: The resulting partition is not properly aligned for best performance.
Ignore/Cancel? ignore
查看分区后的内容,可以看到sdb1为19多T空间
#parted -l
Model: Dell Virtual Disk (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 1049kB 211MB 210MB primary ext4 boot
2 211MB 420MB 210MB primary linux-swap(v1)
3 420MB 1000GB 999GB primary ext4
Model: DELL MD38xxi (scsi)
Disk /dev/sdb: 19.8TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 17.4kB 19.8TB 19.8TB primary
这个时候如果对这19.8T空间进行ext4格式化会报错
#mkfs.ext4 /dev/sdb1
mke2fs 1.41.12 (17-May-2010)
mkfs.ext4: Size of device /dev/sdb1 too big to be expressed in 32 bits
using a blocksize of 4096.
经过查找资料发现ext4格式不支持16T以上磁盘分区,没办法只能采用xfs格式。
安装xfs文件系统
yum install xfsprogs
#mkfs.xfs /dev/sdb1
meta-data=/dev/sdb1 isize=256 agcount=18, agsize=268435455 blks
= sectsz=512 attr=2, projid32bit=0
data = bsize=4096 blocks=4831837959, imaxpct=5
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0
log =internal log bsize=4096 blocks=521728, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
然后再mount吧
#mount /dev/sdb1 /data
阅读(1775) | 评论(0) | 转发(0) |