我預期會出現錯誤,抱歉 FS 是唯讀的,但這是可能的。這是出乎意料且違反直覺的,有什麼原因嗎?
Linux files 5.11.0-27-generic #29~20.04.1-Ubuntu SMP Wed Aug 11 15:58:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
files@files:/mnt/disk$ mount | grep /mnt/disk/005
/dev/sdh on /mnt/disk/005 type ext4 (ro,nosuid,nodev,noexec,relatime,user)
files@files:/mnt/disk$ df /mnt/disk/005/
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdh 7751367424 7332824836 27824876 100% /mnt/disk/005
files@files:/mnt/disk$ sudo tune2fs -r 0 /dev/sdh
tune2fs 1.45.5 (07-Jan-2020)
Setting reserved blocks count to 0
files@files:/mnt/disk$ df /mnt/disk/005/
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdh 7751367424 7332824836 418526204 95% /mnt/disk/005
files@files:/mnt/disk$
答案1
tune2fs
從來不需要安裝檔案系統來運作。如您在命令中看到的,您將區塊設備節點 ( /dev/sdh
) 作為參數傳遞給它,而不是掛載點 ( /mnt/disk/005
)。它類似於resize2fs
和e2label
。