I'm looking for a way of partitioning (in the end for a kickstart file for vm's) so that increasing of disk space is possible without taking the vm offline (no problem with lvm) but also without deleting/recreating the partitions - with onboard tools of centos.
Is there a possible way?
Thanks!
EDIT: This are my actual partition options in the kickstart file:
## Disk partitioning information
part pv.192 --fstype="lvmpv" --ondisk=sda --size=1 --grow
volgroup centos --pesize=4096 pv.192
logvol / fstype="xfs" --name=root --vgname=centos --maxsize=51200 --size=5024 --grow
logvol swap --fstype="swap" --size=4096 --name=swap --vgname=centos
part pv.193 --fstype="lvmpv" --ondisk=sdb --size=1 --grow
volgroup logs --pesize=4096 pv.193
logvol /var/log --fstype="xfs" --maxsize=51200 --size=8192 --grow --name=log --vgname=logs
The drawback here is, that I have to delete/recreate the volume when resizing them.
This is what it looks like:
[root@localhost ~]# ssm list
-----------------------------------------------------------
Device Free Used Total Pool Mount point
-----------------------------------------------------------
/dev/sda 21.00 GB PARTITIONED
/dev/sda1 1.00 GB /boot
/dev/sda2 0.00 KB 20.00 GB 20.00 GB centos
/dev/sdb 32.00 GB
/dev/sdb1 0.00 KB 32.00 GB 32.00 GB logs
-----------------------------------------------------------
--------------------------------------------------
Pool Type Devices Free Used Total
--------------------------------------------------
centos lvm 1 0.00 KB 20.00 GB 20.00 GB
logs lvm 1 0.00 KB 32.00 GB 32.00 GB
--------------------------------------------------
--------------------------------------------------------------------------------------
Volume Pool Volume size FS FS size Free Type Mount point
--------------------------------------------------------------------------------------
/dev/centos/root centos 16.00 GB xfs 15.99 GB 14.99 GB linear /
/dev/centos/swap centos 4.00 GB linear
/dev/logs/log logs 32.00 GB xfs 31.98 GB 31.95 GB linear /var/log
/dev/sda1 1.00 GB xfs 1014.00 MB 871.73 MB part /boot
--------------------------------------------------------------------------------------
And this is what I want (vdb, vdc, vdd) - but also for OS disk:
[root@vm1 isolinux]# ssm list
-------------------------------------------------------------
Device Free Used Total Pool Mount point
-------------------------------------------------------------
/dev/vda 445.00 GB PARTITIONED
/dev/vda1 1.00 GB /boot
/dev/vda2 0.00 KB 439.00 GB 439.00 GB centos
/dev/vdb 0.00 KB 30.00 GB 30.00 GB centos
/dev/vdc 0.00 KB 20.00 GB 20.00 GB testvg
/dev/vdd 0.00 KB 40.00 GB 40.00 GB vg_vdd
-------------------------------------------------------------
----------------------------------------------------
Pool Type Devices Free Used Total
----------------------------------------------------
centos lvm 2 0.00 KB 468.99 GB 468.99 GB
testvg lvm 1 0.00 KB 20.00 GB 20.00 GB
vg_vdd lvm 1 0.00 KB 40.00 GB 40.00 GB
----------------------------------------------------
---------------------------------------------------------------------------------------------
Volume Pool Volume size FS FS size Free Type Mount point
---------------------------------------------------------------------------------------------
/dev/centos/root centos 440.00 GB xfs 439.98 GB 374.89 GB linear /
/dev/centos/swap centos 4.00 GB linear
/dev/vg_vdd/lv_vdd vg_vdd 40.00 GB xfs 39.99 GB 39.99 GB linear
/dev/centos/TEST-SDB centos 25.00 GB xfs 24.99 GB 24.99 GB linear
/dev/testvg/lv_vdc-test testvg 20.00 GB xfs 19.99 GB 19.99 GB linear
/dev/vda1 1.00 GB xfs 1014.00 MB 790.33 MB part /boot
---------------------------------------------------------------------------------------------
I want to use LVM and have my filesystems (including the OS) directly on the disks. Is there a way in the "disk partition information" part, or do I have to make that changes in the %post sektor (which would exclude the OS disk).
Thanks for any hint!