Skip to content

Instantly share code, notes, and snippets.

@cyrenity
Last active November 9, 2023 12:29
Show Gist options
  • Save cyrenity/24ae7da9a214d255025d048b660b56c3 to your computer and use it in GitHub Desktop.
Save cyrenity/24ae7da9a214d255025d048b660b56c3 to your computer and use it in GitHub Desktop.
Ubuntu 20.04 Auto-install custom storage layout for multiple volume groups
#cloud-config
autoinstall:
version: 1
identity:
hostname: ${HOSTNAME}.bitvizor.com
password: "${ADMIN_PASSWORD}"
username: ${ADMIN_USER}
ssh:
install-server: true
apt:
geoip: true
storage:
swap:
size: 0
config:
- type: disk
id: disk0
path: /dev/vda
preserve: false
grub_device: true
wipe: superblock-recursive
preserve: false
ptable: gpt
- type: partition
id: disk0-part0
device: disk0
flag: bios_grub
size: 1MB
- type: partition
id: disk0-part1
device: disk0
size: 10G
- type: partition
id: disk0-part2
size: -1
device: disk0
- type: lvm_volgroup
id: vg0
name: vg0
devices:
- disk0-part1
- type: lvm_volgroup
id: vg1
name: cinder-volumes
devices:
- disk0-part2
- type: lvm_partition
id: lvm_part0
name: root-parition
volgroup: vg0
size: 100%
- type: format
id: lvm_part0-fs
fstype: ext4
label: root
volume: lvm_part0
- id: lvm_part0-fs-mount0
type: mount
path: /
device: lvm_part0-fs
Device: /dev/vda
Partition Table: gpt
/dev/sda1 - 1MB - for UEFI/Bootloader
/dev/sda2 - 10G - root partition
/dev/sda3 - Remaining Space - for cinder-volumes
LVM Volume Groups:
vg0 (vg0) -> /dev/sda2 -> /
cinder-volumes (vg1) -> /dev/sda3 -> (no mount point)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment