cloudstack-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fariborz Navidan <mdvlinqu...@gmail.com>
Subject Re: Auto-resize partition when create VM
Date Thu, 21 Nov 2013 12:05:12 GMT
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! <nux@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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message