[DRBD-user] DRBD and KVM for a HA-Cluster ?

Lentes, Bernd bernd.lentes at helmholtz-muenchen.de
Fri Jan 14 18:51:25 CET 2011

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


Felix Frank wrote:
> >>
> > 
> > lv_home_snapshot is a snapshot form a normal LV which has a 
> filesystem.
> > My question is: I like to install vm's using KVM into plain 
> lv's which have no filesystem.
> > How can i backup a partition which has no filesystem 
> without using dd 
> > ? DD is slow and copies _every_ sector of a 50GB lv, 
> although just e.g. 20GB are occupied.
> 
> Do it using kpartx. I thought that much was obvious from my 
> previous response. Please read it up.
> 
> No, it's not supposed to work with single partitions. It 
> works with partitioned drives/images. That's what you need. 
> You need no tool that helps you with a single partition 
> containing a filesystem. You want nodes for the partitions 
> contained in a block device (your LV snapshot) that 
> represents a partitioned disk.
> 
> Test it with the kind of block device you actually need to 
> interact with, not some random LV you've got lying around.
> 

I think i get it. 

Procedure:
Create a plain lv for my VM.
Create the VM with KVM into this plain lv, install the guest OS, during installation create one or more partitions.
VM is running. Create a snapshot from the lv in which the vm resides, let's call it vm_snapshot.

Frank, your idea is that the lv (and also the snapshot) contains one or more partitions, depending on the guest OS setup.
For these partitions, i create nodes in /dev using kpartx -a /dev/vgxxx/vm_snapshot.
These nodes can now be mounted. Now my backup software in the host (Legato Networker client) is able to save the partitions of my guest, right ?
Is that your idea ?

Two questions:
1. Are you sure that kpartx is able to read the raw data written by KVM into the lv's, that it is able to recognize the partitions ?
2. What is if my guest OS contains lv's, not only physical partitions ?


Bernd


More information about the drbd-user mailing list