Fariborz
Not sure if it is clear from your emails or not but the disk size you are 
selecting in the add instance wizard is not the root disk size, instead it is 
the size of an extra disk that will be available and attached to your instance. 
Hopefully Nux's emails make more sense to you now. 

> On Nov 21, 2013, at 4:05 AM, Fariborz Navidan <mdvlinqu...@gmail.com> wrote:
> 
> Hi.
> Can I write down the above into a shell script and add it to first boot?
> Can I then resize the root volume?
> 
> 
>> On Thu, Nov 21, 2013 at 3:22 PM, Nux! <n...@li.nux.ro> wrote:
>> 
>>> 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
> 
> 
> 
> -- 
> Fariborz Navidan
> Sales & Technical Manager
> Shetab Rayan Limited.
> www.shetabrayan.com

Reply via email to