當我在腳本中執行 /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分機4:
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.
如果嘗試執行該操作的腳本不是由您編寫的:考慮為什麼它在那裡的另一種解釋:腳本的作者通緝使此操作失敗,因為她知道無論如何設定都無法在該大小的捲上正常或可靠地工作。您可能會嘗試以超出預期的規模使用軟體。