Add New Raw Disk Device in VMware Server
Tagged:  •  

DRBD acts as a virtual layer between the OS file system and the raw disk device (or can actually work against LVM devices). Hence the reason for having a kernel module. To setup a second raw disk device on our VMware images, you can perform the following steps, with the guest powered off.

Add New Virtual Disk 

At the VMware server console window with your guest selected in inventory, click 'Edit virtual machine settings'. On the 'Hardware' tab, select 'Add...', choosing 'Hard Disk', and then 'Create a new virtual disk', keeping 'SCSI' as the type, and finally set your desired size and uncheck the 'Allocate All Disk Space Now' option if you so desire.

With the new disk added in VMware, it is now time to partition it within Fedora 8. After the guest has started, you have several programs you can use to do the partioning. I find cfdisk the easiest.

Partitioning with cfdisk

By default your new disk device will appear as /dev/sdb. Fire up cfdisk for that new disk with:

cfdisk /dev/sdb

cfdisk

Your console should look like above, showing no other partitions. From within cfdisk, use the arrow keys and to select 'New', the choose 'Primary' at the type, accept the default size (which should be the entire disk), and then finally, make sure you select 'Write' so the partion changes get written to the disk. Our new partion will be a device named /dev/sbd1.

At this stage the disk partion could be formatted with a new file system. In our case, we will be directing DRBD to manage this raw partition when we complete the compile and configure DRBD.