Discussion:
installing to raw whole disk device
Chuck Anderson
2015-02-04 02:11:04 UTC
Permalink
All the bits are there to be able to online resize a live KVM guest
[1] [2] [3] [4], except for one piece. You can't resize the root
partition table entry without rebooting so the kernel picks up the new
partition size. By using LVM on a partition table, you can kinda hack
around this by using --setphysicalvolumesize to the pvresize command
so it ignores the old partition size that the kernel tells it, but
this is error prone.

All this could be solved by getting rid of the partition table
completely. If only Anaconda supported installing this way:

clearpart --all --initlabel
volgroup vg00 --pesize=32768 sda
logvol / --fstype ext4 --name=root --vgname=vg00 --size=1024 --grow

Is there anyone working on support this feature?

[1] http://unix-heaven.org/node/84
[2] http://unix-heaven.org/node/85
[3] http://eioki.eu/2013/07/02/live-resize-libvirt-disk-lvm-multipath
[4] http://serverfault.com/questions/604876/online-resizing-of-kvm-guest-root-filesystem
David Lehman
2015-02-06 14:44:21 UTC
Permalink
Post by Chuck Anderson
All the bits are there to be able to online resize a live KVM guest
[1] [2] [3] [4], except for one piece. You can't resize the root
partition table entry without rebooting so the kernel picks up the new
partition size. By using LVM on a partition table, you can kinda hack
around this by using --setphysicalvolumesize to the pvresize command
so it ignores the old partition size that the kernel tells it, but
this is error prone.
All this could be solved by getting rid of the partition table
clearpart --all --initlabel
volgroup vg00 --pesize=32768 sda
logvol / --fstype ext4 --name=root --vgname=vg00 --size=1024 --grow
Is there anyone working on support this feature?
This is not in our current plans, but all you have to do is pvcreate and
vgcreate in %pre and omit the disk(s) from clearpart. Since you want
whole-disk PVs I'm assuming you don't have a deep stack on the disk
initially. If you do, I suggest you make an effort to really clear all
the metadata instead of dd to the first block or similar weak methods.

David
Post by Chuck Anderson
[1] http://unix-heaven.org/node/84
[2] http://unix-heaven.org/node/85
[3] http://eioki.eu/2013/07/02/live-resize-libvirt-disk-lvm-multipath
[4] http://serverfault.com/questions/604876/online-resizing-of-kvm-guest-root-filesystem
_______________________________________________
Anaconda-devel-list mailing list
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
Loading...