Those who wonder what we’ve done since posting the previous blog article on WinDRBD will be interested to hear that we have been working hard to get Windows to boot over a WinDRBD device. The remote DRBD device can be hosted on a Linux machine which makes advanced features, such as fine-grained snapshots, readily available to a Windows client. This is made possible by using Linux features such as the Logical Volume Manager. And yes, adding diskful operation (with a backing disk on the client) will also be possible soon.
As a consequence of the boot feature, the interface to the application has been changed. There are now two modes a WinDRBD device can be used for I/O: SCSI Disk mode and Raw mode.
SCSI Disk mode
WinDRBD can act now as a SCSI port device. Windows (the Plug and Play Manager) then stacks the Disk and Partmgr drivers over theWinDRBD driver. This device then can be partitioned with the standard Windows tools.
Since the DISK.SYS driver is in the device stack, Windows applications that use undocumented I/O control requests should work (we’ve tested this with winsat).
There are three caveats:
- The device must first be partitioned. It is not possible to use the disk as a single partition without a partition table. Under Linux, use the kpartxutility to access the partitions.
- There must be a Virtual Bus device installed on the system. Currently, this has to be done manually via DeviceManager. We are working on automating this with the installer.
- Driver unloading is currently not supported. We are not sure if this ever can work with the WinDRBD virtual bus installed.
On the other hand, the use of SCSI devices eases handling of mount points, enables more Windows applications and allows for most (if not all) file systems being used on the devices.
To configure a disk device, just leave out the mount point (mount points are managed by the mount manager and assigned in partition manager) in the device clause of the drbd.conf, as in:
device minor 42;
The raw mode is the mode known from 0.9 and earlier releases. A non-PnP block device is created by the WinDRBD driver and a mount point is assigned. In this mode, some Windows applications might not work because they use undocumented ioctl calls. On the other hand, it is not necessary to create a partition table on the device, the device can be formatted directly with NTFS (other filesystems may or may not work).
To access the data on the block device a mount point (normally a drive letter) is assigned by the driver. This mount point is configured in the drbd.conf where the resource is configured. An example would be:
device "F:" minor 42;
In this example, the block device will be accessible under the F drive letter.
Don’t forget to set the role to Primary
For both raw mode and disk mode, the device is only created when the resource is Primary. There is no such thing as a Windows device when the resource is Secondary, so also no read-only access to the data when there are only Secondaries in the cluster. This also implies that for now, auto-promote is not supported. So to create the device, run
drbdadm primary r0
(as Administrator) then the devices should be visible. Disk devices become visible in the partition manager (where they can be partitioned) and raw devices become visible under the drive letter.
Current status of boot feature
We’ve implemented the SCSI port device interface mainly to get Windows boot from a WinDRBD device. This works very well already. Provided Windows is installed and configured correctly it can boot from a (Linux based) WinDRBD device.
Right now we are focussing on driver stability in order to prepare it for a 1.0 release. Also, some minor features (like connecting to more than one peer) are missing from the boot feature, but we will also add them before we release WinDRBD 1.0.
Can I help?
Yes you can 😉
We are still looking for beta testers. A good starting point to test the WinDRBD boot feature is the tech guide that describes how to set up a booting Windows via WinDRBD using VirtualBox images. This tech guide can be downloaded from https://www.linbit.com/tech-guides-overview/
Also, it would be helpful if you would request features that WinDRBD does not support yet, so we know what to add next.
We look forward to hearing from you.