On 21.11.2013 11:30, Fariborz Navidan wrote:
If I use LVM on template, can I add a script that resizes the root
logical
volume (LV) via LVM on the first boot? Then how to get the allocated
disk
size from cloudstack?
If you user LVM inside the template, then once you add another disk (if
you're on KVM it's going to be called "/dev/vdb") you can just do:
- pvcreate /dev/vdb
- vgextend ExistingVolumeGrop /dev/vdb
- lvextend -l +100%FREE /dev/ExistingVolumeGrop/VolumeName
- resize2fs /dev/ExistingVolumeGrop/VolumeName
All the above can be run live, no reboot required (if you use ext4).
--
Sent from the Delta quadrant using Borg technology!
Nux!
www.nux.ro