For example, using the following systemdisk configuration:
<systemdisk name="AtmosInstallVG">
<volume name="root2" size="6G" />
<volume name="var" size="2G" />
</systemdisk>
Where we have the eom-systemsize set to 6G (<oem-systemsize>6144</oem-systemsize>) and swap set to 2G. Generally the disk chosen for installation could be somewhere between 200G and 1T. We would like to specify that the "var" volume use up the rest of whatever space is available. So for a 200GB system disk, if the underlying pv has ~196GB, the swap, root and root2 volumes would use 14G, and the remaining ~182G would be used for the var volume. And for a 1TB system disk, if the underlying pv has ~1000GB, the swap, root, and root2 volumes would still use 14G, but the var volume would use the remainder of 9986GB.
We would like to be able to specify that the "var" volume use up the rest of any space available on the systemdisk from within the kiwi config.xml file when the oem install is run. Is this possible?
Would it be easy to modify the oem init scripts to do this, if it is not currently possible?
We have looked at using the preCallInit hooks script to grow the partition using LVM commands (lvextend). But when that script runs, the partitions have been mounted already and growing the var partition adds a significant time/delay to the process. We used the lvextend -l option, and that allowed us to specify the logical volume size in units of "logical extents". This allows the use of %FREE for sizing the volume as a percentage of the remaining free space in the Volume Group. Is there an easy way to support running lvextend -l +100%FREE for one of the logical volumes sized in the kiwi config.xml systemdisk section within the kiwi oem init scripts? (Specifically we want to do this for the /var partition.)
Or is there a better method to do what I'm asking?
Thank you,
John Lund
EMC Atmos - Access & Platform Team
(508) 249-5473
(571) 484-0139 Mobile
lund...@emc.com
> We would like to specify that the "var" volume use up the rest
> of whatever space is available. So for a 200GB system disk,
> if the underlying pv has ~196GB, the swap, root and root2 volumes
> would use 14G, and the remaining ~182G would be used for the var volume.
> And for a 1TB system disk, if the underlying pv has ~1000GB, the swap,
> root, and root2 volumes would still use 14G, but the var volume
> would use the remainder of 9986GB.
I got your point. Unfortunately kiwi does not allow that at the moment
The volume which takes the rest space (respectively the space you give
it with oem-systemsize) is always the LVRoot volume and you can't
configure that.
Changing that is not a big deal but it must be addressed in the kiwi
code. I have opened an enhancement bug report for this here:
https://bugzilla.novell.com/show_bug.cgi?id=724489
kiwi: allow other than the LVRoot volume to take the rest space
> We have looked at using the preCallInit hooks script to grow the
> partition using LVM commands (lvextend). But when that script runs,
> the partitions have been mounted already and growing the var partition
> adds a significant time/delay to the process. We used the lvextend -l
> option, and that allowed us to specify the logical volume size in
> units of "logical extents". This allows the use of %FREE for sizing
> the volume as a percentage of the remaining free space in the Volume Group.
That's exactly the way to do it, with ext3 you can do an online resize
which means it's not a problem if the filesystem is mounted. Other
than a hook you can also do this inside the running system in
/etc/init.d/boot.local for example.
> Is there an easy way to support running lvextend -l +100%FREE for one
> of the logical volumes sized in the kiwi config.xml systemdisk section
> within the kiwi oem init scripts? (Specifically we want to do this
> for the /var partition.)
When I implement support for that you will be able to specify which
volume should take the rest space. If not set the default will be
LVRoot. But I can't prevent the significant time/delay when I have
to run
lvextend -l +100%FREE /dev/$VGROUP/$LVname
and +100%FREE means ~1TB :) So don't expect my solution to be
faster than what you are already doing. imho it will just be more
comfortable but not faster... well I will call this in an umounted
state but that doesn't make it much faster
Regards,
Marcus
--
Public Key available
gpg --keyserver gpg-keyserver.de --recv-keys 0xCCE3C6A2
-------------------------------------------------------
Marcus Schäfer (Res. & Dev.) SUSE LINUX Products GmbH
Tel: 0911-740 53 0 Maxfeldstrasse 5
FAX: 0911-740 53 479 D-90409 Nürnberg
GF: Jeff Hawn,Jennifer Guild, Felix Imendörffer
HRB: 21284 (AG Nürnberg) Germany
http://www.suse.de
-------------------------------------------------------
> I got your point. Unfortunately kiwi does not allow that at the moment
> The volume which takes the rest space (respectively the space you give
> it with oem-systemsize) is always the LVRoot volume and you can't
> configure that.
>
> Changing that is not a big deal but it must be addressed in the kiwi
> code. I have opened an enhancement bug report for this here:
>
> https://bugzilla.novell.com/show_bug.cgi?id=724489
> kiwi: allow other than the LVRoot volume to take the rest space
I have added support for this. In the next version of kiwi
(probably 4.98.3) you will have the possibility to setup which
volume should get the rest space assigned. Example:
<systemdisk>
<volume name="/var" freespace="all"/>
</systemdisk>
I plan to submit new packages on Friday this week. If you need a
new version earlier please tell me.
Let me know if this works for you
Thanks