클라우드 구성 파일 "디스크 채우기"(lvm)를 생성하려고 합니다. 누군가 문제가 무엇인지 확인하고 말해 줄 수 있습니까? (ubuntu20.4 서버 foucs의 루트 볼륨 관련 오류 발생)
#cloud-config
autoinstall:
apt:
disable_components: []
geoip: true
preserve_sources_list: false
primary:
- arches:
- amd64
- i386
uri: http://archive.ubuntu.com/ubuntu
- arches:
- default
uri: http://ports.ubuntu.com/ubuntu-ports
identity:
hostname: ubuntu-test
password: $6$XhlhJBcl/bxTQcSDA$BLAJBLAatDUh53b/BOEk1.c38CvU4XdlYjeltLav8EGcjpth/or5N33tLye6Og4TESYHFVr7MQaVGUn1tz2o67/Mm/
realname: scadmin
username: scadmin
kernel:
package: linux-generic
keyboard:
layout: us
toggle: null
variant: ''
locale: en_US.UTF-8
network:
ethernets:
ens160:
dhcp4: true
version: 2
ssh:
allow-pw: true
authorized-keys: []
install-server: true
storage:
config:
- ptable: gpt
path: /dev/sda
wipe: superblock-recursive
preserve: false
name: ''
grub_device: true
type: disk
id: disk-sda
- device: disk-sda
size: 1048576
flag: bios_grub
number: 1
preserve: false
grub_device: false
type: partition
id: partition-0
- device: disk-sda
size: -1
wipe: superblock
flag: ''
number: 2
preserve: false
grub_device: false
type: partition
id: partition-1
- name: vg0
devices:
- partition-1
preserve: false
type: lvm_volgroup
id: lvm_volgroup-0
- name: lv-root
volgroup: lvm_volgroup-0
size: -1
wipe: superblock
preserve: false
type: lvm_partition
id: lvm_partition-0
- name: lv-swap
volgroup: lvm_volgroup-0
size: 4290772992B
wipe: superblock
preserve: false
type: lvm_partition
id: lvm_partition-1
- fstype: ext4
volume: lvm_partition-0
preserve: false
type: format
id: format-2
- path: /
device: format-2
type: mount
id: mount-2
- fstype: swap
volume: lvm_partition-1
preserve: false
type: format
id: format-3
- path: ''
device: format-3
type: mount
id: mount-3
swap:
swap: 0
updates: security
version: 1
답변1
먼저 스토리지 구성 항목을 재배열하여 스왑 논리 볼륨을 생성합니다.
모든 공간을 사용할 루트 논리 볼륨을 생성합니다.
- name: lv-root
volgroup: lvm_volgroup-0
size: -1
wipe: superblock
preserve: false
type: lvm_partition
id: lvm_partition-0
그 다음에스왑 논리 볼륨을 생성합니다.
- name: lv-swap
volgroup: lvm_volgroup-0
size: 4290772992B
wipe: superblock
preserve: false
type: lvm_partition
id: lvm_partition-1
설치 프로그램이 이 항목을 좋아하지 않습니다. 22.04 설치 프로그램을 사용하여 이 오류 로그를 받았습니다.
LVM_LogicalVolume(name='lv-root', volgroup=lvm_volgroup-0, size=-1, wipe='superblock', type='lvm_partition', id='lvm_partition-0') has negative size but is not final partition of LVM_VolGroup(name='vg0', devices=[partition-1], type='lvm_volgroup', id='lvm_volgroup-0')
답변2
preserve: false
grub_device: false
type: partition
id: partition-3
- fstype: ext4
volume: partition-3
preserve: false
type: format
id: format-0
- name: lv-swap
volgroup: lvm_volgroup-0
size: 4294967296B
wipe: superblock
preserve: false
type: lvm_partition
id: lvm_partition-0
- name: lv-root
volgroup: lvm_volgroup-0
size: 25765609472B
wipe: superblock
preserve: false
type: lvm_partition
id: lvm_partition-1
- fstype: ext4
volume: lvm_partition-1
preserve: false
type: format
id: format-3
- path: /
device: format-3
type: mount
id: mount-3
- fstype: swap
volume: lvm_partition-0
preserve: false
type: format
id: format-4
- path: ''
device: format-4
type: mount
id: mount-4
- path: /boot
device: format-0
type: mount
id: mount-0