Page 1 of 1

[Solved] VMDK and multiple partitions for FreeNAS

Posted: 29. Jul 2009, 10:24
by tristram
Hi

I have a disk that has several partitions on it, 3 of which I've set aside for use with FreeNAS. As per the manual I've identified the partition numbers and issued the command:

Code: Select all

VBoxManage internalcommands createrawvmdk -filename "/mnt/data/freeNAS/partitions.vmdk" -rawdisk /dev/sda -partitions 6,7,8 -relative -register
This successfully creates the vmdk file in the specified file, which has the contents:

Code: Select all

tris@jupiter:/mnt/nas/freeNAS$ cat partitions.vmdk
# Disk DescriptorFile
version=1
CID=505a4e4b
parentCID=ffffffff
createType="partitionedDevice"

# Extent description
RW 63 FLAT "partitions-pt.vmdk"
RW 195318207 ZERO 
RW 63 FLAT "partitions-pt.vmdk" 63
RW 3903732 ZERO 
RW 63 FLAT "partitions-pt.vmdk" 126
RW 390620412 FLAT "/dev/sda6"
RW 63 FLAT "partitions-pt.vmdk" 189
RW 390620412 FLAT "/dev/sda7"
RW 63 FLAT "partitions-pt.vmdk" 252
RW 390620412 FLAT "/dev/sda8"
RW 582441678 ZERO 

# The disk Data Base 
As you can see, the 3 partitions are marked as being accessible. I attach the vmdk file to the VM that is going to run FreeNAS with the command:

Code: Select all

 VBoxManage modifyvm "FreeNAS" -hdb "/mnt/nas/freeNAS/partitions.vmdk"
[Note: the FreeNAS VM is configured with hda as a virtual drive that holds the installed software. It works fine with other virtual disks]

I then start up the VM, which works ok. The problem that I have is when I try and access the 3 partitions in FreeNAS - contrary to what the VirtualBox manual says the client sees only ONE disk (the whole disk) and doesn't see the 3 partitions. Anyone got an ideas where I might be going wrong?

Re: VMDK and multiple partitions for FreeNAS

Posted: 29. Jul 2009, 17:27
by tristram
SOLVED!

As you can't create UFS partitions easily under ubuntu (unless someone knows better, in which case tell me please!) I went with the 'safe' option of ext2/3. Unfortunately FreeBSD has a problem - the default inode size for ubuntu is 256B and FreeBSD can only handle 128. I used

Code: Select all

mke2fs -t ext3 -I 128 /dev/sda6
and it all worked perfectly.

AND, its nothing to do with VirtualBox :)