Re: Instance with a larger disk size then Template

2017-08-07 Thread Firxiao zhang
The easier way to grow disk is using cloud-utils-growpart.
you can install it like "yum install cloud-utils-growpart"
 then  grow your partition : "growpart /dev/sda 1"
after that, you can just grow the lvm like normal.
tips. if you using "growpart" to grow  root disk, reboot is needed to take
effect.

On Sun, Aug 6, 2017 at 8:49 PM Imran Ahmed <im...@eaxiom.net> wrote:

> Hi,
> I created a small video tutorial for doing this manually   (without
> cloud-init) for Non-LVM based root disks.
>
> Here is the link : https://www.youtube.com/watch?v=cjAHbjHWRlM
>
> I am planning to do a similar one for LVM based root disks as well.
>
>
> Cheers,
>
> Imran
>
> -Original Message-
> From: Mohd Zainal Abidin [mailto:zainal@gmail.com]
> Sent: Friday, August 04, 2017 3:29 AM
> To: users@cloudstack.apache.org
> Subject: Re: Instance with a larger disk size then Template
>
> We have this issue long time ago. We manually resize root when VM's still
> running. After resize and reboot the size show correct.
>
> On Aug 4, 2017 6:25 AM, "ilya" <ilya.mailing.li...@gmail.com> wrote:
>
> > Just a thought - as i do this very frequently.
> >
> > If you are using LVM on your ROOT partition - you dont need to power it
> > on via Live CD.
> >
> > It can all be done online while the system running.
> >
> >
> >
> >
> > On 8/3/17 6:40 AM, Imran Ahmed wrote:
> > > Hi Erik,
> > >
> > > Thanks for suggestion, I tried this too and was successful till
> > lvextending the logical volume. However at the stage of running resize2fs
> > it produced errors like : Bad super block..."  so I ended up installing
> > from an ISO and partitioning without LVM this time so that I could use
> this
> > template to resize in future.
> > >
> > > Cheers,
> > >
> > > Imran
> > >
> > > -Original Message-
> > > From: Erik Weber [mailto:terbol...@gmail.com]
> > > Sent: Thursday, August 03, 2017 3:56 PM
> > > To: users@cloudstack.apache.org
> > > Subject: Re: Instance with a larger disk size then Template
> > >
> > > A faster approach than those mentioned is to create a new partition on
> > > the unused disk space, and add it to the volume group, then use
> > > lvextend and resizing the fs.
> > >
> > > On Thu, Aug 3, 2017 at 12:00 PM, Imran Ahmed <im...@eaxiom.net> wrote:
> > >> Hi All,
> > >>
> > >> I am creating an instance with a 300GB disk from a CentOS 7 template
> > that
> > >> has 5GB disk (LVM Based).
> > >> The issue is that the root LVM partition inside the new VM instance
> > still
> > >> shows 5GB .
> > >>
> > >> The device size  (/dev/vda) however shows 300GB.  The question is what
> > is
> > >> the best strategy to resize the root LVM partition so that I could use
> > all
> > >> 300G.
> > >>
> > >> Kind regards,
> > >>
> > >> Imran
> > >>
> > >
> >
>
>


RE: Instance with a larger disk size then Template

2017-08-06 Thread Imran Ahmed
Hi, 
I created a small video tutorial for doing this manually   (without cloud-init) 
for Non-LVM based root disks.

Here is the link : https://www.youtube.com/watch?v=cjAHbjHWRlM

I am planning to do a similar one for LVM based root disks as well.


Cheers,

Imran

-Original Message-
From: Mohd Zainal Abidin [mailto:zainal@gmail.com] 
Sent: Friday, August 04, 2017 3:29 AM
To: users@cloudstack.apache.org
Subject: Re: Instance with a larger disk size then Template

We have this issue long time ago. We manually resize root when VM's still
running. After resize and reboot the size show correct.

On Aug 4, 2017 6:25 AM, "ilya" <ilya.mailing.li...@gmail.com> wrote:

> Just a thought - as i do this very frequently.
>
> If you are using LVM on your ROOT partition - you dont need to power it
> on via Live CD.
>
> It can all be done online while the system running.
>
>
>
>
> On 8/3/17 6:40 AM, Imran Ahmed wrote:
> > Hi Erik,
> >
> > Thanks for suggestion, I tried this too and was successful till
> lvextending the logical volume. However at the stage of running resize2fs
> it produced errors like : Bad super block..."  so I ended up installing
> from an ISO and partitioning without LVM this time so that I could use this
> template to resize in future.
> >
> > Cheers,
> >
> > Imran
> >
> > -Original Message-
> > From: Erik Weber [mailto:terbol...@gmail.com]
> > Sent: Thursday, August 03, 2017 3:56 PM
> > To: users@cloudstack.apache.org
> > Subject: Re: Instance with a larger disk size then Template
> >
> > A faster approach than those mentioned is to create a new partition on
> > the unused disk space, and add it to the volume group, then use
> > lvextend and resizing the fs.
> >
> > On Thu, Aug 3, 2017 at 12:00 PM, Imran Ahmed <im...@eaxiom.net> wrote:
> >> Hi All,
> >>
> >> I am creating an instance with a 300GB disk from a CentOS 7 template
> that
> >> has 5GB disk (LVM Based).
> >> The issue is that the root LVM partition inside the new VM instance
> still
> >> shows 5GB .
> >>
> >> The device size  (/dev/vda) however shows 300GB.  The question is what
> is
> >> the best strategy to resize the root LVM partition so that I could use
> all
> >> 300G.
> >>
> >> Kind regards,
> >>
> >> Imran
> >>
> >
>



Re: Instance with a larger disk size then Template

2017-08-03 Thread Mohd Zainal Abidin
We have this issue long time ago. We manually resize root when VM's still
running. After resize and reboot the size show correct.

On Aug 4, 2017 6:25 AM, "ilya" <ilya.mailing.li...@gmail.com> wrote:

> Just a thought - as i do this very frequently.
>
> If you are using LVM on your ROOT partition - you dont need to power it
> on via Live CD.
>
> It can all be done online while the system running.
>
>
>
>
> On 8/3/17 6:40 AM, Imran Ahmed wrote:
> > Hi Erik,
> >
> > Thanks for suggestion, I tried this too and was successful till
> lvextending the logical volume. However at the stage of running resize2fs
> it produced errors like : Bad super block..."  so I ended up installing
> from an ISO and partitioning without LVM this time so that I could use this
> template to resize in future.
> >
> > Cheers,
> >
> > Imran
> >
> > -Original Message-
> > From: Erik Weber [mailto:terbol...@gmail.com]
> > Sent: Thursday, August 03, 2017 3:56 PM
> > To: users@cloudstack.apache.org
> > Subject: Re: Instance with a larger disk size then Template
> >
> > A faster approach than those mentioned is to create a new partition on
> > the unused disk space, and add it to the volume group, then use
> > lvextend and resizing the fs.
> >
> > On Thu, Aug 3, 2017 at 12:00 PM, Imran Ahmed <im...@eaxiom.net> wrote:
> >> Hi All,
> >>
> >> I am creating an instance with a 300GB disk from a CentOS 7 template
> that
> >> has 5GB disk (LVM Based).
> >> The issue is that the root LVM partition inside the new VM instance
> still
> >> shows 5GB .
> >>
> >> The device size  (/dev/vda) however shows 300GB.  The question is what
> is
> >> the best strategy to resize the root LVM partition so that I could use
> all
> >> 300G.
> >>
> >> Kind regards,
> >>
> >> Imran
> >>
> >
>


Re: Instance with a larger disk size then Template

2017-08-03 Thread ilya
Just a thought - as i do this very frequently.

If you are using LVM on your ROOT partition - you dont need to power it
on via Live CD.

It can all be done online while the system running.




On 8/3/17 6:40 AM, Imran Ahmed wrote:
> Hi Erik,
> 
> Thanks for suggestion, I tried this too and was successful till lvextending 
> the logical volume. However at the stage of running resize2fs  it produced 
> errors like : Bad super block..."  so I ended up installing from an ISO and 
> partitioning without LVM this time so that I could use this template to 
> resize in future.
> 
> Cheers,
> 
> Imran 
> 
> -Original Message-
> From: Erik Weber [mailto:terbol...@gmail.com] 
> Sent: Thursday, August 03, 2017 3:56 PM
> To: users@cloudstack.apache.org
> Subject: Re: Instance with a larger disk size then Template
> 
> A faster approach than those mentioned is to create a new partition on
> the unused disk space, and add it to the volume group, then use
> lvextend and resizing the fs.
> 
> On Thu, Aug 3, 2017 at 12:00 PM, Imran Ahmed <im...@eaxiom.net> wrote:
>> Hi All,
>>
>> I am creating an instance with a 300GB disk from a CentOS 7 template that
>> has 5GB disk (LVM Based).
>> The issue is that the root LVM partition inside the new VM instance  still
>> shows 5GB .
>>
>> The device size  (/dev/vda) however shows 300GB.  The question is what is
>> the best strategy to resize the root LVM partition so that I could use all
>> 300G.
>>
>> Kind regards,
>>
>> Imran
>>
> 


RE: Instance with a larger disk size then Template

2017-08-03 Thread Rodrigo Baldasso
We don't use lvm inside containers here because we find out that is easier to 
resize without it. 

You can even boot up with an GParted ISO that's makes very simple resizing the 
VM (even the client can do it) with very small risk comparing to use manual 
tools.

- - - - - - - - - - - - - - - - - - -

Rodrigo Baldasso - LHOST

(51) 9 8419-9861
- - - - - - - - - - - - - - - - - - -
On 03/08/2017 10:41:00, Imran Ahmed <im...@eaxiom.net> wrote:
Hi Erik,

Thanks for suggestion, I tried this too and was successful till lvextending the 
logical volume. However at the stage of running resize2fs it produced errors 
like : Bad super block..." so I ended up installing from an ISO and 
partitioning without LVM this time so that I could use this template to resize 
in future.

Cheers,

Imran

-Original Message-
From: Erik Weber [mailto:terbol...@gmail.com]
Sent: Thursday, August 03, 2017 3:56 PM
To: users@cloudstack.apache.org
Subject: Re: Instance with a larger disk size then Template

A faster approach than those mentioned is to create a new partition on
the unused disk space, and add it to the volume group, then use
lvextend and resizing the fs.

On Thu, Aug 3, 2017 at 12:00 PM, Imran Ahmed wrote:
> Hi All,
>
> I am creating an instance with a 300GB disk from a CentOS 7 template that
> has 5GB disk (LVM Based).
> The issue is that the root LVM partition inside the new VM instance still
> shows 5GB .
>
> The device size (/dev/vda) however shows 300GB. The question is what is
> the best strategy to resize the root LVM partition so that I could use all
> 300G.
>
> Kind regards,
>
> Imran
>



RE: Instance with a larger disk size then Template

2017-08-03 Thread Imran Ahmed
Hi Erik,

Thanks for suggestion, I tried this too and was successful till lvextending the 
logical volume. However at the stage of running resize2fs  it produced errors 
like : Bad super block..."  so I ended up installing from an ISO and 
partitioning without LVM this time so that I could use this template to resize 
in future.

Cheers,

Imran 

-Original Message-
From: Erik Weber [mailto:terbol...@gmail.com] 
Sent: Thursday, August 03, 2017 3:56 PM
To: users@cloudstack.apache.org
Subject: Re: Instance with a larger disk size then Template

A faster approach than those mentioned is to create a new partition on
the unused disk space, and add it to the volume group, then use
lvextend and resizing the fs.

On Thu, Aug 3, 2017 at 12:00 PM, Imran Ahmed <im...@eaxiom.net> wrote:
> Hi All,
>
> I am creating an instance with a 300GB disk from a CentOS 7 template that
> has 5GB disk (LVM Based).
> The issue is that the root LVM partition inside the new VM instance  still
> shows 5GB .
>
> The device size  (/dev/vda) however shows 300GB.  The question is what is
> the best strategy to resize the root LVM partition so that I could use all
> 300G.
>
> Kind regards,
>
> Imran
>



Re: Instance with a larger disk size then Template

2017-08-03 Thread Erik Weber
A faster approach than those mentioned is to create a new partition on
the unused disk space, and add it to the volume group, then use
lvextend and resizing the fs.

On Thu, Aug 3, 2017 at 12:00 PM, Imran Ahmed  wrote:
> Hi All,
>
> I am creating an instance with a 300GB disk from a CentOS 7 template that
> has 5GB disk (LVM Based).
> The issue is that the root LVM partition inside the new VM instance  still
> shows 5GB .
>
> The device size  (/dev/vda) however shows 300GB.  The question is what is
> the best strategy to resize the root LVM partition so that I could use all
> 300G.
>
> Kind regards,
>
> Imran
>


Re: Instance with a larger disk size then Template

2017-08-03 Thread Dag Sonstebo
Hi Imran,

If you create a VM from template then the root disk adopts the size of the 
original template – and the disk size your select is for *additional data 
disks*. So you probably now how a 5GB root disk and a 300GB data disk attached.

In that case you should no use LVM to extend the root partition if you ever 
want to rely on volume snapshots. There is no mechanism in CloudStack to 
exactly time snapshots of two disks part of the same volume group – hence you 
can never use this for recovery.

All in all CloudStack works on the premise that your VM system volume resides 
on a single disk – hence you will run into problems if you go outside these 
boundaries. Your best bet is to either 1) build from ISO and select the 300GB 
disk – which will now apply to the root disk, or 2) resize your root disk and 
use the LVM processes described in the other emails to expand into the free 
space.

Regards,
Dag Sonstebo
Cloud Architect
ShapeBlue

On 03/08/2017, 11:15, "Imran Ahmed" <im...@eaxiom.net> wrote:

Hi Dag,

Thanks for  your prompt reply.   During the creation of new instance I set 
the size of root disk to 300G. Once the instance was created , the device 
/dev/vda was created with 300G size.  However the LVM partition still shows 5G 
size.  (same is shown under in df -h)

Regards,

Imran  

-Original Message-
From: Dag Sonstebo [mailto:dag.sonst...@shapeblue.com] 
Sent: Thursday, August 03, 2017 3:08 PM
To: users@cloudstack.apache.org
    Subject: Re: Instance with a larger disk size then Template

Hi Imran,

Can you elaborate – you say your template had a 5GB root disk. Did you 
resize this, or did you add a disk?

If you resized it then all you need to do is use your LVM and filesystem 
tools to expand your partition. 

Regards,
Dag Sonstebo
Cloud Architect
ShapeBlue

On 03/08/2017, 11:00, "Imran Ahmed" <im...@eaxiom.net> wrote:

Hi All,

I am creating an instance with a 300GB disk from a CentOS 7 template 
that
has 5GB disk (LVM Based).
The issue is that the root LVM partition inside the new VM instance  
still
shows 5GB .  

The device size  (/dev/vda) however shows 300GB.  The question is what 
is
the best strategy to resize the root LVM partition so that I could use 
all
300G.

Kind regards,

Imran 




dag.sonst...@shapeblue.com 
www.shapeblue.com
53 Chandos Place, Covent Garden, London  WC2N 4HSUK
@shapeblue
  
 





dag.sonst...@shapeblue.com 
www.shapeblue.com
53 Chandos Place, Covent Garden, London  WC2N 4HSUK
@shapeblue
  
 



RE: Instance with a larger disk size then Template

2017-08-03 Thread Imran Ahmed
Hi Swen,

I am thankful for the detailed technical explanation. I will try to expand
the LVM partition by booting from the CentOS CD and will come back to  you
if I need further support.

Cheers,

Imran 

-Original Message-
From: S. Brüseke - proIO GmbH [mailto:s.brues...@proio.com] 
Sent: Thursday, August 03, 2017 3:18 PM
To: users@cloudstack.apache.org
Subject: AW: Instance with a larger disk size then Template

Hi Imran,

you are talking about 3 different levels here to reach your goal of resizing
a volume. First level is the volume itself. This is what you can do within
CS. After that you need to extend the partition and then you need to expand
the filesystem. The last to levels you need to do within the os of the
server.

What we do is using cloud-init within our template to automate this. But our
templates do not use LVM. Our templates are checking at boot if the root
volume has been extended and expanding the partition and the filesystem.

If you want to know more about it, I can give you more details.

Mit freundlichen Grüßen / With kind regards,

Swen Brüseke

-Ursprüngliche Nachricht-
Von: Imran Ahmed [mailto:im...@eaxiom.net] 
Gesendet: Donnerstag, 3. August 2017 12:00
An: users@cloudstack.apache.org
Betreff: Instance with a larger disk size then Template

Hi All,

I am creating an instance with a 300GB disk from a CentOS 7 template that
has 5GB disk (LVM Based).
The issue is that the root LVM partition inside the new VM instance  still
shows 5GB .  

The device size  (/dev/vda) however shows 300GB.  The question is what is
the best strategy to resize the root LVM partition so that I could use all
300G.

Kind regards,

Imran 



- proIO GmbH -
Geschäftsführer: Swen Brüseke
Sitz der Gesellschaft: Frankfurt am Main

USt-IdNr. DE 267 075 918
Registergericht: Frankfurt am Main - HRB 86239

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
Informationen. 
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich
erhalten haben, 
informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. 
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind
nicht gestattet. 

This e-mail may contain confidential and/or privileged information. 
If you are not the intended recipient (or have received this e-mail in
error) please notify 
the sender immediately and destroy this e-mail.  
Any unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden. 




RE: Instance with a larger disk size then Template

2017-08-03 Thread Imran Ahmed
Hi Makran,
I appreciate your reply on this. I will complete the procedure that you have 
mentioned.

Kind regards,
Imran

-Original Message-
From: Makrand [mailto:makrandsa...@gmail.com] 
Sent: Thursday, August 03, 2017 3:10 PM
To: users@cloudstack.apache.org
Subject: Re: Instance with a larger disk size then Template

Imran,

>From Linux POV, boot VM from live centos DVD/ISO and then go on for
extending root LVM partition. Once you boot into live ISO, the existing
root will be just another lvm and can be extended by using existing unused
space on vggroup.

If you don't wanna do all time with new VM, then set correct root partition
size for new VM, take snap of root and get new template form this and use
it in future

--
Makrand


On Thu, Aug 3, 2017 at 3:30 PM, Imran Ahmed <im...@eaxiom.net> wrote:

> Hi All,
>
> I am creating an instance with a 300GB disk from a CentOS 7 template that
> has 5GB disk (LVM Based).
> The issue is that the root LVM partition inside the new VM instance  still
> shows 5GB .
>
> The device size  (/dev/vda) however shows 300GB.  The question is what is
> the best strategy to resize the root LVM partition so that I could use all
> 300G.
>
> Kind regards,
>
> Imran
>
>



RE: Instance with a larger disk size then Template

2017-08-03 Thread Imran Ahmed
Hi Dag,

Thanks for  your prompt reply.   During the creation of new instance I set the 
size of root disk to 300G. Once the instance was created , the device /dev/vda 
was created with 300G size.  However the LVM partition still shows 5G size.  
(same is shown under in df -h)

Regards,

Imran  

-Original Message-
From: Dag Sonstebo [mailto:dag.sonst...@shapeblue.com] 
Sent: Thursday, August 03, 2017 3:08 PM
To: users@cloudstack.apache.org
Subject: Re: Instance with a larger disk size then Template

Hi Imran,

Can you elaborate – you say your template had a 5GB root disk. Did you resize 
this, or did you add a disk?

If you resized it then all you need to do is use your LVM and filesystem tools 
to expand your partition. 

Regards,
Dag Sonstebo
Cloud Architect
ShapeBlue

On 03/08/2017, 11:00, "Imran Ahmed" <im...@eaxiom.net> wrote:

Hi All,

I am creating an instance with a 300GB disk from a CentOS 7 template that
has 5GB disk (LVM Based).
The issue is that the root LVM partition inside the new VM instance  still
shows 5GB .  

The device size  (/dev/vda) however shows 300GB.  The question is what is
the best strategy to resize the root LVM partition so that I could use all
300G.

Kind regards,

Imran 




dag.sonst...@shapeblue.com 
www.shapeblue.com
53 Chandos Place, Covent Garden, London  WC2N 4HSUK
@shapeblue
  
 




Re: Instance with a larger disk size then Template

2017-08-03 Thread Makrand
Imran,

>From Linux POV, boot VM from live centos DVD/ISO and then go on for
extending root LVM partition. Once you boot into live ISO, the existing
root will be just another lvm and can be extended by using existing unused
space on vggroup.

If you don't wanna do all time with new VM, then set correct root partition
size for new VM, take snap of root and get new template form this and use
it in future

--
Makrand


On Thu, Aug 3, 2017 at 3:30 PM, Imran Ahmed  wrote:

> Hi All,
>
> I am creating an instance with a 300GB disk from a CentOS 7 template that
> has 5GB disk (LVM Based).
> The issue is that the root LVM partition inside the new VM instance  still
> shows 5GB .
>
> The device size  (/dev/vda) however shows 300GB.  The question is what is
> the best strategy to resize the root LVM partition so that I could use all
> 300G.
>
> Kind regards,
>
> Imran
>
>


Re: Instance with a larger disk size then Template

2017-08-03 Thread Dag Sonstebo
Hi Imran,

Can you elaborate – you say your template had a 5GB root disk. Did you resize 
this, or did you add a disk?

If you resized it then all you need to do is use your LVM and filesystem tools 
to expand your partition. 

Regards,
Dag Sonstebo
Cloud Architect
ShapeBlue

On 03/08/2017, 11:00, "Imran Ahmed"  wrote:

Hi All,

I am creating an instance with a 300GB disk from a CentOS 7 template that
has 5GB disk (LVM Based).
The issue is that the root LVM partition inside the new VM instance  still
shows 5GB .  

The device size  (/dev/vda) however shows 300GB.  The question is what is
the best strategy to resize the root LVM partition so that I could use all
300G.

Kind regards,

Imran 




dag.sonst...@shapeblue.com 
www.shapeblue.com
53 Chandos Place, Covent Garden, London  WC2N 4HSUK
@shapeblue