[CentOS] Vitualization and Partitioning

Dennis Jacobfeuerborn dennisml at conversis.de
Tue Sep 13 11:59:53 UTC 2011


On 09/13/2011 12:38 PM, Indunil Jayasooriya wrote:
> On Tue, Sep 13, 2011 at 2:00 PM, Rudi Ahlers<Rudi at softdux.com>  wrote:
>> On Tue, Sep 13, 2011 at 1:52 AM, Thomas Dukes<tdukes at sc.rr.com>  wrote:
>>>
>>>
>>>> -----Original Message-----
>>>> From: centos-bounces at centos.org
>>>> [mailto:centos-bounces at centos.org] On Behalf Of ken
>>>> Sent: Monday, September 12, 2011 12:36 AM
>>>> To: CentOS mailing list
>>>> Subject: Re: [CentOS] Vitualization and Partitioning
>>>>
>>>> On 09/11/2011 11:10 PM Emmanuel Noobadmin wrote:
>>>>> Hi,
>>>>>
>>>>>> When I do the install, do I or should I setup a separate partition
>>>>>> for guest
>>>>> That would be better from a performance point of view
>>>>>
>>>>>> OS's? From the redhat docs, it looks like the guest OS's reside at
>>>>>> /var/lib/libvirt/images/.
>>>>> This should be using files as disk files, which I did and
>>>> found it to
>>>>> be a problem when there is heavy I/O.
>>>>
>>>> I like LVM (for the reasons you cite).  Would you (anyone?)
>>>> say it's best to have one LV per guest or one LV for all guests?
>>>>
>>>>
>>>> tnx.
>>>
>>> I'm new to this but I would think you would want a separate LV for each
>>> guest. Seems I read somewhere, that you need one core per guest as well.
>>> That's why I'm opting for the Xeon processor rather than the iCore(x). Four
>>> cores v. two. More options.
>>>
>>> Can't believe this thread hasn't stirred more response. Maybe we all are in
>>> the learning phase.
>>>
>>> Eddie
>>>
>>> _______________________________________________
>>
>> We use LVM on all our virtual hosting servers since it's much easier to manage.
>>
>>
>> You basically setup a PV volume spanning the whole drive(s), and then
>> a 10GB (or larger if you need to) LVM volume for /root, 10GB for /var,
>> 2GB for /tmp&  5GB for /home.
>>
>>
>> Then for any VM's just add LVM volumes as needed, for example:
>>
>> /dev/Volume001/vm1_root  - 10GB
>> /dev/Volume001/vm1_swap - 1GB
>>
>>
>> Another tip: Don't use the default LVM volume naming scheme, but
>> instead name the LVM volumes according to your server name, i.e.
>> server01&  server02. This way if server01's HDD crashes and you need
>> to mount it on server002 for recovery purposes, you won't have
>> conflicting LVM volumes
>>
>>
>
> Hi, Interesting subject. Let me participate too. Suppose we are going
> to install 3 VMs, I think it is proper to create separate LVMs  like
> this
>
> /dev/vg_server1/lv.server1
>
> and mount it as
>
> /var/lib/libvirt/images/server1
>
>
>
> /dev/vg_server2/lv.server2
>
> and mount it as
>
> /var/lib/libvirt/images/server2
>
>
>
> /dev/vg_server3/lv.server3
>
> and mount it as
>
> /var/lib/libvirt/images/server3

Don't use separate volume groups. Also don't mount the logical volumes but 
instead use them directly as block devices. That should give you better 
performance as the i/o path is then VM->block device instead of 
VM->filesystem->block device.

> If I mount in that way, Is it possible to take live snapshot backup
> while these 2 servers are running?

Remember that you need to allocate enough space for the snapshot volume to 
contain all the blocks that change on the VM while the backup is running 
i.e. if your backup is running for an hour and during that hour your VM 
receives 2G worth of writes/update then you need to have at least a size of 
2G for your snapshot volume.
This also means that you have to reserve enough space in the volume group 
to create a big enough snapshot volume.

Also keep in mind that the backup you will get will not be fully consistent 
only crash consistent.

Regards,
   Dennis



More information about the CentOS mailing list