Debian 9 PXE netboot安装上的Partman-我可以创建几个分区?

时间:2019-03-11 14:30:49

标签: installation debian disk-partitioning debian-stretch pg-partman

我有一个带有Debian 9(Stretch)发行版的PXE服务器。我正在使用预置文件来尝试实现以下配置(我使用过this method,以防其影响事物的工作方式):

MOUNTPOINT                      SIZE/GiB        FILESYSTEM

swap                            16              swap
/                               20              ext4
/boot                           0.5             ext4
/home                           10              xfs
/var                            5               xfs
/var/log                        5               xfs
/var/log/audit                  1               xfs
/var/tmp                        5               xfs
/tmp                            5               xfs
/var/lib/docker/overlay2        10              xfs
/var/lib/docker/containers      10              xfs
/var/lib/docker/volumes         10              xfs
/media                          0               xfs

我目前在预置文件中具有以下partman配置:

d-i partman-auto/disk string /dev/nvme0n1
d-i partman-auto/method string lvm
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-md/device_remove_md boolean true
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
d-i partman/choose_recipe select thechosenone
d-i partman-auto/expert_recipe string \
        thechosenone :: \
                512 512 512 ext4 \
                        $primary{ } $bootable{ } \
                        method{ format } format{ } \
                        use_filesystem{ } filesystem{ ext4 } \
                        mountpoint{ /boot } \
                        label{ boot } \
                . \
                16384 16384 16384 linux-swap \
                        $primary{ } \
                        method{ swap } format{ } \
                        label{ swap } \
                . \
                20480 20480 20480 ext4 \
                        $primary{ } \
                        method{ format } format{ } \
                        use_filesystem{ } filesystem{ ext4 } \
                        mountpoint{ / } \
                        label{ rootroot } \
                . \
                10240 10240 10240 xfs \
                      $lvmok{ } \
                      method{ format } format{ } \
                      use_filesystem{ } filesystem{ xfs } \
                      mountpoint{ /home } \
                      label{ home } \
                . \
                5120 5120 5120 xfs \
                      $lvmok{ } \
                      method{ format } format{ } \
                      use_filesystem{ } filesystem{ xfs } \
                      mountpoint{ /tmp } \
                      label{ tmp } \
                . \
                5120 5120 5120 xfs \
                      $lvmok{ } \
                      method{ format } format{ } \
                      use_filesystem{ } filesystem{ xfs } \
                      mountpoint{ /var } \
                      label{ var } \
                . \
                5120 5120 5120 xfs \
                      $lvmok{ } \
                      method{ format } format{ } \
                      use_filesystem{ } filesystem{ xfs } \
                      mountpoint{ /var/log } \
                      label{ varlog } \
                . \
                1024 1024 1024 xfs \
                      $lvmok{ } \
                      method{ format } format{ } \
                      use_filesystem{ } filesystem{ xfs } \
                      mountpoint{ /var/log/audit } \ 
                      label{ audit } \
                . \
                5120 5120 5120 xfs \
                      $lvmok{ } \
                      method{ format } format{ } \
                      use_filesystem{ } filesystem{ xfs } \
                      mountpoint{ /var/tmp } \
                      label{ vartmp } \
                . \
                10240 10240 10240 xfs \
                      $lvmok{ } \
                      method{ format } format{ } \
                      use_filesystem{ } filesystem{ xfs } \
                      mountpoint{ /var/lib/docker/overlay2 } \
                      label{ overlay2 } \
                . \
                10240 10240 10240 xfs \
                      $lvmok{ } \
                      method{ format } format{ } \
                      use_filesystem{ } filesystem{ xfs } \
                      mountpoint{ /var/lib/docker/containers } \
                      label{ containers } \
                . \
                10240 10240 10240 xfs \
                      $lvmok{ } \
                      method{ format } format{ } \
                      use_filesystem{ } filesystem{ xfs } \
                      mountpoint{ /var/lib/docker/volumes } \
                      label{ volumes } \
                . \
                1 1 1 xfs \
                      $lvmok{ } \
                      method{ format } format{ } \
                      use_filesystem{ } filesystem{ xfs } \
                      mountpoint{ /media } \
                      label{ media } \
                .
d-i partman/choose_partition select boot-root
d-i partman/choose_partition select Finish partitioning and write changes to disk
d-i partman-lvm/confirm boolean true
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true
d-i partman-md/confirm boolean true
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true

在第一次启动并运行lsblk时,我看到仅成功创建了前5个分区

NAME                    MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
nvme0n1                 259:0    0 465.8G  0 disk 
├─nvme0n1p1             259:1    0   487M  0 part /boot
├─nvme0n1p2             259:2    0  15.3G  0 part [SWAP]
├─nvme0n1p3             259:3    0  19.1G  0 part /
├─nvme0n1p4             259:4    0     1K  0 part 
└─nvme0n1p5             259:5    0   431G  0 part 
  ├─SM--MVP--vg-home    254:0    0   9.5G  0 lvm  /home
  ├─SM--MVP--vg-tmp     254:1    0   4.8G  0 lvm  /tmp
  ├─SM--MVP--vg-var     254:2    0   4.8G  0 lvm  /var
  └─SM--MVP--vg-var+log 254:3    0 411.9G  0 lvm  /var/log

值得注意的是,即使我将/var/log分区的最大值设置为 5GiB ,它也已经占据了硬盘的其余部分。我正在将Gigabyte GB-BKi5HA-7200SSD 970 EVO NVMe M.2 500GB硬盘驱动器一起使用。

我做错什么了吗?在预播中使用partman可以分割多少个分区?我应该合并使用早期和晚期命令吗?我不知所措,因为我不太愿意说在配偶上有大量的官方文件。欢迎任何反馈

0 个答案:

没有答案