gilgwath
Contributor
Contributor

How do I get a localy attached RAID-Array into a Linux-VM - vSphere 5.1

Jump to solution

Hello VMware folks

I am trying to set up a file server with a mirrored data storage. So I installed a LSI MegaRaid SAS 9266-8i into my hoste machine, attached two HDD's and configured a RAID-1 virtual disk in the bios of the card. After reboot, the card and the virtualdisk are recognised by the hypervisor. I configured the PCI-Card for DirectPath-I/O and attached it to a VM which runs Debian Wheezy. The VM comes up normaly but I can neither the disk virtual nor the disks attached to de card in /dev.

lspci tells me as follows:

root@gondolin:/# lspci -k | grep -i -A3 lsi

03:00.0 Serial Attached SCSI controller: LSI Logic / Symbios Logic SAS1068 PCI-X Fusion-MPT SAS (rev 01)

        Subsystem: VMware SAS Controller

        Kernel driver in use: mptsas

0b:00.0 RAID bus controller: LSI Logic / Symbios Logic MegaRAID SAS 2208 [Thunderbolt] (rev 05)

        Subsystem: LSI Logic / Symbios Logic MegaRAID SAS 9266-8i

So it seems that there is no kernel driver is handeling my raid card. Using megacli to find the adapter results in the following

root@gondolin:/# megacli -adpCount

Controller Count: 0.

Exit Code: 0x00

Obviously the card is not visible the the system at all. Manually loading the megaraid_sas driver with modprobe does not change anything. Google did not bring up much usfull information, only threads with dead ends. So I started to wonder if I have done something wrong initially or if I am doing something that is supposed to be donne in an driffrent, more apropriat way.

Is there a better way to pass logacl storage into a virtual machine? Or should I continue trying to get the card working with the approach I chose? Maybe switch distro (would not be very fond of that)?

I am grateful for any help

Revelant system information:

CPU: Intel Xeon E3-1240v2

MB: Intel DZ77GA-70K

RAID: mentioned above

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
gilgwath
Contributor
Contributor

I figured this out myself. After I spent about two days on google. It became clear that the feature I was looking for is "RDM"(This and the following pages on the VMware-Documentation). Though local LUN's are not officially supported for this feature, one can make it work via the service console. This blogentry explains the process quite well. Although be aware that this is not officially supported. As for the performance questions I found this.

As I was testing r/w rates over the network I ran, just out of curiosity, quick test using dd:

Read test:

root@gondolin:/# dd of=/mnt/data/test if=/dev/zero bs=32k count=65392

65392+0 Datensätze ein

65392+0 Datensätze aus

2142765056 Bytes (2.1 GB) kopiert, 11.065 s, 194 MB/s

Write test

root@gondolin:/# dd of=/dev/null if=/mnt/data/test bs=32k

65392+0 Datensätze ein

65392+0 Datensätze aus

2142765056 Bytes (2.1 GB) kopiert, 10.1793 s, 211 MB/s

System info:

uname -a

Linux gondolin 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64 GNU/Linux

File system used: ext4 standart configuration.

RaidConfig: RAID1(2x1TB@7.2k) 32MBcache/disk and writeback cache enabled on the controller.

I hope this will help future users with the same question.

View solution in original post

0 Kudos
2 Replies
gilgwath
Contributor
Contributor

I was able to gather some more kernel information: Ther kernel obviously tries to intialise the card, but fails. Here the some grep from the kernel log:

root@gondolin:/# cat /var/log/kern.log | grep -i megasas||megaraid_sas||0b:00.0||05b

Jan 31 18:25:54 gondolin kernel: [    1.257093] megasas: 00.00.06.12-rc1 Wed. Oct. 5 17:00:00 PDT 2011
Jan 31 18:25:54 gondolin kernel: [    1.257103] megasas: 0x1000:0x005b:0x1000:0x9266: bus 11:slot 0:func 0
Jan 31 18:25:54 gondolin kernel: [    1.266628] megasas: Waiting for FW to come to ready state
Jan 31 18:25:54 gondolin kernel: [    1.266629] megasas: FW in FAULT state!!
Jan 31 18:25:54 gondolin kernel: [    1.266631] megaraid_sas 0000:0b:00.0: megasas: FW restarted successfully from megasas_init_fw!
Jan 31 18:25:54 gondolin kernel: [   31.183837] megasas: Waiting for FW to come to ready state
Jan 31 18:25:54 gondolin kernel: [   31.183842] megasas: FW in FAULT state!!

I also rechecked the configuration of the RAID-Array, seems to be fine. I think the card does not like to be passed via DirectPath-I/O. Is there any alternative to this? Will I suffer a performanceloss if I just create VMFS-Partition on the RAID-volume and create a virtual harddrive that filles the whole RAID, then connect this to the VM via normal virtual SCSI adapter?

0 Kudos
gilgwath
Contributor
Contributor

I figured this out myself. After I spent about two days on google. It became clear that the feature I was looking for is "RDM"(This and the following pages on the VMware-Documentation). Though local LUN's are not officially supported for this feature, one can make it work via the service console. This blogentry explains the process quite well. Although be aware that this is not officially supported. As for the performance questions I found this.

As I was testing r/w rates over the network I ran, just out of curiosity, quick test using dd:

Read test:

root@gondolin:/# dd of=/mnt/data/test if=/dev/zero bs=32k count=65392

65392+0 Datensätze ein

65392+0 Datensätze aus

2142765056 Bytes (2.1 GB) kopiert, 11.065 s, 194 MB/s

Write test

root@gondolin:/# dd of=/dev/null if=/mnt/data/test bs=32k

65392+0 Datensätze ein

65392+0 Datensätze aus

2142765056 Bytes (2.1 GB) kopiert, 10.1793 s, 211 MB/s

System info:

uname -a

Linux gondolin 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64 GNU/Linux

File system used: ext4 standart configuration.

RaidConfig: RAID1(2x1TB@7.2k) 32MBcache/disk and writeback cache enabled on the controller.

I hope this will help future users with the same question.

View solution in original post

0 Kudos