Re: [CentOS-virt] Resizing EXT3 partition in guest instance CentOS5

2011-03-13 Thread Poh Yong Hwang
Hi,

Sorry to bring this up again. Now i am trying the clonezilla method to
downsize one of my VM. I have created a smaller storage volume and added to
the VM. I boot up wih clonezilla but have issue cloning the drive over.
Should I use Disk-Image or Device-Device?

Please advise.

Thanks!

Yongsan

On Mon, Feb 7, 2011 at 3:09 AM, compdoc comp...@hotrodpc.com wrote:

 Well, I can tell you how I do it. Might help…



 1) create a new storage volume of the size you want with Virtual Manager.
 (Host detailsStorage tab)



 2) shut down the VM and add the new volume to the VM ( it now has two
 virtual drives - the original and the new)



 3) boot with clonezilla, clone one drive to the other. Then boot gparted
 and resize as needed



 4) delete both drives from the vm, and then add back the new volume. Boot.



 5) keep the old, smaller volume around for a while as backup.





 When you add a volume, Virtual Manager assigns a device name to it: hda to
 the first drive, hdb to the second, ect.



 So, you have to delete them both to get Virtual Manager to assign hda to
 the new one, otherwise the OS will not be able to boot.





 ___
 CentOS-virt mailing list
 CentOS-virt@centos.org
 http://lists.centos.org/mailman/listinfo/centos-virt


___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt


Re: [CentOS-virt] Resizing EXT3 partition in guest instance CentOS5

2011-03-13 Thread compdoc
 Sorry to bring this up again. Now i am trying

the clonezilla method to downsize one of my

VM. I have created a smaller storage volume

and added to the VM. I boot up wih clonezilla

but have issue cloning the drive over. Should

I use Disk-Image or Device-Device?

 

 

To make it smaller, you need to resize your partition(s) first with gparted,
and then use device-device if you have both 'drives' mounted. This clones
the drive. 

 

Use Disk-Image only if you want to store a copy of the drive to local or
remote storage. This creates a file backup of the disk. 

 

 

___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt


Re: [CentOS-virt] Resizing EXT3 partition in guest instance CentOS5

2011-03-13 Thread Poh Yong Hwang
Hi,

Thanks! It works!

:)

Yongsan

On Sun, Mar 13, 2011 at 7:47 PM, compdoc comp...@hotrodpc.com wrote:

  Sorry to bring this up again. Now i am trying

 the clonezilla method to downsize one of my

 VM. I have created a smaller storage volume

 and added to the VM. I boot up wih clonezilla

 but have issue cloning the drive over. Should

 I use Disk-Image or Device-Device?





 To make it smaller, you need to resize your partition(s) first with
 gparted, and then use device-device if you have both 'drives' mounted. This
 clones the drive.



 Use Disk-Image only if you want to store a copy of the drive to local or
 remote storage. This creates a file backup of the disk.





 ___
 CentOS-virt mailing list
 CentOS-virt@centos.org
 http://lists.centos.org/mailman/listinfo/centos-virt


___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt


Re: [CentOS-virt] Resizing EXT3 partition in guest instance CentOS5

2011-02-06 Thread Poh Yong Hwang
Hi,

I have an issue. I have already resize the partition using Gparted. Now how
can i resize the actual image size in virtual manager? I do not see any
option for me to change the size of the allocated hard disk.

Please advise.

Thanks!

On Wed, Jan 26, 2011 at 6:54 PM, Poh Yong Hwang yong...@gmail.com wrote:

 Hi,

 Great! Thanks for the quick response. I will try it out then. Yes. I do
 have backup for the host as well as the guest nodes. :)

 Regards
 yongsan

 On Wed, Jan 26, 2011 at 6:43 PM, Lorenzo Quatrini 
 lorenzo.quatr...@gmail.com wrote:

 Poh Yong Hwang ha scritto:
  Hi,
 
  I have two guest vm instance running CentOS 5 with ext3 partition. I
  will like to reduce 1 VM harddisk space and using the 'release' harddisk
  space to add onto my second VM. Basically I need to know how can I
  reduce and increase an ext3 partition in CentOS KVM. I did a search and
  basically i can do it by booting the VM using Knoppix and use Gparted to
  reduce and increase the diskspace. I am thinking of the following
 
  1) Boot first VM using Knoppix
  2) Reduce the ext3 partition disk size using Gparted
  3) Shutdown the VM and resize the diskspace using Virtual Manager
  4) Increae the diskspace of the second VM using Virtual Manager
  5) Boot up second VM using Knoppix
  6) Increase the ext3 partition disk size using Gparted
  7) Reboot the second VM
 
  As this is the first time i am doing it, will these work? Anyone has
  experience resiziing their EXT3 partition in KVM environment before?
 
  Thanks!
 
  Regards
  yongsan
 
 I guess it would work, but just in case remember: do backup beforehand :D

 Regards
 Lorenzo
 ___
 CentOS-virt mailing list
 CentOS-virt@centos.org
 http://lists.centos.org/mailman/listinfo/centos-virt



___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt


Re: [CentOS-virt] Resizing EXT3 partition in guest instance CentOS5

2011-02-06 Thread Kenni Lund
2011/2/6 Poh Yong Hwang yong...@gmail.com:
 Hi,
 I have an issue. I have already resize the partition using Gparted. Now how
 can i resize the actual image size in virtual manager? I do not see any
 option for me to change the size of the allocated hard disk.

You're probably looking for the resize feature of the qemu-img
command, I'm fairly sure that virt-manager doesn't do resizing:
man qemu-img

Best regards
Kenni
___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt


Re: [CentOS-virt] Resizing EXT3 partition in guest instance CentOS5

2011-02-06 Thread compdoc
Well, I can tell you how I do it. Might help.

 

1) create a new storage volume of the size you want with Virtual Manager.
(Host detailsStorage tab)

 

2) shut down the VM and add the new volume to the VM ( it now has two
virtual drives - the original and the new)

 

3) boot with clonezilla, clone one drive to the other. Then boot gparted and
resize as needed

 

4) delete both drives from the vm, and then add back the new volume. Boot.

 

5) keep the old, smaller volume around for a while as backup.

 

 

When you add a volume, Virtual Manager assigns a device name to it: hda to
the first drive, hdb to the second, ect. 

 

So, you have to delete them both to get Virtual Manager to assign hda to the
new one, otherwise the OS will not be able to boot.

 

 

___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt


Re: [CentOS-virt] Resizing EXT3 partition in guest instance CentOS5

2011-02-06 Thread Poh Yong Hwang
Hi,

Thanks but my issue is i do not have enough diskspace to create another
partition of the size that i needed. Is there a way for me to reduce the
actual image size?

Thanks!

On Mon, Feb 7, 2011 at 3:09 AM, compdoc comp...@hotrodpc.com wrote:

 Well, I can tell you how I do it. Might help…



 1) create a new storage volume of the size you want with Virtual Manager.
 (Host detailsStorage tab)



 2) shut down the VM and add the new volume to the VM ( it now has two
 virtual drives - the original and the new)



 3) boot with clonezilla, clone one drive to the other. Then boot gparted
 and resize as needed



 4) delete both drives from the vm, and then add back the new volume. Boot.



 5) keep the old, smaller volume around for a while as backup.





 When you add a volume, Virtual Manager assigns a device name to it: hda to
 the first drive, hdb to the second, ect.



 So, you have to delete them both to get Virtual Manager to assign hda to
 the new one, otherwise the OS will not be able to boot.





 ___
 CentOS-virt mailing list
 CentOS-virt@centos.org
 http://lists.centos.org/mailman/listinfo/centos-virt


___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt


Re: [CentOS-virt] Resizing EXT3 partition in guest instance CentOS5

2011-02-06 Thread Poh Yong Hwang
Hi Kenni,

Sorry i might have miss it but if i do a man of qemu-img, i do not see
resize option. I only see create, convert, commit and info.

Thanks

On Mon, Feb 7, 2011 at 3:18 AM, Kenni Lund ke...@kelu.dk wrote:

 2011/2/6 Poh Yong Hwang yong...@gmail.com:
  Hi,
  Thanks but my issue is i do not have enough diskspace to create another
  partition of the size that i needed. Is there a way for me to reduce the
  actual image size?

 Yes, like I wrote 10 minutes ago: qemu-img resize

 Best regards
 Kenni
 ___
 CentOS-virt mailing list
 CentOS-virt@centos.org
 http://lists.centos.org/mailman/listinfo/centos-virt

___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt


Re: [CentOS-virt] Resizing EXT3 partition in guest instance CentOS5

2011-02-06 Thread Kenni Lund
2011/2/6 Poh Yong Hwang yong...@gmail.com:
 Hi Kenni,
 Sorry i might have miss it but if i do a man of qemu-img, i do not see
 resize option. I only see create, convert, commit and info.

Ohh, I'm sorry then :( Guess the qemu-img version in CentOS 5 just is too old...

qemu-img *is* the tool you want, nevertheless...you might want to use
another system with a newer version of qemu-img to do the resizing or
manually compiling a newer version of qemu-kvm on your current system
(to avoid conflicts with the installed qemu-kvm version). Otherwise
you'll have to use another approach, like the one compdoc proposed.

Best regards
Kenni
___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt


Re: [CentOS-virt] Resizing EXT3 partition in guest instance CentOS5

2011-02-06 Thread compdoc
You can't add a drive temporarily and have Virtual Manager create the new
volume there? I would think even a USB stick would work...




___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt


Re: [CentOS-virt] Resizing EXT3 partition in guest instance CentOS5

2011-02-06 Thread Thomas Smith
I am coming into this discussion a little late, so apologies if I ask for any 
information previously provided.

I can help you with this, but I'll need to know the domU's file system layout 
to do so. Can you send the output of the following commands?
* fdisk -l
* mount
* df -h

And if you're using LVM:
* vgdisplay
* lvdisplay

~ Tom
(Sent from my mobile.)

On Feb 6, 2011, at 12:25, Poh Yong Hwang yong...@gmail.com wrote:

 Hi Kenni,
 
 Sorry i might have miss it but if i do a man of qemu-img, i do not see resize 
 option. I only see create, convert, commit and info.
 
 Thanks
 
 On Mon, Feb 7, 2011 at 3:18 AM, Kenni Lund ke...@kelu.dk wrote:
 2011/2/6 Poh Yong Hwang yong...@gmail.com:
  Hi,
  Thanks but my issue is i do not have enough diskspace to create another
  partition of the size that i needed. Is there a way for me to reduce the
  actual image size?
 
 Yes, like I wrote 10 minutes ago: qemu-img resize
 
 Best regards
 Kenni
 ___
 CentOS-virt mailing list
 CentOS-virt@centos.org
 http://lists.centos.org/mailman/listinfo/centos-virt
 
 ___
 CentOS-virt mailing list
 CentOS-virt@centos.org
 http://lists.centos.org/mailman/listinfo/centos-virt
___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt


Re: [CentOS-virt] Resizing EXT3 partition in guest instance CentOS5

2011-02-06 Thread Kenni Lund
2011/2/6 Thomas Smith theitsm...@gmail.com:
 I am coming into this discussion a little late, so apologies if I ask for
 any information previously provided.
 I can help you with this, but I'll need to know the domU's file system
 layout to do so. Can you send the output of the following commands?
 * fdisk -l
 * mount
 * df -h
 And if you're using LVM:
 * vgdisplay
 * lvdisplay

KVM not Xen according to original post - and the partition in the
guest has already been resized with gparted, so no reason to perform
any more actions within the guest - only thing missing is to resize
the qemu image on the host (I assume the OP is using regular
file-based images in virt-manager as nothing has been mentioned about
this, eg. not iSCSI, NFS, LVM, etc.).

Best regards
Kenni
___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt


Re: [CentOS-virt] Resizing EXT3 partition in guest instance CentOS5

2011-02-06 Thread Poh Yong Hwang
Hi,

Apologies for the late reply. Here is the result of the command:

qemu-img info staging.img
image: staging.img
file format: raw
virtual size: 195G (20971520 bytes)
disk size: 196G

Yes. I am looking to reduce this size to 100G.

Thanks!

On Mon, Feb 7, 2011 at 7:35 AM, Thomas Smith theitsm...@gmail.com wrote:

 I see. So we are looking to decrease the size, not increase it. (I also
 assumed we were talking about a disk image.)

 OP, what are you using as the backing storage device? That is, are you
 using a disk image or a block device?

 If you are using a disk image, what format is the image? QCOW2? RAW?
 Something else?
 * Use qemu-img info disk.img to determine this. Execute this command on
 the host.

 If you are using a block device, knowledge of your file system structure
 (on the host) will be necessary.

 On Sun, Feb 6, 2011 at 1:14 PM, Kenni Lund ke...@kelu.dk wrote:

 2011/2/6 Thomas Smith theitsm...@gmail.com:
  I am coming into this discussion a little late, so apologies if I ask
 for
  any information previously provided.
  I can help you with this, but I'll need to know the domU's file system
  layout to do so. Can you send the output of the following commands?
  * fdisk -l
  * mount
  * df -h
  And if you're using LVM:
  * vgdisplay
  * lvdisplay

 KVM not Xen according to original post - and the partition in the
 guest has already been resized with gparted, so no reason to perform
 any more actions within the guest - only thing missing is to resize
 the qemu image on the host (I assume the OP is using regular
 file-based images in virt-manager as nothing has been mentioned about
 this, eg. not iSCSI, NFS, LVM, etc.).

 Best regards
 Kenni
 ___
 CentOS-virt mailing list
 CentOS-virt@centos.org
 http://lists.centos.org/mailman/listinfo/centos-virt




 --
 Thomas Smith
 Cell: 602-882-2917


 ___
 CentOS-virt mailing list
 CentOS-virt@centos.org
 http://lists.centos.org/mailman/listinfo/centos-virt


___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt


Re: [CentOS-virt] Resizing EXT3 partition in guest instance CentOS5

2011-01-26 Thread Lucas Timm LH
Yes, it will, works all the time with me but using SysrescueCD. But don't
forget to backup your data before the resizing, any operation with disk
partitions may lost data.

2011/1/26 Poh Yong Hwang yong...@gmail.com

 Hi,

 I have two guest vm instance running CentOS 5 with ext3 partition. I will
 like to reduce 1 VM harddisk space and using the 'release' harddisk space to
 add onto my second VM. Basically I need to know how can I reduce and
 increase an ext3 partition in CentOS KVM. I did a search and basically i can
 do it by booting the VM using Knoppix and use Gparted to reduce and increase
 the diskspace. I am thinking of the following

 1) Boot first VM using Knoppix
 2) Reduce the ext3 partition disk size using Gparted
 3) Shutdown the VM and resize the diskspace using Virtual Manager
 4) Increae the diskspace of the second VM using Virtual Manager
 5) Boot up second VM using Knoppix
 6) Increase the ext3 partition disk size using Gparted
 7) Reboot the second VM

 As this is the first time i am doing it, will these work? Anyone has
 experience resiziing their EXT3 partition in KVM environment before?

 Thanks!

 Regards
 yongsan

 ___
 CentOS-virt mailing list
 CentOS-virt@centos.org
 http://lists.centos.org/mailman/listinfo/centos-virt




-- 
Lucas Timm, Goiânia/GO.
http://timmerman.wordpress.com

(62) 8198-0867
___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt


Re: [CentOS-virt] Resizing EXT3 partition in guest instance CentOS5

2011-01-26 Thread Lorenzo Quatrini
Poh Yong Hwang ha scritto:
 Hi,
 
 I have two guest vm instance running CentOS 5 with ext3 partition. I
 will like to reduce 1 VM harddisk space and using the 'release' harddisk
 space to add onto my second VM. Basically I need to know how can I
 reduce and increase an ext3 partition in CentOS KVM. I did a search and
 basically i can do it by booting the VM using Knoppix and use Gparted to
 reduce and increase the diskspace. I am thinking of the following
 
 1) Boot first VM using Knoppix
 2) Reduce the ext3 partition disk size using Gparted
 3) Shutdown the VM and resize the diskspace using Virtual Manager
 4) Increae the diskspace of the second VM using Virtual Manager
 5) Boot up second VM using Knoppix
 6) Increase the ext3 partition disk size using Gparted
 7) Reboot the second VM
 
 As this is the first time i am doing it, will these work? Anyone has
 experience resiziing their EXT3 partition in KVM environment before?
 
 Thanks!
 
 Regards
 yongsan
 
I guess it would work, but just in case remember: do backup beforehand :D

Regards
Lorenzo
___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt


Re: [CentOS-virt] Resizing EXT3 partition in guest instance CentOS5

2011-01-26 Thread Poh Yong Hwang
Hi,

Great! Thanks for the quick response. I will try it out then. Yes. I do have
backup for the host as well as the guest nodes. :)

Regards
yongsan

On Wed, Jan 26, 2011 at 6:43 PM, Lorenzo Quatrini 
lorenzo.quatr...@gmail.com wrote:

 Poh Yong Hwang ha scritto:
  Hi,
 
  I have two guest vm instance running CentOS 5 with ext3 partition. I
  will like to reduce 1 VM harddisk space and using the 'release' harddisk
  space to add onto my second VM. Basically I need to know how can I
  reduce and increase an ext3 partition in CentOS KVM. I did a search and
  basically i can do it by booting the VM using Knoppix and use Gparted to
  reduce and increase the diskspace. I am thinking of the following
 
  1) Boot first VM using Knoppix
  2) Reduce the ext3 partition disk size using Gparted
  3) Shutdown the VM and resize the diskspace using Virtual Manager
  4) Increae the diskspace of the second VM using Virtual Manager
  5) Boot up second VM using Knoppix
  6) Increase the ext3 partition disk size using Gparted
  7) Reboot the second VM
 
  As this is the first time i am doing it, will these work? Anyone has
  experience resiziing their EXT3 partition in KVM environment before?
 
  Thanks!
 
  Regards
  yongsan
 
 I guess it would work, but just in case remember: do backup beforehand :D

 Regards
 Lorenzo
 ___
 CentOS-virt mailing list
 CentOS-virt@centos.org
 http://lists.centos.org/mailman/listinfo/centos-virt

___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt