![Debian 安装程序 Partman 和保留块](https://linux22.com/image/639790/Debian%20%E5%AE%89%E8%A3%85%E7%A8%8B%E5%BA%8F%20Partman%20%E5%92%8C%E4%BF%9D%E7%95%99%E5%9D%97.png)
我进行了此预置配置,但无法直接从 partman 配方中删除保留块的百分比。似乎选项“partman-basicfilesystems/specify_reserved”是为此设计的,但它不起作用。
这是我对分区的预先设定:
d-i partman-auto/method string lvm
d-i partman-auto/choose_recipe select myrecipe
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-md/device_remove_md boolean true
d-i partman-basicfilesystems/specify_reserved string 0
d-i partman-auto-lvm/new_vg_name string vg
d-i partman-auto/expert_recipe string \
myrecipe :: \
256 300 256 ext3 \
$primary{ } $lvmignore{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } mountpoint{ /boot } . \
50000 10000 50000 ext4 \
$defaultignore{ } $lvmok{ } \
method{ lvm } format{ } \
lv_name{ root } \
use_filesystem{ } filesystem{ ext4 } mountpoint{ / } . \
8000 10000 8000 linux-swap \
$defaultignore{ } $lvmok{ } \
method{ swap } format{ } \
lv_name{ swap } . \
20 1000 1000000000 ext4 \
$defaultignore{ } $lvmok{ } \
method{ lvm } format{ } \
lv_name{ home } \
use_filesystem{ } filesystem{ ext4 } mountpoint{ /home } .
一旦安装完成,如果我检查保留块:
root@host:~# tune2fs -l /dev/mapper/vg-root | grep Reserved
Reserved block count: 610304
Reserved GDT blocks: 1021
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
root@lsibox:~# tune2fs -l /dev/mapper/vg-home | grep Reserved
Reserved block count: 340582
Reserved GDT blocks: 1022
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
我是否遗漏了 Partman 的某些功能,还是应该在安装后使用 tune2fs 进行安装?由于可以在手动安装过程中将其删除,因此我相信 Partman/debian 安装程序可以解决这个问题!
答案1
我找到了正确的参数“reserved_for_root{ 0 }”
50000 10000 50000 ext4 \
$defaultignore{ } $lvmok{ } \
method{ lvm } format{ } \
lv_name{ root } \
use_filesystem{ } reserved_for_root{ 0 } filesystem{ ext4 } mountpoint{ / }