Hello, I have been playing around with Xen for a few months now and I have not been able to find any information on the differences between storing a Xen guest OS as a image file or as a LVM. Is there performance differences? What are the pros and cons? Thanks for any help. --- Chris Edwards _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Thu, Jul 31, 2008 at 12:00 PM, Chris Edwards <cedwards@smartechcorp.net>wrote:> Hello, > > > > I have been playing around with Xen for a few months now and I have not > been able to find any information on the differences between storing a Xen > guest OS as a image file or as a LVM. Is there performance differences? > What are the pros and cons? > > > > Thanks for any help. > > > > --- > > > > Chris Edwards > > >Chris, Following are two tests I did to check this very thing. *Test 1 - Disk File* The disk image /dev/xvdb1 was mounted as /media/test1. The images itself was stored on a 500 GB SATA drive. The relevent numbers are highlighted in blue. */dev/xvdb1 10317828 154236 9639476 2% /media/test1* [root@localhost ~]# bonnie++ -s 2048 -d /media/test1 -u root Version 1.03 ------Sequential Output------ --Sequential Input- --Random- -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks-- Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP localhost.locald 2G *6065* 15 *70595* 37 *20649* 2 *26878* 53 *57270* 0 * 135.8* 0 ------Sequential Create------ --------Random Create-------- -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete-- files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP 16 *17008* 99 +++++ +++ *26079* 90 *16002* 94 +++++ +++ *29094* 99 localhost.localdomain,2G,6065,15,70595,37,20649,2,26878,53,57270,0,135.8,0,16,17008,99,+++++,+++,26079,90,16002,94,+++++,+++,29094,99 *Test 2 - LVM* The LVM Logical Volume was created on the same 500 GB SATA drive and mounted in the domU as /media/test2 */dev/xvdc 10321208 154236 9642684 2% /media/test2* [root@localhost ~]# bonnie++ -s 2048 -d /media/test2 -u root Version 1.03 ------Sequential Output------ --Sequential Input- --Random- -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks-- Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP localhost.locald 2G *34825* 92 *50898* 26 *24833* 4 *35920* 69 *77594* 1 * 137.9* 0 ------Sequential Create------ --------Random Create-------- -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete-- files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP 16 *15556* 92 +++++ +++ *26198* 96 *16281* 98 +++++ +++ *28508* 100 localhost.localdomain,2G,34825,92,50898,26,24833,4,35920,69,77594,1,137.9,0,16,15556,92,+++++,+++,26198,96,16281,98,+++++,+++,28508,100 INIT: version 2.86 reloading LVM soundly trounced the disk image in Sequential Output - Per Chr by about 600% and bettered it by about 20-30% in the other tests. The one interesting thing though was Sequential Output - Block where the disk image pulled ahead of LVM by about 20%. This I can''t account for and will need to retest because it doesn''t make a lot of sense. All of the Sequential Create/Delete stats were within 10% of each other. The advantage of files are you can use standard Linux copy and delete commands to manipulate them. The advantage of LVM is it''s faster and you can benefit from LVMs ability to resize as well as create snapshots. You could of course do this with your disk file being on the Dom0''s LVM setup too by utilizing the hosts LVM features. Grant McWilliams _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Thanks for the tip. So can I ask a few questions on setting up Xen with LV''s? 1. Do I need to create a separate LV for each xen guest os? 2. Can you point me in the right direction for doing LV snap shots? 3. If I have a xen guest os in a LV how would I migrate the guest os from one machine to the other? Create identical LV on new machine? Again, Thanks for the info. I have been having a hard time finding the answers to these questions. --- Chris Edwards Smartech Corp. Div. of AirNet Group http://www.airnetgroup.com <http://www.airnetgroup.com/> http://www.smartechcorp.net <http://www.smartechcorp.net/> cedwards@smartechcorp.net <mailto:agarrison@smartechcorp.net> P: 423-664-7678 x114 C: 423-593-6964 F: 423-664-7680 From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Grant McWilliams Sent: Thursday, July 31, 2008 3:35 PM To: Chris Edwards Cc: xen-users@lists.xensource.com Subject: Re: [Xen-users] Xen Image File vs LVM On Thu, Jul 31, 2008 at 12:00 PM, Chris Edwards <cedwards@smartechcorp.net> wrote: Hello, I have been playing around with Xen for a few months now and I have not been able to find any information on the differences between storing a Xen guest OS as a image file or as a LVM. Is there performance differences? What are the pros and cons? Thanks for any help. --- Chris Edwards Chris, Following are two tests I did to check this very thing. Test 1 - Disk File The disk image /dev/xvdb1 was mounted as /media/test1. The images itself was stored on a 500 GB SATA drive. The relevent numbers are highlighted in blue. /dev/xvdb1 10317828 154236 9639476 2% /media/test1 [root@localhost ~]# bonnie++ -s 2048 -d /media/test1 -u root Version 1.03 ------Sequential Output------ --Sequential Input- --Random- -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks-- Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP localhost.locald 2G 6065 15 70595 37 20649 2 26878 53 57270 0 135.8 0 ------Sequential Create------ --------Random Create-------- -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete-- files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP 16 17008 99 +++++ +++ 26079 90 16002 94 +++++ +++ 29094 99 localhost.localdomain,2G,6065,15,70595,37,20649,2,26878,53,57270,0,135.8,0,1 6,17008,99,+++++,+++,26079,90,16002,94,+++++,+++,29094,99 Test 2 - LVM The LVM Logical Volume was created on the same 500 GB SATA drive and mounted in the domU as /media/test2 /dev/xvdc 10321208 154236 9642684 2% /media/test2 [root@localhost ~]# bonnie++ -s 2048 -d /media/test2 -u root Version 1.03 ------Sequential Output------ --Sequential Input- --Random- -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks-- Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP localhost.locald 2G 34825 92 50898 26 24833 4 35920 69 77594 1 137.9 0 ------Sequential Create------ --------Random Create-------- -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete-- files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP 16 15556 92 +++++ +++ 26198 96 16281 98 +++++ +++ 28508 100 localhost.localdomain,2G,34825,92,50898,26,24833,4,35920,69,77594,1,137.9,0, 16,15556,92,+++++,+++,26198,96,16281,98,+++++,+++,28508,100 INIT: version 2.86 reloading LVM soundly trounced the disk image in Sequential Output - Per Chr by about 600% and bettered it by about 20-30% in the other tests. The one interesting thing though was Sequential Output - Block where the disk image pulled ahead of LVM by about 20%. This I can''t account for and will need to retest because it doesn''t make a lot of sense. All of the Sequential Create/Delete stats were within 10% of each other. The advantage of files are you can use standard Linux copy and delete commands to manipulate them. The advantage of LVM is it''s faster and you can benefit from LVMs ability to resize as well as create snapshots. You could of course do this with your disk file being on the Dom0''s LVM setup too by utilizing the hosts LVM features. Grant McWilliams _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Mon, Aug 4, 2008 at 2:46 PM, Chris Edwards <cedwards@smartechcorp.net> wrote:> 1. Do I need to create a separate LV for each xen guest os?yes.> 2. Can you point me in the right direction for doing LV snap shots?http://tldp.org/HOWTO/LVM-HOWTO/> 3. If I have a xen guest os in a LV how would I migrate the guest os > from one machine to the other? Create identical LV on new machine?to migrate VMs, the storage has to be accessible from both machines with the same reference. when using image files, that means a shared filesystem (NFS, GFS, OCFS, etc.), when using LVs, that means the VG must be accessible from both hosts, usually with a SAN or SAN-like setup (FC, iSCSI, drbd, AoE, (g)nbd, etc) -- Javier _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> >> 3. If I have a xen guest os in a LV how would I migrate the guest os >> from one machine to the other? Create identical LV on new machine? > > to migrate VMs, the storage has to be accessible from both machines > with the same reference. when using image files, that means a shared > filesystem (NFS, GFS, OCFS, etc.), when using LVs, that means the VG > must be accessible from both hosts, usually with a SAN or SAN-like > setup (FC, iSCSI, drbd, AoE, (g)nbd, etc)Is this for ''live'' migrations or any migration of a VM? _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Mon, Aug 4, 2008 at 3:01 PM, Michael March <mmarch@gmail.com> wrote:>> >>> 3. If I have a xen guest os in a LV how would I migrate the guest os >>> from one machine to the other? Create identical LV on new machine? >> >> to migrate VMs, the storage has to be accessible from both machines >> with the same reference. when using image files, that means a shared >> filesystem (NFS, GFS, OCFS, etc.), when using LVs, that means the VG >> must be accessible from both hosts, usually with a SAN or SAN-like >> setup (FC, iSCSI, drbd, AoE, (g)nbd, etc) > > Is this for ''live'' migrations or any migration of a VM?sorry, didn''t read the whole question. this is for live migrations. for ''manual'' migrations, you can get by copying the data (and i guess you could also migrate between image files and LVs, but i haven''t tried that (yet)) -- Javier _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Mon, Aug 4, 2008 at 12:46 PM, Chris Edwards <cedwards@smartechcorp.net>wrote:> Thanks for the tip. So can I ask a few questions on setting up Xen with > LV''s? > > > > 1. Do I need to create a separate LV for each xen guest os? > > 2. Can you point me in the right direction for doing LV snap shots? > > 3. If I have a xen guest os in a LV how would I migrate the guest > os from one machine to the other? Create identical LV on new machine? > > > > > > Again, Thanks for the info. I have been having a hard time finding the > answers to these questions. > > > > --- > > Chris Edwards > Smartech Corp. > Div. of AirNet Group >Oops this didn''t go to the group. 1. Yes, you can have a seperate LV per Xen guest OS and you should of course. 2. LVM snapshots go something like this. Snapshotting is a way to take a "point-in-time" image of a filesystem. What this allows you is to do is access files that would normally be locked so you can back them up. The process is as follows: 1. Take the snapshot 2. Mount the snapshot 3. Take a backup of the snapshot 4. Unmount and destroy the snapshot *Taking the snapshot* When you take the snapshot, you''re essentially creating a new LVM device that appears to be a duplicate of the "real" filesystem at a point in time. To do this we create another LVM device (using lvcreate) with an argument of -s to indicate we want a snapshot and the -n argument to name it. In this case LogVol00 is the original LV and LVsnap is the name of the snapshot. You can name them whatever you want. lvcreate -l 500 -s -n LVsnap /dev/VolGroup00/LogVol00 Mounting the snapshot Next, we mount the snapshot somewhere else, we use /media/snap. We also mount it read only. mkdir /media/snap mount -o nouuid,ro /dev/VolGroup00/LVsnap /media/snap *Do the backup * Now, backup /media/LVsnap like you would any other directory: Unmount and destroy the snapshot Now we have to unmount the snapshot and destroy it. The reason we destroy it because any I/O that takes place on the device uses space to track the differences betweeen the real and the snapshot filesystem. Plus, we''ve done our job so there''s no reason to keep it around. unmount /media/LVsnap lvremove -f /dev/VolGroup/LVsnap 3. Migrating an LV depends some on whether you have to depend on a bootloader in the LV or not. You could do any of the following depending on your circumstances. - Snapshot the old LV, create a new LV on the destination machine, export it with NFS and copy all files across using cp. - Snapshot the old LV, create a new LV on the destination, export it with NFS and use dump and restore to dum the old LV to the new one. dump 0 -f - /dev/VolGroup00/LogVol00 | (cd /dest; restore -rf - ) - Snapshot the old LV, create a new LV on the destination machine, and dd the snapshot and pipe it into ssh dd if=/dev/VolGroup00/LVsnap | ssh -c arcfour 192.168.2.100 "dd of=/dev/VolGroup00/LogVol00" I don''t think I have to tell you to be VERY careful with the last one. If you get the destination Logical Volume screwed up you will toast the destination. I specified arcfour for the cipher because it''s much faster than the default. You will probably want to mess with dd''s blocksize too as you can double the speed in which dd will copy if the blocksize is larger. Another option would be to use ddrestore or dd_restore in place of dd. Make sure you look at the syntax difference first. Both of these are faster than stock dd but if you bump the blocksize dd will almost keep up. I assume you only keep the VM OS on the LV and not all data. If so then it won''t take long to copy. It takes about 45 min per 80 GB here. If you''re running a 10GB OS LV then you can figure about 5 minutes. Grant _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Mon, Aug 4, 2008 at 12:46 PM, Chris Edwards <cedwards@smartechcorp.net>wrote:> Thanks for the tip. So can I ask a few questions on setting up Xen with > LV''s? > > > > 1. Do I need to create a separate LV for each xen guest os? > > 2. Can you point me in the right direction for doing LV snap shots? > > 3. If I have a xen guest os in a LV how would I migrate the guest > os from one machine to the other? Create identical LV on new machine? > > > > > > Again, Thanks for the info. I have been having a hard time finding the > answers to these questions. > > > > --- > > Chris Edwards > Smartech Corp. > Div. of AirNet Group >Third times the charm. I can create virtual machines but I can''t click on "reply all". 1. Yes, you can have a seperate LV per Xen guest OS and you should of course. 2. LVM snapshots go something like this. Snapshotting is a way to take a "point-in-time" image of a filesystem. What this allows you is to do is access files that would normally be locked so you can back them up. The process is as follows: 1. Take the snapshot 2. Mount the snapshot 3. Take a backup of the snapshot 4. Unmount and destroy the snapshot *Taking the snapshot* When you take the snapshot, you''re essentially creating a new LVM device that appears to be a duplicate of the "real" filesystem at a point in time. To do this we create another LVM device (using lvcreate) with an argument of -s to indicate we want a snapshot and the -n argument to name it. In this case LogVol00 is the original LV and LVsnap is the name of the snapshot. You can name them whatever you want. lvcreate -l 500 -s -n LVsnap /dev/VolGroup00/LogVol00 Mounting the snapshot Next, we mount the snapshot somewhere else, we use /media/snap. We also mount it read only. mkdir /media/snap mount -o nouuid,ro /dev/VolGroup00/LVsnap /media/snap *Do the backup * Now, backup /media/LVsnap like you would any other directory: Unmount and destroy the snapshot Now we have to unmount the snapshot and destroy it. The reason we destroy it because any I/O that takes place on the device uses space to track the differences betweeen the real and the snapshot filesystem. Plus, we''ve done our job so there''s no reason to keep it around. unmount /media/LVsnap lvremove -f /dev/VolGroup/LVsnap 3. Migrating an LV depends some on whether you have to depend on a bootloader in the LV or not. You could do any of the following depending on your circumstances. - Snapshot the old LV, create a new LV on the destination machine, export it with NFS and copy all files across using cp. - Snapshot the old LV, create a new LV on the destination, export it with NFS and use dump and restore to dum the old LV to the new one. dump 0 -f - /dev/VolGroup00/LogVol00 | (cd /dest; restore -rf - ) - Snapshot the old LV, create a new LV on the destination machine, and dd the snapshot and pipe it into ssh dd if=/dev/VolGroup00/LVsnap | ssh -c arcfour 192.168.2.100 "dd of=/dev/VolGroup00/LogVol00" I don''t think I have to tell you to be VERY careful with the last one. If you get the destination Logical Volume screwed up you will toast the destination. I specified arcfour for the cipher because it''s much faster than the default. You will probably want to mess with dd''s blocksize too as you can double the speed in which dd will copy if the blocksize is larger. Another option would be to use ddrestore or dd_restore in place of dd. Make sure you look at the syntax difference first. Both of these are faster than stock dd but if you bump the blocksize dd will almost keep up. I assume you only keep the VM OS on the LV and not all data. If so then it won''t take long to copy. It takes about 45 min per 80 GB here. If you''re running a 10GB OS LV then you can figure about 5 minutes. Grant _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Mon, Aug 4, 2008 at 1:04 PM, Javier Guerra <javier@guerrag.com> wrote:> On Mon, Aug 4, 2008 at 3:01 PM, Michael March <mmarch@gmail.com> wrote: > >> > >>> 3. If I have a xen guest os in a LV how would I migrate the > guest os > >>> from one machine to the other? Create identical LV on new machine? > >> > >> to migrate VMs, the storage has to be accessible from both machines > >> with the same reference. when using image files, that means a shared > >> filesystem (NFS, GFS, OCFS, etc.), when using LVs, that means the VG > >> must be accessible from both hosts, usually with a SAN or SAN-like > >> setup (FC, iSCSI, drbd, AoE, (g)nbd, etc) > > > > Is this for ''live'' migrations or any migration of a VM? > > sorry, didn''t read the whole question. > > this is for live migrations. for ''manual'' migrations, you can get by > copying the data (and i guess you could also migrate between image > files and LVs, but i haven''t tried that (yet)) > > > -- > Javier >You can go between LVs and files too really easy. I''ve started putting tutorials up on these things as I get to them at http://grantmcwilliams.com/index.php?option=com_content&view=category&id=97&Itemid=379 The URL will be changing though as I implement SEO on my site. -------------------------------------------------------------------------------------------------------------- How to move from a tap:aio file to Logical Volume Management In Xen we can provide virtualized hard drives several different ways. It''s not uncommon to create a large empty file using dd and then specify it as the hard drive like this. name = "mailserver" memory = "1024" disk = [ ''tap:aio:/srv/xen/mailserver.img,xvda,w'', ] vif = [ ''bridge=xenbr0'', ] bootloader="/usr/bin/pygrub" vcpus=2 on_reboot = ''restart'' on_crash = ''restart'' In this example /srv/xen/mailserver.img is our file. In a lot of ways LVM is more powerful and faster so moving our test server to LVM makes sense once we''ve gotten serious about deploying it. Moving from tap:aio to LVM is much easier than you think, here''s how. 1. Shutdown domain. xm shutdown mailserver 2. Create the Logical Volume You''ll need a Logical Volume the same size as your Xen disk file. In this example the Xen disk file is 10GB and I''ll assume you already created it. This could easily turn into an LVM tutorial if I don''t. 10 GB Disk file: /srv/xen/mailserver.img 10 GB Logical Volume: /dev/VolGroup00/LogVolMAIL 3. Copy disk file to Logical Volume dd if=/srv/xen/mailserver.img of=/dev/VolGroup00/LogVolMAIL -bs 1024 4. Edit the Xen domain config file name = "mailserver" memory = "1024" disk = [ ''phy:/dev/VolGroup00/LogVolMAIL,xvda,w'', ] vif = [ ''bridge=xenbr0'', ] bootloader="/usr/bin/pygrub" vcpus=2 on_reboot = ''restart'' on_crash = ''restart'' 5. Restart domain xm create -c mailserver _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Monday 04 August 2008 20:46:17 Chris Edwards wrote:> Thanks for the tip. So can I ask a few questions on setting up Xen with > LV''s? > > > > 1. Do I need to create a separate LV for each xen guest os?Yeap.> > 2. Can you point me in the right direction for doing LV snap shots?Not possible in current clvmd implementation.> > 3. If I have a xen guest os in a LV how would I migrate the guest os > from one machine to the other? Create identical LV on new machine?Using clvmd. Best regards, ./npf> > > > > Again, Thanks for the info. I have been having a hard time finding the > answers to these questions. > > > > --- > > Chris Edwards > Smartech Corp. > Div. of AirNet Group > > http://www.airnetgroup.com <http://www.airnetgroup.com/> > > http://www.smartechcorp.net <http://www.smartechcorp.net/> > > cedwards@smartechcorp.net <mailto:agarrison@smartechcorp.net> > P: 423-664-7678 x114 > > C: 423-593-6964 > > F: 423-664-7680 > > > > From: xen-users-bounces@lists.xensource.com > [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Grant > McWilliams Sent: Thursday, July 31, 2008 3:35 PM > To: Chris Edwards > Cc: xen-users@lists.xensource.com > Subject: Re: [Xen-users] Xen Image File vs LVM > > > > > > On Thu, Jul 31, 2008 at 12:00 PM, Chris Edwards <cedwards@smartechcorp.net> > wrote: > > Hello, > > > > I have been playing around with Xen for a few months now and I have not > been able to find any information on the differences between storing a Xen > guest OS as a image file or as a LVM. Is there performance differences? > What are the pros and cons? > > > > Thanks for any help. > > > > --- > > > > Chris Edwards > > > > > Chris, > > Following are two tests I did to check this very thing. > > > > Test 1 - Disk File > > The disk image /dev/xvdb1 was mounted as /media/test1. The images itself > was stored on a 500 GB SATA drive. The relevent numbers are highlighted in > blue. > > > > /dev/xvdb1 10317828 154236 9639476 2% /media/test1 > > [root@localhost ~]# bonnie++ -s 2048 -d /media/test1 -u root > > Version 1.03 ------Sequential Output------ --Sequential Input- > --Random- > -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks-- > Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec > %CP > localhost.locald 2G 6065 15 70595 37 20649 2 26878 53 57270 0 135.8 0 > ------Sequential Create------ --------Random Create-------- > -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete-- > files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP > 16 17008 99 +++++ +++ 26079 90 16002 94 +++++ +++ 29094 99 > localhost.localdomain,2G,6065,15,70595,37,20649,2,26878,53,57270,0,135.8,0, >1 6,17008,99,+++++,+++,26079,90,16002,94,+++++,+++,29094,99 > > > > > Test 2 - LVM > > > The LVM Logical Volume was created on the same 500 GB SATA drive and > mounted in the domU as /media/test2 > > /dev/xvdc 10321208 154236 9642684 2% /media/test2 > > > [root@localhost ~]# bonnie++ -s 2048 -d /media/test2 -u root > > Version 1.03 ------Sequential Output------ --Sequential Input- > --Random- > -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks-- > Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec > %CP > localhost.locald 2G 34825 92 50898 26 24833 4 35920 69 77594 1 137.9 0 > ------Sequential Create------ --------Random Create-------- > -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete-- > files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP > 16 15556 92 +++++ +++ 26198 96 16281 98 +++++ +++ 28508 100 > localhost.localdomain,2G,34825,92,50898,26,24833,4,35920,69,77594,1,137.9,0 >, 16,15556,92,+++++,+++,26198,96,16281,98,+++++,+++,28508,100 > INIT: version 2.86 reloading > > > > LVM soundly trounced the disk image in Sequential Output - Per Chr by about > 600% and bettered it by about 20-30% in the other tests. The one > interesting thing though was Sequential Output - Block where the disk image > pulled ahead of LVM by about 20%. This I can''t account for and will need to > retest because it doesn''t make a lot of sense. All of the Sequential > Create/Delete stats were within 10% of each other. > > > > The advantage of files are you can use standard Linux copy and delete > commands to manipulate them. The advantage of LVM is it''s faster and you > can benefit from LVMs ability to resize as well as create snapshots. You > could of course do this with your disk file being on the Dom0''s LVM setup > too by utilizing the hosts LVM features. > > > > Grant McWilliams_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> > > > > > 2. Can you point me in the right direction for doing LV snap > shots? > > Not possible in current clvmd implementation. > > > > > 3. If I have a xen guest os in a LV how would I migrate the guest > os > > from one machine to the other? Create identical LV on new machine? > Using clvmd. > > Best regards, > > ./npf > >I don''t think he was looking at doing cluster snapshots though. It''s true that cluster lvm can''t do snapshots and for good reason. Grant _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Thanks for the help! That''s the information I was looking for. I have one last question.. Does it matter if a server has Virtualization Technology in the hard ware? --- Chris Edwards Smartech Corp. Div. of AirNet Group http://www.airnetgroup.com <http://www.airnetgroup.com/> http://www.smartechcorp.net <http://www.smartechcorp.net/> cedwards@smartechcorp.net <mailto:agarrison@smartechcorp.net> P: 423-664-7678 x114 C: 423-593-6964 F: 423-664-7680 From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Grant McWilliams Sent: Monday, August 04, 2008 7:17 PM To: Javier Guerra Cc: Chris Edwards; Michael March; xen-users@lists.xensource.com Subject: Re: [Xen-users] Xen Image File vs LVM On Mon, Aug 4, 2008 at 1:04 PM, Javier Guerra <javier@guerrag.com> wrote: On Mon, Aug 4, 2008 at 3:01 PM, Michael March <mmarch@gmail.com> wrote:>> >>> 3. If I have a xen guest os in a LV how would I migrate the guestos>>> from one machine to the other? Create identical LV on new machine? >> >> to migrate VMs, the storage has to be accessible from both machines >> with the same reference. when using image files, that means a shared >> filesystem (NFS, GFS, OCFS, etc.), when using LVs, that means the VG >> must be accessible from both hosts, usually with a SAN or SAN-like >> setup (FC, iSCSI, drbd, AoE, (g)nbd, etc) > > Is this for ''live'' migrations or any migration of a VM?sorry, didn''t read the whole question. this is for live migrations. for ''manual'' migrations, you can get by copying the data (and i guess you could also migrate between image files and LVs, but i haven''t tried that (yet)) -- Javier You can go between LVs and files too really easy. I''ve started putting tutorials up on these things as I get to them at http://grantmcwilliams.com/index.php?option=com_content <http://grantmcwilliams.com/index.php?option=com_content&view=category&id=97 &Itemid=379> &view=category&id=97&Itemid=379 The URL will be changing though as I implement SEO on my site. ---------------------------------------------------------------------------- ---------------------------------- How to move from a tap:aio file to Logical Volume Management In Xen we can provide virtualized hard drives several different ways. It''s not uncommon to create a large empty file using dd and then specify it as the hard drive like this. name = "mailserver" memory = "1024" disk = [ ''tap:aio:/srv/xen/mailserver.img,xvda,w'', ] vif = [ ''bridge=xenbr0'', ] bootloader="/usr/bin/pygrub" vcpus=2 on_reboot = ''restart'' on_crash = ''restart'' In this example /srv/xen/mailserver.img is our file. In a lot of ways LVM is more powerful and faster so moving our test server to LVM makes sense once we''ve gotten serious about deploying it. Moving from tap:aio to LVM is much easier than you think, here''s how. 1. Shutdown domain. xm shutdown mailserver 2. Create the Logical Volume You''ll need a Logical Volume the same size as your Xen disk file. In this example the Xen disk file is 10GB and I''ll assume you already created it. This could easily turn into an LVM tutorial if I don''t. 10 GB Disk file: /srv/xen/mailserver.img 10 GB Logical Volume: /dev/VolGroup00/LogVolMAIL 3. Copy disk file to Logical Volume dd if=/srv/xen/mailserver.img of=/dev/VolGroup00/LogVolMAIL -bs 1024 4. Edit the Xen domain config file name = "mailserver" memory = "1024" disk = [ ''phy:/dev/VolGroup00/LogVolMAIL,xvda,w'', ] vif = [ ''bridge=xenbr0'', ] bootloader="/usr/bin/pygrub" vcpus=2 on_reboot = ''restart'' on_crash = ''restart'' 5. Restart domain xm create -c mailserver _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Tue, Aug 5, 2008 at 12:29 PM, Chris Edwards <cedwards@smartechcorp.net>wrote:> Thanks for the help! That''s the information I was looking for. I have > one last question…. > > > > Does it matter if a server has Virtualization Technology in the hard ware? > > Chris Edwards > Smartech Corp. > Div. of AirNet Group >Nope, especially if you''re running Linux. I currently don''t do any full VT stuff with Linux. PV is just plain faster. When IOMMU gets stable than I''ll do more. Grant _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users