当我在脚本中运行 /sbin/mkfs.ext4 -O ^64bit /dev/app/mysqldata 命令时,出现以下错误:
nd(): null: With return code "1", Output from: "/sbin/mkfs.ext4 -O ^64bit /dev/app/mysqldata"
mke2fs 1.42.9 (20-Jan-2014)
mkfs.ext4: Size of device (0x1b48caa00 blocks) /dev/app/mysqldata too big to be expressed
in 32 bits using a blocksize of 4096.
但是如果我不使用 -O ^64bit,它就能正常运行。有人能帮忙解决吗?
/sbin/mkfs.ext4 /dev/app/mysqldata
答案1
那么,不要尝试手动禁用(^
)该功能。您已经尝试创建一个超出没有它所能实现的卷。增加文件系统大于 16TiB(4k 块)的能力是该选项的唯一要点,也是迄今为止(几乎)唯一的要点。
我怀疑你把 64 位选项和其他东西搞混了。来自人5 ext4:
64bit
Enables the file system to be larger than 2^32 blocks. This feature is
set automatically, as needed, but it can be useful to specify this
feature explicitly if the file system might need to be resized larger
than 2^32 blocks, even if it was smaller than that threshold when it
was originally created. Note that some older kernels and older
versions of e2fsprogs will not support file systems with this ext4
feature enabled.
如果尝试执行该操作的脚本不是你编写的:考虑一下它为什么在那里的另一种解释:剧本的作者通缉使此操作失败,因为她知道无论设置什么,在这种规模下都无法正常或可靠地工作。您可能试图在不期望的规模下使用软件。