Cloud init-存储配置

Cloud init-存储配置

我在存储(用户数据文件)部分遇到了两个问题 1. 当我尝试使用 Gparted 增加 /dev/sda2 时,我无法做到这一点,因为卷启动的创建。(见下图)2. 此外,我试图在安装时自动为 /(根)分配可用空间。

在此处输入图片描述

更新:我设法解决了它。

storage:
    config:
    - id: disk-sda
      type: disk
      ptable: gpt
      path: /dev/sda
      wipe: superblock-recursive
      preserve: false
      name: main_disk
      grub_device: true
    - id: partition-0
      type: partition
      device: disk-sda
      size: 1M
      flag: bios_grub
      number: 1
      preserve: false
    - device: disk-sda
      size: 2G
      wipe: superblock
      flag: ''
      number: 2
      preserve: false
      type: partition
      id: partition-1
    - fstype: ext4
      volume: partition-1
      preserve: false
      type: format
      id: format-0
    - device: disk-sda
      size: -1
      wipe: superblock
      flag: ''
      number: 3
      preserve: false
      type: partition
      id: partition-2
    - name: vg0
      devices: [partition-2]
      preserve: false
      type: lvm_volgroup
      id: lvm_volgroup-0
    - name: lv-swap
      volgroup: lvm_volgroup-0
      size: 4294967296B
      wipe: superblock
      preserve: false
      type: lvm_partition
      id: lvm_partition-0
    - fstype: swap
      volume: lvm_partition-0
      preserve: false
      type: format
      id: format-1
    - path: ''
      device: format-1
      type: mount
      id: mount-1
    - name: lv-root
      volgroup: lvm_volgroup-0
      size: -1
      wipe: superblock
      preserve: false
      type: lvm_partition
      id: lvm_partition-1
    - fstype: ext4
      volume: lvm_partition-1
      preserve: false
      type: format
      id: format-2
    - device: format-2
      path: /
      type: mount
      id: mount-2
    - device: format-0
      path: /boot
      type: mount
      id: mount-0

相关内容