[DRBD-user] Partitioning a drbd device

Florian Haas florian.haas at linbit.com
Thu Mar 12 08:42:30 CET 2009

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

Hi Dominik,

On 03/11/2009 03:55 PM, Dominik Klein wrote:
> Hi
> I'm looking at kvm virtualisation and the pretty nice virt-manager.
> Thanks Florian for making me look into it! :)

Quite welcome. :-)

> So while setting up a kvm on top of a drbd device, the setup process
> partitioned the drbd device into root and swap partitions.
> # fdisk -l /dev/drbd2
> Disk /dev/drbd2: 32.2 GB, 32211234816 bytes
> 255 heads, 63 sectors/track, 3916 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
> Disk identifier: 0x09fffa0f
> Device Boot      Start         End      Blocks   Id  System
> /dev/drbd2p1               1        3916    31455238+  83  Linux
> So what I'd like to know is whether this is a supported setup and
> considered save to do/use.

Whether it's "supported" depends entirely on what you do with this sort
of setup. :-) For KVM or Xen it's generally fine, for KVM it's indeed
something of a prerequisite.

I suppose you want to know what you can do with these "partitions" from
the host environment. Check out the man page of kpartx and play with the
devmaps which "kpartx -av /dev/drbd2" generates.

Be warned, though: you're on your own in coordinating your devmap access
with that from KVM. In other words, don't mount and modify any of these
filesystems while KVM is using the device.


: Florian G. Haas
: LINBIT | Your Way to High Availability

When replying, there is no need to CC my personal address. I monitor the
list on a daily basis. Thank you.

DRBD® and LINBIT® are registered trademarks of LINBIT.

More information about the drbd-user mailing list