选项 -O ^64bit 的 mkfs.ext4 错误

dbN*_*ice 3 linux ext4 hard-drive infrastructure mkfs

当我在脚本中运行 /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.
Run Code Online (Sandbox Code Playgroud)

但是如果我在没有 -O ^64bit 的情况下运行,它运行良好。任何人都可以帮助解决这个问题吗?

 /sbin/mkfs.ext4  /dev/app/mysqldata
Run Code Online (Sandbox Code Playgroud)

anx*_*anx 6

只是不要尝试手动禁用 ( ^) 该功能,然后。您已经在尝试创建一个超出没有它可能的数量的数量。添加文件系统大于 16TiB(4k 块)的能力是该选项的一个也是迄今为止(几乎)唯一的一点。

我怀疑您将 64 位选项与其他内容混淆了。来自man 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.
Run Code Online (Sandbox Code Playgroud)

如果尝试执行该操作的脚本不是您编写的:请考虑另一种解释它为什么存在的原因:脚本的作者想让此操作失败,因为她知道无论它设置的任何内容都无法正常或可靠地使用无论如何,那个大小的体积。您可能正在尝试以预期不会在其下运行的规模使用软件。