LVM 显示在不同分区下,即使它们位于同一卷组下

LVM 显示在不同分区下,即使它们位于同一卷组下

我对大小为 900 GB 的单个驱动器有以下 curtin 分区配置。

curtin/partitions:
    storage:
      config:
        - grub_device: true
          id: sda
          name: main_disk
          path: /dev/sda
          ptable: gpt
          type: disk
        - device: sda
          flag: bios_grub
          id: bios_boot_partition
          size: 1MB
          type: partition
        - device: sda
          flag: boot
          id: boot_part
          name: boot_part
          size: 8GB
          type: partition
        - device: sda
          flag: logical
          id: rootvg_part
          size: 880GB
          type: partition
        - devices:
            - rootvg_part
          id: vg_root
          name: vg-root
          type: lvm_volgroup
        - id: lv-root
          name: lv_root
          size: 10G
          type: lvm_partition
          volgroup: vg_root
        - id: lv-swap
          name: lv_swap
          size: 10G
          type: lvm_partition
          volgroup: vg_root
        - id: lv-home
          name: lv_home
          size: 5G
          type: lvm_partition
          volgroup: vg_root
        - id: lv-longhorn
          name: lv_longhorn
          size: 570G
          preserve: 'false'
          type: lvm_partition
          volgroup: vg_root
        - id: lv-tmp
          name: lv_tmp
          size: 5G
          type: lvm_partition
          volgroup: vg_root
        - id: lv-var
          name: lv_var
          size: 10G
          type: lvm_partition
          volgroup: vg_root
        - id: lv-log
          name: lv_log
          size: 4G
          type: lvm_partition
          volgroup: vg_root
        - id: lv-audit
          name: lv_audit
          size: 4G
          type: lvm_partition
          volgroup: vg_root
        - id: lv-vartmp
          name: lv_vartmp
          size: 5G
          type: lvm_partition
          volgroup: vg_root
        - id: lv-varlibdocker
          name: lv_varlibdocker
          size: 50G
          type: lvm_partition
          volgroup: vg_root
        - id: lv-varlibkubelet
          name: lv_varlibkubelet
          size: 100G
          type: lvm_partition
          volgroup: vg_root
        - fstype: ext4
          id: boot_fs
          preserve: 'false'
          type: format
          volume: boot_part
        - fstype: ext4
          id: fs-root
          label: rootfs
          preserve: 'false'
          type: format
          volume: lv-root
        - fstype: swap
          id: fs-swap
          label: swapfs
          preserve: 'false'
          type: format
          volume: lv-swap
        - fstype: ext4
          id: fs-home
          label: homefs
          preserve: 'false'
          type: format
          volume: lv-home
        - fstype: ext4
          id: fs-longhorn
          label: longhornfs
          preserve: 'false'
          type: format
          volume: lv-longhorn
        - fstype: ext4
          id: fs-tmp
          label: rootfs
          preserve: 'false'
          type: format
          volume: lv-tmp
        - fstype: ext4
          id: fs-var
          label: varfs
          preserve: 'false'
          type: format
          volume: lv-var
        - fstype: ext4
          id: fs-log
          label: logfs
          preserve: 'false'
          type: format
          volume: lv-log
        - fstype: ext4
          id: fs-audit
          label: auditfs
          preserve: 'false'
          type: format
          volume: lv-audit
        - fstype: ext4
          id: fs-vartmp
          label: vartmpfs
          preserve: 'false'
          type: format
          volume: lv-vartmp
        - fstype: ext4
          id: fs-varlibdocker
          label: varlibdocker
          preserve: 'false'
          type: format
          volume: lv-varlibdocker
        - fstype: ext4
          id: fs-varlibkubelet
          label: varlibkubelet
          preserve: 'false'
          type: format
          volume: lv-varlibkubelet
        - device: fs-root
          id: mount-root
          path: /
          type: mount
        - device: boot_fs
          id: boot_mount
          path: /boot
          type: mount
        - device: fs-home
          id: mount-home
          path: /home
          type: mount
        - device: fs-longhorn
          id: mount-longhorn
          path: /var/lib/longhorn
          type: mount
        - device: fs-tmp
          id: mount-tmp
          path: /tmp
          type: mount
        - device: fs-var
          id: mount-var
          path: /var
          type: mount
        - device: fs-log
          id: mount-log
          path: /var/log
          type: mount
        - device: fs-audit
          id: mount-audit
          path: /var/log/audit
          type: mount
        - device: fs-vartmp
          id: mount-vartmp
          path: /var/tmp
          type: mount
        - device: fs-varlibdocker
          id: mount-varlibdocker
          path: /var/lib/docker
          type: mount
        - device: fs-varlibkubelet
          id: mount-varlibkubelet
          path: /var/lib/kubelet
          type: mount
      version: 1

我有一个卷组“vg_root”。 Ubuntu 操作系统安装完成后,我使用 lsblk 列出了分区详细信息,结果如下;

$ lsblk
NAME                          MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0                           7:0    0   9.6M  1 loop /snap/canonical-livepatch/246
loop1                           7:1    0 105.8M  1 loop /snap/core/16202
loop2                           7:2    0  40.4M  1 loop /snap/snapd/20671
sda                             8:0    0 893.8G  0 disk
├─sda1                          8:1    0     1M  0 part
├─sda2                          8:2    0     8G  0 part /boot
├─sda3                          8:3    0   5.7G  0 part
│ └─vg--root-lv_varlibdocker  253:9    0   125G  0 lvm  /var/lib/docker
└─sda5                          8:5    0   880G  0 part
  ├─vg--root-lv_root          253:0    0    10G  0 lvm  /
  ├─vg--root-lv_swap          253:1    0    10G  0 lvm
  ├─vg--root-lv_home          253:2    0     5G  0 lvm  /home
  ├─vg--root-lv_longhorn      253:3    0   570G  0 lvm  /var/lib/longhorn
  ├─vg--root-lv_tmp           253:4    0     5G  0 lvm  /tmp
  ├─vg--root-lv_var           253:5    0    10G  0 lvm  /var
  ├─vg--root-lv_log           253:6    0     4G  0 lvm  /var/log
  ├─vg--root-lv_audit         253:7    0     4G  0 lvm  /var/log/audit
  ├─vg--root-lv_vartmp        253:8    0     5G  0 lvm  /var/tmp
  ├─vg--root-lv_varlibdocker  253:9    0   125G  0 lvm  /var/lib/docker
  └─vg--root-lv_varlibkubelet 253:10   0 133.8G  0 lvm  /var/lib/kubelet

$ df -Th
Filesystem                            Type   Size  Used Avail Use% Mounted on
tmpfs                                 tmpfs   19G  2.5M   19G   1% /run
/dev/mapper/vg--root-lv_root          ext4   9.8G  5.0G  4.4G  54% /
tmpfs                                 tmpfs   94G     0   94G   0% /dev/shm
tmpfs                                 tmpfs  5.0M     0  5.0M   0% /run/lock
/dev/sda2                             ext4   7.8G  150M  7.3G   2% /boot
/dev/mapper/vg--root-lv_home          ext4   4.9G  120K  4.6G   1% /home
/dev/mapper/vg--root-lv_tmp           ext4   4.9G   60K  4.6G   1% /tmp
/dev/mapper/vg--root-lv_var           ext4   9.8G  554M  8.7G   6% /var
/dev/mapper/vg--root-lv_varlibdocker  ext4   123G  328K  118G   1% /var/lib/docker
/dev/mapper/vg--root-lv_varlibkubelet ext4   132G   24K  125G   1% /var/lib/kubelet
/dev/mapper/vg--root-lv_log           ext4   3.9G  161M  3.5G   5% /var/log
/dev/mapper/vg--root-lv_vartmp        ext4   4.9G   48K  4.6G   1% /var/tmp
/dev/mapper/vg--root-lv_longhorn      ext4   560G   28K  532G   1% /var/lib/longhorn

但是,lvm 'vg--root-lv_varlibdocker' 显示在 sda3 下,而其余 lvms 显示在 sda5 下,即使所有 lvms 都在同一卷组下。我不明白原因。我的 curtin 分区配置有问题吗?

相关内容