raid5磁盘阵列超过16T格式化ext4问题
背景
有一台服务器,是大容量存储,超过16T的磁盘,做raid5磁盘阵列,格式的时候出现如下错误
执行如下命令格式化 mkfs.ext4 /dev/md0
[root@localhost ~]# mkfs.ext4 /dev/md0
mke2fs 1.42.8 (20-Jun-2013)
Warning: the fs_type huge is not defined in mke2fs.conf
mkfs.ext4: Size of device (0x15d507b00 blocks) /dev/md0 too big to be expressed
in 32 bits using a blocksize of 4096.
解决方法
修改 vim /etc/mke2fd.conf,的ext4配置选项中加入auto_64-bit_support = 1
[fs_types]
ext3 = {
features = has_journal
blocksize = 4096
inode_size = 256
inode_ratio = 8192
}
ext4 = {
features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize
blocksize = 4096
inode_size = 256
inode_ratio = 8192
auto_64-bit_support = 1 #加上这行参数
}
ext4dev = {
features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize
inode_size = 256
options = test_fs=1
}
参考
http://www.linuxidc.com/Linux/2017-06/144960.htm
https://linux.cn/article-6102-1.html