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