SATA Controller Passthrough help


Recommended Posts

Hi everyone,

Need help with onboard SATA controller, I need to pass it through my Ubuntu VM. I have 2xSamsung 860 500Gb Evos, where I installed guest OS directly by using technique below with software RAID0:

/dev/disk/by-id/ata-Samsung_SSD_860_EVO_500GB_XYZXYZYXYYXYZY

/dev/disk/by-id/ata-Samsung_SSD_860_EVO_500GB_XYXYXYXYXYXYXY 

Everything works as intended, get about 850 MB/s Seq.Write speeds and about 1GB/s reads, not too bad tbh, my problem is Ubuntu not recognizing these drives as Samsung, but instead, it shows as:

=== START OF INFORMATION SECTION ===
Device Model:     QEMU HARDDISK
Serial Number:    QM00005
Firmware Version: 2.5+
User Capacity:    500,107,862,016 bytes [500 GB]
Sector Size:      512 bytes logical/physical
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   ATA/ATAPI-7, ATA/ATAPI-5 published, ANSI NCITS 340-2000
Local Time is:    Mon May 28 19:24:34 2018 EDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

 

Someone told me to pass through the entire onboard 2xSATA controllers from the motherboard to archive this. Apparently, I have my obvious reasons why I wanna take this route, one is SMART reports, which is very limited for Emulated QEMU HARDDISK, another is TRIM, which I have enabled in weekly crontab with Fstrim command, it works, the system never did it automatically. 

 

This is my system:

Dell PowerEdge T30

Intel Xeon E3-1225 V5 3.3Ghz

12GB ECC RAM

4 onboard SATA ports

SYBA SY-PEX40039 SATA III PCI-e 2.0 x1 Card (it has 2 ports and its only 1 lane, HDDs connected to it, it's up to 6GB/s for 2 SATA ports shared, not interested in passing this one)

 

PCI Devices and IOMMU Groups:

IOMMU group 0:	[8086:1918] 00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers (rev 07)

IOMMU group 1:	[8086:1901] 00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x16) (rev 07)

IOMMU group 2:	[8086:191d] 00:02.0 VGA compatible controller: Intel Corporation HD Graphics P530 (rev 06)

IOMMU group 3:	[8086:a12f] 00:14.0 USB controller: Intel Corporation Sunrise Point-H USB 3.0 xHCI Controller (rev 31)

[8086:a131] 00:14.2 Signal processing controller: Intel Corporation Sunrise Point-H Thermal subsystem (rev 31)

IOMMU group 4:	[8086:a13a] 00:16.0 Communication controller: Intel Corporation Sunrise Point-H CSME HECI #1 (rev 31)

[8086:a13d] 00:16.3 Serial controller: Intel Corporation Sunrise Point-H KT Redirection (rev 31)

IOMMU group 5:	[8086:2822] 00:17.0 RAID bus controller: Intel Corporation SATA Controller [RAID mode] (rev 31)

IOMMU group 6:	[8086:a167] 00:1b.0 PCI bridge: Intel Corporation Sunrise Point-H PCI Root Port #17 (rev f1)

IOMMU group 7:	[8086:a110] 00:1c.0 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #1 (rev f1)

IOMMU group 8:	[8086:a114] 00:1c.4 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #5 (rev f1)

IOMMU group 9:	[8086:a118] 00:1d.0 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #9 (rev f1)

IOMMU group 10:	[8086:a149] 00:1f.0 ISA bridge: Intel Corporation Sunrise Point-H LPC Controller (rev 31)

[8086:a121] 00:1f.2 Memory controller: Intel Corporation Sunrise Point-H PMC (rev 31)

[8086:a170] 00:1f.3 Audio device: Intel Corporation Sunrise Point-H HD Audio (rev 31)

[8086:a123] 00:1f.4 SMBus: Intel Corporation Sunrise Point-H SMBus (rev 31)

IOMMU group 11:	[8086:15b7] 00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (2) I219-LM (rev 31)

IOMMU group 12:	[144d:a804] 02:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller SM961/PM961

IOMMU group 13:	[104c:8240] 03:00.0 PCI bridge: Texas Instruments XIO2001 PCI Express-to-PCI Bridge

IOMMU group 14:	[1b21:0612] 05:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 02)

IOMMU group 15:	[144d:a804] 06:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller SM961/PM961

SCSI Devices:

[0:0:0:0]	disk SanDisk Cruzer Fit 1.00 /dev/sda 16.0GB
[1:0:0:0]	disk ATA WDC WD80EFAX-68L 0A83 /dev/sdb 8.00TB
[2:0:0:0]	disk ATA Samsung SSD 860 1B6Q /dev/sdc 500GB
[3:0:0:0]	disk ATA Samsung SSD 860 1B6Q /dev/sdd 500GB
[4:0:0:0]	disk ATA WDC WD80EFAX-68L 0A83 /dev/sde 8.00TB
[5:0:0:0]	disk ATA WDC WD80EFAX-68L 0A83 /dev/sdf 8.00TB
[6:0:0:0]	disk ATA WDC WD80EFAX-68L 0A83 /dev/sdg 8.00TB

 

 

I would really appreciate any input and any comment

(I did search subreddit, here and googled it for past 2 days, nothing helped, I am so sorry if it was posted before)

Link to comment
On 5/28/2018 at 6:40 PM, pervin_1 said:

IOMMU group 14: [1b21:0612] 05:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 02)

If you are going to use your SSDs in your VM you will want to connect them to this controller and pass it through to the VM.  To do that I would recommend "stub"ing the device in "syslinux.cfg" (you do that from the GUI on the unRAID flash drive).   Look for the boot option you use to regularly boot unRAID (I.E. if you boot to GUI mode you will make changes to that).  Most people I think use the standard default options and boot to non-GUI mode.  Anyway the section in syslinux.cfg that you should be looking for:

label unRAID OS
  menu default
  kernel /bzimage
  append initrd=/bzroot

so to stub your ASMedia card you would change the above to look something like this:

 

label unRAID OS
  menu default
  kernel /bzimage
  append vfio-pci.ids=1b21:0612 initrd=/bzroot

if you had more devices to pass through to this or any other VMs just add it after a comma so 1b21:0612 would become 1b21:0612,xxxx:yyyy for instance

Note how I got the information on your ASMedia card from the display at the top: "[1b21:0612]".  Now just reboot.  When you do your SSDs will no longer be visible to unRAID any more.  But when you edit your VM you will now see that the ASMedia card is listed as available to pass through to the VM now.  For instance on my VM server I have the following devices showing up as available to pass through to a VM most of which ARE being pass through to another VM:

943538330_PCIdevicestopassthroughtoaVM.png.0aebc2edc380d6682bf6ea36a40b887b.png

So your ASMedia controller would show up in the above box along with any other devices you stub'd to allow pass through.

 

Hope that help.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.