Hello everyone,
I am moving a 2 node cluster from XenServer + iSCSI with lvm to CentOS 5.4+Xen on NFS using .img files.
What do you guys use for your partition scheme for .img files? I see examples where people create another .img to use it as swap. I was gonna put lvm inside the .img and create separate filesystems in logical volumes(/var, /home, /opt, /tmp and swap).
-Adam
Adam wrote:
What do you guys use for your partition scheme for .img files? I see examples where people create another .img to use it as swap. I was gonna put lvm inside the .img and create separate filesystems in logical volumes(/var, /home, /opt, /tmp and swap).
I'd recommend not using LVM inside the images because if you just have a raw disk image in there with regular partitions you can mount it on dom0 (with losetup) for maintenance. I don't think that would be possible with LVM.
Brett
----- "Brett Worth" brett@worth.id.au wrote:
Adam wrote:
What do you guys use for your partition scheme for .img files? I
see
examples where people create another .img to use it as swap. I was
gonna
put lvm inside the .img and create separate filesystems in logical volumes(/var, /home, /opt, /tmp and swap).
I'd recommend not using LVM inside the images because if you just have a raw disk image in there with regular partitions you can mount it on dom0 (with losetup) for maintenance. I don't think that would be possible with LVM.
But it is.
Christopher G. Stach II wrote:
I'd recommend not using LVM inside the images because if you just have a raw disk image in there with regular partitions you can mount it on dom0 (with losetup) for maintenance. I don't think that would be possible with LVM.
But it is.
I guess that's informative so why don't I feel informed? :-)
OK. I'll bite. How?
Brett
On 11/01/2009 08:37 AM, Brett Worth wrote:
Christopher G. Stach II wrote:
I'd recommend not using LVM inside the images because if you just have a raw disk image in there with regular partitions you can mount it on dom0 (with losetup) for maintenance. I don't think that would be possible with LVM.
But it is.
I guess that's informative so why don't I feel informed? :-)
OK. I'll bite. How?
using the procedure described at http://www.centos.org/docs/5/html/5.2/Virtualization/sect-Virtualization-How...
On 11/01/2009 10:51 AM, Manuel Wolfshant wrote:
On 11/01/2009 08:37 AM, Brett Worth wrote:
Christopher G. Stach II wrote:
I'd recommend not using LVM inside the images because if you just have a raw disk image in there with regular partitions you can mount it on dom0 (with losetup) for maintenance. I don't think that would be possible with LVM.
But it is.
I guess that's informative so why don't I feel informed? :-)
OK. I'll bite. How?
using the procedure described at http://www.centos.org/docs/5/html/5.2/Virtualization/sect-Virtualization-How...
It should be mentioned that it's important not to accept the default volume group name when using LVM as that will lead to a collision in a case such as this where the VG name of both host and guest might end up beeing "VolGroup00". I hope RHEL/Centos 6 chooses better defaults based on the hostname for example.
Regards, Dennis
There is no need for a second img to use as swap right?
-Adam
On Sun, Nov 1, 2009 at 7:34 AM, Dennis J. dennisml@conversis.de wrote:
On 11/01/2009 10:51 AM, Manuel Wolfshant wrote:
On 11/01/2009 08:37 AM, Brett Worth wrote:
Christopher G. Stach II wrote:
I'd recommend not using LVM inside the images because if you just have a raw disk image in there with regular partitions you can mount it on dom0 (with losetup) for maintenance. I don't think that would be possible with LVM.
But it is.
I guess that's informative so why don't I feel informed? :-)
OK. I'll bite. How?
using the procedure described at
http://www.centos.org/docs/5/html/5.2/Virtualization/sect-Virtualization-How...
It should be mentioned that it's important not to accept the default volume group name when using LVM as that will lead to a collision in a case such as this where the VG name of both host and guest might end up beeing "VolGroup00". I hope RHEL/Centos 6 chooses better defaults based on the hostname for example.
Regards, Dennis _______________________________________________ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
----- "Adam" adam0x54@gmail.com wrote:
There is no need for a second img to use as swap right?
Correct, unless you were in a pinch and strangely needed to add more swap, had no unallocated space in your image, and couldn't shut down the guest to resize the image.
----- "Adam" adam0x54@gmail.com wrote:
There is no need for a second img to use as swap right?
Rereading your original message got me to wondering whether the examples you saw were putting swap on local storage and the filesystems on remote storage. You can do that for swap performance, but then you can't migrate VMs with the stock tools. It's better to just allocate a decent swap space, store it over the network, and avoid using swap (allocate more RAM, turn down swappiness, etc.) You can also just not use a disk for swap space, such as swap on ramdisk if you're running a kernel that murders itself when it has no swap.
such as swap on ramdisk if you're running a kernel that murders
itself when it has no swap.
Thanks for that reminder. I forget how practical that is at times.
I agree with throwing ram and trimming swap space down. On windows they want a huge swap so the system can dump. I think the last time I cared to spend the time to trouble shoot a windows machine via a dump was over 12 years ago. Maybe more. Is a lot cheaper and quicker to just start rebuilding most of the time.
Christopher G. Stach II wrote:
----- "Adam" adam0x54@gmail.com wrote:
There is no need for a second img to use as swap right?
Rereading your original message got me to wondering whether the examples you saw were putting swap on local storage and the filesystems on remote storage. You can do that for swap performance, but then you can't migrate VMs with the stock tools. It's better to just allocate a decent swap space, store it over the network, and avoid using swap (allocate more RAM, turn down swappiness, etc.) You can also just not use a disk for swap space, such as swap on ramdisk if you're running a kernel that murders itself when it has no swap.
There is no need for a second img to use as swap right?
Yes and no. On physical machines I am very used to putting swaps on separate controllers and drives for performance reasons as am sure many others here are.
I have yet to see that pay off on Xen, but I really haven't had a "hammered on" system in production yet. All are smaller and much, much more focused on precisely what they need to do and not commingled as multipurpose machines (e.g. webserver + file server + vpn server).
It is an engineering and use question and YMMV, but you can always add it later if the need arises and by really measuring where you are bottlenecking.
Adam wrote:
There is no need for a second img to use as swap right?
-Adam
On Sun, Nov 1, 2009 at 7:34 AM, Dennis J. <dennisml@conversis.de mailto:dennisml@conversis.de> wrote:
On 11/01/2009 10:51 AM, Manuel Wolfshant wrote: > On 11/01/2009 08:37 AM, Brett Worth wrote: >> Christopher G. Stach II wrote: >> >>>> I'd recommend not using LVM inside the images because if you just have >>>> a raw disk image in >>>> there with regular partitions you can mount it on dom0 (with losetup) >>>> for maintenance. I >>>> don't think that would be possible with LVM. >>>> >>> But it is. >>> >> >> I guess that's informative so why don't I feel informed? :-) >> >> OK. I'll bite. How? > using the procedure described at > http://www.centos.org/docs/5/html/5.2/Virtualization/sect-Virtualization-How_To_troubleshoot_Red_Hat_Virtualization-Accessing_data_on_guest_disk_image.html It should be mentioned that it's important not to accept the default volume group name when using LVM as that will lead to a collision in a case such as this where the VG name of both host and guest might end up beeing "VolGroup00". I hope RHEL/Centos 6 chooses better defaults based on the hostname for example. Regards, Dennis _______________________________________________ CentOS-virt mailing list CentOS-virt@centos.org <mailto: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