We are using below storage configuration for autoinstall
storage:
config:
#Select Disk
- {ptable: gpt, match: {}, wipe: superblock-recursive,
preserve: false, name: '', grub_device: true, type: disk, id: disk-sda}
#Grub Disk
- {device: disk-sda, size: 1M, flag: bios_grub, number: 1, preserve: false,
grub_device: false, type: partition, id: partition-0}
#/boot partition
- {device: disk-sda, size: 2G, wipe: superblock, flag: '', number: 2,
preserve: false, grub_device: false, type: partition, id: partition-1}
#Partition to be used for LVM
- {fstype: ext4, volume: partition-1, preserve: false, type: format, id: format-0}
- {device: disk-sda, size: -1, wipe: superblock, flag: '', number: 3,
preserve: false, grub_device: false, type: partition, id: partition-2}
#Creating Volume groups
- name: system
devices: [partition-2]
preserve: false
type: lvm_volgroup
id: lvm_volgroup-0
#Make LVM partitions
##root partition
- {name: root, volgroup: lvm_volgroup-0, size: 10%, wipe: superblock,
preserve: false, type: lvm_partition, id: lvm_partition-1}
- {fstype: ext4, volume: lvm_partition-1, preserve: false, type: format, id: format-1}
- {path: /, device: format-1, type: mount, id: mount-1}
##home partition
- {name: home, volgroup: lvm_volgroup-0, size: 15%, wipe: superblock,
preserve: false, type: lvm_partition, id: lvm_partition-2}
- {fstype: ext4, volume: lvm_partition-2, preserve: false, type: format, id: format-2}
- {path: /home, device: format-2, type: mount, id: mount-2}
##opt+safesquid
- {name: opt+safesquid, volgroup: lvm_volgroup-0, size: 5%, wipe: superblock, preserve: false,
type: lvm_partition, id: lvm_partition-3}
- {fstype: ext4, volume: lvm_partition-3, preserve: false, type: format, id: format-3}
- {path: /opt/safesquid, device: format-3, type: mount, id: mount-3}
##usr+local+safesquid
- {name: usr+local+safesquid, volgroup: lvm_volgroup-0, size: 5%, wipe: superblock, preserve: false,
type: lvm_partition, id: lvm_partition-4}
- {fstype: ext4, volume: lvm_partition-4, preserve: false, type: format, id: format-4}
- {path: /usr/local/safesquid, device: format-4, type: mount, id: mount-4}
#var+log+safesquid
- {name: var+log+safesquid, volgroup: lvm_volgroup-0, size: 25%, wipe: superblock, preserve: false,
type: lvm_partition, id: lvm_partition-5}
- {fstype: ext4, volume: lvm_partition-5, preserve: false, type: format, id: format-5}
- {path: /var/log/safesquid, device: format-5, type: mount, id: mount-5}
#var+www+safesquid
- {name: var+www+safesquid, volgroup: lvm_volgroup-0, size: 2%, wipe: superblock,
preserve: false, type: lvm_partition, id: lvm_partition-6}
- {fstype: ext4, volume: lvm_partition-6, preserve: false, type: format, id: format-6}
- {path: /var/www/safesquid, device: format-6, type: mount, id: mount-6}
#var+cache+safesquid
- {name: var+cache+safesquid, volgroup: lvm_volgroup-0, size: 2%, wipe: superblock,
preserve: false, type: lvm_partition, id: lvm_partition-7}
- {fstype: ext4, volume: lvm_partition-7, preserve: false, type: format, id: format-7}
- {path: /var/cache/safesquid, device: format-7, type: mount, id: mount-7}
#var+lib+safesquid
- {name: var+lib+safesquid, volgroup: lvm_volgroup-0, size: 2%, wipe: superblock,
preserve: false, type: lvm_partition, id: lvm_partition-8}
- {fstype: ext4, volume: lvm_partition-8, preserve: false, type: format, id: format-8}
- {path: /var/lib/safesquid, device: format-8, type: mount, id: mount-8}
#var+db+safesquid
- {name: var+db+safesquid, volgroup: lvm_volgroup-0, size: 25%, wipe: superblock,
preserve: false, type: lvm_partition, id: lvm_partition-9}
- {fstype: ext4, volume: lvm_partition-9, preserve: false, type: format, id: format-9}
- {path: /var/db/safesquid, device: format-9, type: mount, id: mount-9}
#Swap storage
- {name: swap, volgroup: lvm_volgroup-0, size: 2G, wipe: superblock,
preserve: false, type: lvm_partition, id: lvm_partition-10}
- {fstype: swap, volume: lvm_partition-10, preserve: false, type: format, id: format-10}
- {path: '', device: format-10, type: mount, id: mount-10}
- {path: /boot, device: format-0, type: mount, id: mount-0}
swap: {swap: 0}
We would want the sizes of LVM partitions to not exceed a after a certain amount, For example the partition size for /opt/safesquid should not exceed 2G in a situation wherein 5% of actual LVM volume group is more than 2G