Re: [Users] Best practice to resize a WM disk image
Hey, I wanted to report that trying to dd from the storage-side always makes the VM´s OS see two itdentically small HDD's. The only work-around I´ve found that works is to create a new, bigger drive, boot the VM from a live-CD and dd from there. When rebooted after completion, the VM´s OS then sees a bigger drive that you can extend your filesystem on. A little slower procedure, having the mirroring go over the network, but works, and that´s what´s important in the end:) /Karli mån 2013-01-14 klockan 08:37 + skrev Karli Sjöberg: ons 2013-01-09 klockan 13:04 -0500 skrev Yeela Kaplan: - Original Message - From: Karli Sjöberg karli.sjob...@slu.semailto:karli.sjob...@slu.se To: Yeela Kaplan ykap...@redhat.commailto:ykap...@redhat.com Cc: Rocky rockyba...@gmail.commailto:rockyba...@gmail.com, Users@ovirt.orgmailto:Users@ovirt.org Sent: Wednesday, January 9, 2013 4:30:35 PM Subject: Re: [Users] Best practice to resize a WM disk image ons 2013-01-09 klockan 09:13 -0500 skrev Yeela Kaplan: - Original Message - From: Karli Sjöberg karli.sjob...@slu.semailto:karli.sjob...@slu.se To: Yeela Kaplan ykap...@redhat.commailto:ykap...@redhat.com Cc: Rocky rockyba...@gmail.commailto:rockyba...@gmail.com , Users@ovirt.orgmailto:Users@ovirt.org Sent: Wednesday, January 9, 2013 1:56:32 PM Subject: Re: [Users] Best practice to resize a WM disk image tis 2013-01-08 klockan 11:03 -0500 skrev Yeela Kaplan: So, first of all, you should know that resizing a disk is not yet supported in oVirt. If you decide that you must use it anyway, you should know in advance that it's not recommended, and that your data is at risk when you perform these kind of actions. There are several ways to perform this. One of them is to create a second (larger) disk for the vm, run the vm from live cd and use dd to copy the first disk contents into the second one, and finally remove the first disk and make sure that the new disk is configured as your system disk. Here you guide for the dd operation to be done from within the guest system, but booted from live. Can this be done directly from the NFS storage itself instead? Karli, it can be done by using dd (or rsync), when your source is the volume of the current disk image and the destination is the volume of the new disk image created. You just have to find the images in the internals of the vdsm host, which is a bit more tricky and can cause more damage if done wrong. You mean since the VM's and disks are called like c3dbfb5f-7b3b-4602-961f-624c69618734 you have to query the api to figure out what´s what, but other than that, you´re saying it´ll just work, so that´s good to know, since I think letting the storage itself do the dd copy locally is going to be much much faster than through the VM, over the network. Thanks! Will it matter if the disks are Thin Provision or Preallocated? As long as it's done on the base volume it doesn't matter. Well, I´ve now tested the suggested procedure and didn´t really go all the way home. 1. Created a new, bigger virtual disk than the original, 40GB. 2. Booted Win2008R2 guest and could see from DiskManager that a new, bigger drive, 80GB, had appeared. 3. Shut guest down and issued a dd from old source to new, bigger destination. 4. When started, DiskManager now sees an offline, equally small drive as the original, 40GB. There is no free space in the new drive to expand with, Windows only sees it as beeing 40GB. Have tried Refresh and Rescan, but Windows just sees two identically small disks. Suggestions? The second, riskier, option is to export the vm to an export domain, resize the image volume size to the new larger size using qemu-img and also modify the vm's metadata in its ovf, as you can see this option is more complicated and requires deeper understanding and altering of the metadata... finally you'll need to import the vm back. - Original Message - From: Rocky rockyba...@gmail.commailto:rockyba...@gmail.com To: Yeela Kaplan ykap...@redhat.commailto:ykap...@redhat.com Cc: Users@ovirt.orgmailto:Users@ovirt.org Sent: Tuesday, January 8, 2013 11:30:00 AM Subject: Re: [Users] Best practice to resize a WM disk image Its just a theoretical question as I think the issue will come for us and other users. I think there can be one or more snapshots in the WM over the time. But if that is an issue we can always collapse them I think. If its a base image it should be RAW, right? In this case its on file storage (NFS). Regards //Ricky On 2013-01-08 10:07, Yeela Kaplan wrote: Hi Ricky, In order to give you a detailed answer I need additional details regarding the disk: - Is the disk image composed as a chain of volumes or just a base volume? (if it's a chain it will be more complicated, you might want
Re: [Users] Best practice to resize a WM disk image
tis 2013-01-08 klockan 11:03 -0500 skrev Yeela Kaplan: So, first of all, you should know that resizing a disk is not yet supported in oVirt. If you decide that you must use it anyway, you should know in advance that it's not recommended, and that your data is at risk when you perform these kind of actions. There are several ways to perform this. One of them is to create a second (larger) disk for the vm, run the vm from live cd and use dd to copy the first disk contents into the second one, and finally remove the first disk and make sure that the new disk is configured as your system disk. Here you guide for the dd operation to be done from within the guest system, but booted from live. Can this be done directly from the NFS storage itself instead? The second, riskier, option is to export the vm to an export domain, resize the image volume size to the new larger size using qemu-img and also modify the vm's metadata in its ovf, as you can see this option is more complicated and requires deeper understanding and altering of the metadata... finally you'll need to import the vm back. - Original Message - From: Rocky rockyba...@gmail.commailto:rockyba...@gmail.com To: Yeela Kaplan ykap...@redhat.commailto:ykap...@redhat.com Cc: Users@ovirt.orgmailto:Users@ovirt.org Sent: Tuesday, January 8, 2013 11:30:00 AM Subject: Re: [Users] Best practice to resize a WM disk image Its just a theoretical question as I think the issue will come for us and other users. I think there can be one or more snapshots in the WM over the time. But if that is an issue we can always collapse them I think. If its a base image it should be RAW, right? In this case its on file storage (NFS). Regards //Ricky On 2013-01-08 10:07, Yeela Kaplan wrote: Hi Ricky, In order to give you a detailed answer I need additional details regarding the disk: - Is the disk image composed as a chain of volumes or just a base volume? (if it's a chain it will be more complicated, you might want to collapse the chain first to make it easier). - Is the disk image raw? (you can use qemu-img info to check) - Is the disk image on block or file storage? Regards, Yeela - Original Message - From: Ricky rockyba...@gmail.commailto:rockyba...@gmail.com To: Users@ovirt.orgmailto:Users@ovirt.org Sent: Tuesday, January 8, 2013 10:40:27 AM Subject: [Users] Best practice to resize a WM disk image Hi, If I have a VM that has run out of disk space, how can I increase the space in best way? One way is to add a second bigger disk to the WM and then use dd or similar to copy. But is it possible to stretch the original disk inside or outside oVirt and get oVirt to know the bigger size? Regards //Ricky ___ Users mailing list Users@ovirt.orgmailto:Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users ___ Users mailing list Users@ovirt.orgmailto:Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [Users] Best practice to resize a WM disk image
Alex, Suggestion for use GlusterFS to oVirt, look: http://www.gluster.org/2012/07/installing-ovirt-3-1-and-glusterfs-using-either-nfs-or-posix-native-file-system-node-install-2/ Marcelo Barbosa *mr.marcelo.barb...@gmail.com* On Wed, Jan 9, 2013 at 10:10 AM, Alexandre Santos santosa...@gmail.comwrote: 2013/1/9 Karli Sjöberg karli.sjob...@slu.se: tis 2013-01-08 klockan 11:03 -0500 skrev Yeela Kaplan: So, first of all, you should know that resizing a disk is not yet supported in oVirt. If you decide that you must use it anyway, you should know in advance that it's not recommended, and that your data is at risk when you perform these kind of actions. There are several ways to perform this. One of them is to create a second (larger) disk for the vm, run the vm from live cd and use dd to copy the first disk contents into the second one, and finally remove the first disk and make sure that the new disk is configured as your system disk. Here you guide for the dd operation to be done from within the guest system, but booted from live. Can this be done directly from the NFS storage itself instead? The second, riskier, option is to export the vm to an export domain, resize the image volume size to the new larger size using qemu-img and also modify the vm's metadata in its ovf, as you can see this option is more complicated and requires deeper understanding and altering of the metadata... finally you'll need to import the vm back. - Original Message - From: Rocky rockyba...@gmail.com To: Yeela Kaplan ykap...@redhat.com Cc: Users@ovirt.org Sent: Tuesday, January 8, 2013 11:30:00 AM Subject: Re: [Users] Best practice to resize a WM disk image Its just a theoretical question as I think the issue will come for us and other users. I think there can be one or more snapshots in the WM over the time. But if that is an issue we can always collapse them I think. If its a base image it should be RAW, right? In this case its on file storage (NFS). Regards //Ricky On 2013-01-08 10:07, Yeela Kaplan wrote: Hi Ricky, In order to give you a detailed answer I need additional details regarding the disk: - Is the disk image composed as a chain of volumes or just a base volume? (if it's a chain it will be more complicated, you might want to collapse the chain first to make it easier). - Is the disk image raw? (you can use qemu-img info to check) - Is the disk image on block or file storage? Regards, Yeela - Original Message - From: Ricky rockyba...@gmail.com To: Users@ovirt.org Sent: Tuesday, January 8, 2013 10:40:27 AM Subject: [Users] Best practice to resize a WM disk image Hi, If I have a VM that has run out of disk space, how can I increase the space in best way? One way is to add a second bigger disk to the WM and then use dd or similar to copy. But is it possible to stretch the original disk inside or outside oVirt and get oVirt to know the bigger size? Regards //Ricky ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users Sorry for this a bit off topic but I've been resizing my VM just by adding new disks to the VM and then using the LVM tool or just adding it to fstab. I know that it's not a true resizing but it has been a good solution for me. Once a Oracle DB (a XE used for tests:-)) went down because my disk went full (it was 8GB) and I added a new disk, moved the dbf to this new disk and restarted Oracle, without having to reboot the VM. Alex ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [Users] Best practice to resize a WM disk image
ons 2013-01-09 klockan 09:13 -0500 skrev Yeela Kaplan: - Original Message - From: Karli Sjöberg karli.sjob...@slu.semailto:karli.sjob...@slu.se To: Yeela Kaplan ykap...@redhat.commailto:ykap...@redhat.com Cc: Rocky rockyba...@gmail.commailto:rockyba...@gmail.com, Users@ovirt.orgmailto:Users@ovirt.org Sent: Wednesday, January 9, 2013 1:56:32 PM Subject: Re: [Users] Best practice to resize a WM disk image tis 2013-01-08 klockan 11:03 -0500 skrev Yeela Kaplan: So, first of all, you should know that resizing a disk is not yet supported in oVirt. If you decide that you must use it anyway, you should know in advance that it's not recommended, and that your data is at risk when you perform these kind of actions. There are several ways to perform this. One of them is to create a second (larger) disk for the vm, run the vm from live cd and use dd to copy the first disk contents into the second one, and finally remove the first disk and make sure that the new disk is configured as your system disk. Here you guide for the dd operation to be done from within the guest system, but booted from live. Can this be done directly from the NFS storage itself instead? Karli, it can be done by using dd (or rsync), when your source is the volume of the current disk image and the destination is the volume of the new disk image created. You just have to find the images in the internals of the vdsm host, which is a bit more tricky and can cause more damage if done wrong. You mean since the VM's and disks are called like c3dbfb5f-7b3b-4602-961f-624c69618734 you have to query the api to figure out what´s what, but other than that, you´re saying it´ll just work, so that´s good to know, since I think letting the storage itself do the dd copy locally is going to be much much faster than through the VM, over the network. Thanks! Will it matter if the disks are Thin Provision or Preallocated? The second, riskier, option is to export the vm to an export domain, resize the image volume size to the new larger size using qemu-img and also modify the vm's metadata in its ovf, as you can see this option is more complicated and requires deeper understanding and altering of the metadata... finally you'll need to import the vm back. - Original Message - From: Rocky rockyba...@gmail.commailto:rockyba...@gmail.com To: Yeela Kaplan ykap...@redhat.commailto:ykap...@redhat.com Cc: Users@ovirt.orgmailto:Users@ovirt.org Sent: Tuesday, January 8, 2013 11:30:00 AM Subject: Re: [Users] Best practice to resize a WM disk image Its just a theoretical question as I think the issue will come for us and other users. I think there can be one or more snapshots in the WM over the time. But if that is an issue we can always collapse them I think. If its a base image it should be RAW, right? In this case its on file storage (NFS). Regards //Ricky On 2013-01-08 10:07, Yeela Kaplan wrote: Hi Ricky, In order to give you a detailed answer I need additional details regarding the disk: - Is the disk image composed as a chain of volumes or just a base volume? (if it's a chain it will be more complicated, you might want to collapse the chain first to make it easier). - Is the disk image raw? (you can use qemu-img info to check) - Is the disk image on block or file storage? Regards, Yeela - Original Message - From: Ricky rockyba...@gmail.commailto:rockyba...@gmail.com To: Users@ovirt.orgmailto:Users@ovirt.org Sent: Tuesday, January 8, 2013 10:40:27 AM Subject: [Users] Best practice to resize a WM disk image Hi, If I have a VM that has run out of disk space, how can I increase the space in best way? One way is to add a second bigger disk to the WM and then use dd or similar to copy. But is it possible to stretch the original disk inside or outside oVirt and get oVirt to know the bigger size? Regards //Ricky ___ Users mailing list Users@ovirt.orgmailto:Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users ___ Users mailing list Users@ovirt.orgmailto:Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [Users] Best practice to resize a WM disk image
- Original Message - From: Karli Sjöberg karli.sjob...@slu.se To: Yeela Kaplan ykap...@redhat.com Cc: Rocky rockyba...@gmail.com, Users@ovirt.org Sent: Wednesday, January 9, 2013 4:30:35 PM Subject: Re: [Users] Best practice to resize a WM disk image ons 2013-01-09 klockan 09:13 -0500 skrev Yeela Kaplan: - Original Message - From: Karli Sjöberg karli.sjob...@slu.se To: Yeela Kaplan ykap...@redhat.com Cc: Rocky rockyba...@gmail.com , Users@ovirt.org Sent: Wednesday, January 9, 2013 1:56:32 PM Subject: Re: [Users] Best practice to resize a WM disk image tis 2013-01-08 klockan 11:03 -0500 skrev Yeela Kaplan: So, first of all, you should know that resizing a disk is not yet supported in oVirt. If you decide that you must use it anyway, you should know in advance that it's not recommended, and that your data is at risk when you perform these kind of actions. There are several ways to perform this. One of them is to create a second (larger) disk for the vm, run the vm from live cd and use dd to copy the first disk contents into the second one, and finally remove the first disk and make sure that the new disk is configured as your system disk. Here you guide for the dd operation to be done from within the guest system, but booted from live. Can this be done directly from the NFS storage itself instead? Karli, it can be done by using dd (or rsync), when your source is the volume of the current disk image and the destination is the volume of the new disk image created. You just have to find the images in the internals of the vdsm host, which is a bit more tricky and can cause more damage if done wrong. You mean since the VM's and disks are called like c3dbfb5f-7b3b-4602-961f-624c69618734 you have to query the api to figure out what´s what, but other than that, you´re saying it´ll just work, so that´s good to know, since I think letting the storage itself do the dd copy locally is going to be much much faster than through the VM, over the network. Thanks! Will it matter if the disks are Thin Provision or Preallocated? As long as it's done on the base volume it doesn't matter. The second, riskier, option is to export the vm to an export domain, resize the image volume size to the new larger size using qemu-img and also modify the vm's metadata in its ovf, as you can see this option is more complicated and requires deeper understanding and altering of the metadata... finally you'll need to import the vm back. - Original Message - From: Rocky rockyba...@gmail.com To: Yeela Kaplan ykap...@redhat.com Cc: Users@ovirt.org Sent: Tuesday, January 8, 2013 11:30:00 AM Subject: Re: [Users] Best practice to resize a WM disk image Its just a theoretical question as I think the issue will come for us and other users. I think there can be one or more snapshots in the WM over the time. But if that is an issue we can always collapse them I think. If its a base image it should be RAW, right? In this case its on file storage (NFS). Regards //Ricky On 2013-01-08 10:07, Yeela Kaplan wrote: Hi Ricky, In order to give you a detailed answer I need additional details regarding the disk: - Is the disk image composed as a chain of volumes or just a base volume? (if it's a chain it will be more complicated, you might want to collapse the chain first to make it easier). - Is the disk image raw? (you can use qemu-img info to check) - Is the disk image on block or file storage? Regards, Yeela - Original Message - From: Ricky rockyba...@gmail.com To: Users@ovirt.org Sent: Tuesday, January 8, 2013 10:40:27 AM Subject: [Users] Best practice to resize a WM disk image Hi, If I have a VM that has run out of disk space, how can I increase the space in best way? One way is to add a second bigger disk to the WM and then use dd or similar to copy. But is it possible to stretch the original disk inside or outside oVirt and get oVirt to know the bigger size? Regards //Ricky ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
[Users] Best practice to resize a WM disk image
Hi, If I have a VM that has run out of disk space, how can I increase the space in best way? One way is to add a second bigger disk to the WM and then use dd or similar to copy. But is it possible to stretch the original disk inside or outside oVirt and get oVirt to know the bigger size? Regards //Ricky ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [Users] Best practice to resize a WM disk image
Hi Ricky, In order to give you a detailed answer I need additional details regarding the disk: - Is the disk image composed as a chain of volumes or just a base volume? (if it's a chain it will be more complicated, you might want to collapse the chain first to make it easier). - Is the disk image raw? (you can use qemu-img info to check) - Is the disk image on block or file storage? Regards, Yeela - Original Message - From: Ricky rockyba...@gmail.com To: Users@ovirt.org Sent: Tuesday, January 8, 2013 10:40:27 AM Subject: [Users] Best practice to resize a WM disk image Hi, If I have a VM that has run out of disk space, how can I increase the space in best way? One way is to add a second bigger disk to the WM and then use dd or similar to copy. But is it possible to stretch the original disk inside or outside oVirt and get oVirt to know the bigger size? Regards //Ricky ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [Users] Best practice to resize a WM disk image
So, first of all, you should know that resizing a disk is not yet supported in oVirt. If you decide that you must use it anyway, you should know in advance that it's not recommended, and that your data is at risk when you perform these kind of actions. There are several ways to perform this. One of them is to create a second (larger) disk for the vm, run the vm from live cd and use dd to copy the first disk contents into the second one, and finally remove the first disk and make sure that the new disk is configured as your system disk. The second, riskier, option is to export the vm to an export domain, resize the image volume size to the new larger size using qemu-img and also modify the vm's metadata in its ovf, as you can see this option is more complicated and requires deeper understanding and altering of the metadata... finally you'll need to import the vm back. - Original Message - From: Rocky rockyba...@gmail.com To: Yeela Kaplan ykap...@redhat.com Cc: Users@ovirt.org Sent: Tuesday, January 8, 2013 11:30:00 AM Subject: Re: [Users] Best practice to resize a WM disk image Its just a theoretical question as I think the issue will come for us and other users. I think there can be one or more snapshots in the WM over the time. But if that is an issue we can always collapse them I think. If its a base image it should be RAW, right? In this case its on file storage (NFS). Regards //Ricky On 2013-01-08 10:07, Yeela Kaplan wrote: Hi Ricky, In order to give you a detailed answer I need additional details regarding the disk: - Is the disk image composed as a chain of volumes or just a base volume? (if it's a chain it will be more complicated, you might want to collapse the chain first to make it easier). - Is the disk image raw? (you can use qemu-img info to check) - Is the disk image on block or file storage? Regards, Yeela - Original Message - From: Ricky rockyba...@gmail.com To: Users@ovirt.org Sent: Tuesday, January 8, 2013 10:40:27 AM Subject: [Users] Best practice to resize a WM disk image Hi, If I have a VM that has run out of disk space, how can I increase the space in best way? One way is to add a second bigger disk to the WM and then use dd or similar to copy. But is it possible to stretch the original disk inside or outside oVirt and get oVirt to know the bigger size? Regards //Ricky ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users