In order to use a DRBD resource as the virtual block device,
you must add a line like the following to your Xen domU
configuration:
disk = [ 'drbd:resource,xvda,w' ]
This example configuration makes the DRBD resource named
resource available to the domU as
/dev/xvda in read/write mode
(w).
Of course, you may use multiple DRBD resources with a single
domU. In that case, simply add more entries like the one
provided in the example to the disk option,
separated by commas.
![[Note]](images/note.png) | Note |
|---|
There are three sets of circumstances under which you cannot
use this approach:
You are configuring a fully virtualized (HVM) domU. You are installing your domU using a graphical
installation utility, and that
graphical installer does not support the
drbd: syntax. You are configuring a domU without the
kernel, initrd, and
extra options, relying instead on
bootloader and
bootloader_args to use a Xen
pseudo-bootloader, and that
pseudo-bootloader does not support the
drbd: syntax. pygrub (prior to Xen 3.3) and
domUloader.py (shipped with Xen on SUSE
Linux Enterprise Server 10) are two examples of
pseudo-bootloaders that do not support the
drbd: virtual block device configuration
syntax.
pygrub from Xen 3.3 forward, and the
domUloader.py version that ships with SLES
11 do support this syntax.
Under these circumstances, you must use the traditional
phy: device syntax and the DRBD device name
that is associated with your resource, not the resource name.
That, however, requires that you manage DRBD
state transitions outside Xen, which is a less flexible
approach than that provided by the drbd
resource type.
|