Limit on Number of Pass Through SATA Drives

Mallard612

Member
Jan 19, 2016
1
0
21
39
I've been searching for quite some time and haven't found a clear answer. There was a question from 2012, but the answer was that the limit on the number of SATA drives was going away. So I need some help/clarification.

I'm in the process of deploying a home server with Proxmox. I'll be using Fedora as my Docker host and utilizing Rockstor to manage my storage needs. I have a mix of 10 different sized HDD's which is why I'm looking at btrfs. When I modify the .conf file for the Rockstor VM, I'm only able to pass 5 HDD's via SATA. When I tried SCSI, I could only pass 2. So my question is, is there a limit on the number of pass-through drives and, if not, what should the configuration look like to pass all of the HDD's via SATA into the VM? Rockstor currently requires that they are passed via SATA.

I've been adding them by using the following:

nano /etc/pve/nodes/proxmox/qemu-server/114.conf

I then modify the config to include:

sata0: /dev/disk/by-id/{serial number}
sata1: /dev/disk/by-id/{serial number}, etc.
 
Any chance this could be revisited? I'm passing through 6 SATA drives to a guest, but would like to pass the full 8 which my motherboard supports. Is this an arbitrary or technical limitation?
 
Hello,

I am also interested.
Is it possible to pass the limit to 8 or more via an order or a configuration file?
Indeed my virtualized device does not support anything other than SATA.

Thank you
(Sorry for my translation)
 
Hi,

I have a soluce !

Code:
args: -device ahci,id=ahci1,multifunction=on,bus=pci.0,addr=0xb -drive 'file=/dev/disk/by-id/ata-ST500DM009-2F110A_ZA480LWF,if=none,id=drive-sata6,format=raw,aio=threads,detect-zeroes=unmap' -device ide-hd,bus=ahci1.1,drive=drive-sata6,id=sata6

Found on another forum.
 
Last edited:
  • Like
Reactions: yaqdhan
Sorry for the newb question. I am new to linux and proxmox. What am I doing wrong?

I'm running Proxmox VE 7.2-3 and just like everyone else, trying to pass a hard drive from SATA6 through to a TrueNAS VM.

Am I supposed to add that line of code as a new line inside the .conf file? I assumed I was and now the VM wont start. I did change the hard drive name and the line of code I added looked like this...

args: -device ahci,id=ahci1,multifunction=on,bus=pci.0,addr=0xb -drive 'file=/dev/disk/by-id/{ata-ST12000NM0008-2H3101_ZHZ1F9PC},if=none,id=drive-sata6,format=raw,aio=threads,detect-zeroes=unmap' -device ide-hd,bus=ahci1.1,drive=drive-sata6,id=sata6

I deleted the line of code and it started up no problem. Thanks for the help in advance.
 
WOOOOOOOOOOOO!!!!!!!!! Just followed the official proxmox instruction and WHAMMY! There it is. So just to make sure I am understanding what is really happeneing....Proxmox basically build a virtual scsi interface that controls that SATA port?

Thanks for the help! I may have gotten way to excited the moment I saw the drive show up in my VM lol.
 
Disk passthrough isn't showing the VM the real physical disk. The VM is still working with a virtual disk, just that the blocks of that disk will be mapped to that physical disk. So VM writes to virtual disk, QEMU does some virtualization magic and writes that to the physical disk. As the VM isn't interacting with the real physical disk, it is no problem to use a virtual IDE or SCSI bus with physical SATA disks, as QEMU does the translation.
 
Last edited:
Disk passthrough isn't showing the VM the real physical disk. The VM is still working with a virtual disk, just that the blocks of that disk will be mapped to that physical disk. So VM writes to virtual disk, QEMU does some virtualization magic and writes that to the physical disk. As the VM isn't interacting with the real physical disk, it is no problem to use a virtual IDE or SCSI bus with physical SATA disks, as QEMU does the translation.
I do find that quite logical to understand, but when you add encryption to the mix I have trouble to wrap my head around it.

I have a few drives that holds data, the drives comes from a bare metal Ubuntu and the drives are encrypted with luks.
PVE can of course see the drives but not the partitions, nor mount them since they are encrypted. The passthrough to my VM works fine and in the VM I do decrypt and mount as intended.


Just having hard time understanding the mechanics of QEMU with the encrypted drives that PVE sees
 
It doesn't need to know anything about partitions and so on, as it just works on the block level. You got 512B sectors on the virtual disk and these get mapped to the (probably 4K) sectors of your physical disk. So both should contain the same bits when reading the disks from first to last sector.
 
Hi,

I have a soluce !

Code:
args: -device ahci,id=ahci1,multifunction=on,bus=pci.0,addr=0xb -drive 'file=/dev/disk/by-id/ata-ST500DM009-2F110A_ZA480LWF,if=none,id=drive-sata6,format=raw,aio=threads,detect-zeroes=unmap' -device ide-hd,bus=ahci1.1,drive=drive-sata6,id=sata6

Found on another forum.
Hello all,

After adding the "args" to the VM conf. file the drives apear in the VM when booted but not at hardware section on the proxmox VM.

Any thing missing besside the "args" line ?

Thanks
 
No. That is how it works (in my experience)

I have been able to add additional SATA devices using "args" lines and they do not show up under Hardware. There is a soft limit on SATA devices at 6 which is reflected in the hardware configuration page and the args line manually added to the VM config file is just a work around.

I did not find any issues using 4 additional SATA devices (10 total) on a heavily used file server but I would still consider this an unsupported configuration at best.

Good luck :)


Grantman
 
No. That is how it works (in my experience)

I have been able to add additional SATA devices using "args" lines and they do not show up under Hardware. There is a soft limit on SATA devices at 6 which is reflected in the hardware configuration page and the args line manually added to the VM config file is just a work around.

I did not find any issues using 4 additional SATA devices (10 total) on a heavily used file server but I would still consider this an unsupported configuration at best.

Good luck :)


Grantman
Thanks for the reply,

I've added a total of 12 SATA drives to my VM in two separate AHCI SATA args onf the VM.conf.
This way I could use 12 disks passthrough to my VM from my netapp shelf.
 
Thanks for the reply,

I've added a total of 12 SATA drives to my VM in two separate AHCI SATA args onf the VM.conf.
This way I could use 12 disks passthrough to my VM from my netapp shelf.
I want to add 8 sata drives to a VM. I was able to add 6th sata drive, however for 7th and 8th I am not sure what to values need to edit to below args.
Any help on this will be greatly appreciated.

args: -device ahci,id=ahci1,multifunction=on,bus=pci.0,addr=0xb -drive 'file=/dev/disk/by-id/ata-xx-xx,if=none,id=drive-sata6,format=raw,aio=threads,detect-zeroes=unmap' -device ide-hd,bus=ahci1.1,drive=drive-sata6,id=sata6
 
I want to add 8 sata drives to a VM. I was able to add 6th sata drive, however for 7th and 8th I am not sure what to values need to edit to below args.
Any help on this will be greatly appreciated.

args: -device ahci,id=ahci1,multifunction=on,bus=pci.0,addr=0xb -drive 'file=/dev/disk/by-id/ata-xx-xx,if=none,id=drive-sata6,format=raw,aio=threads,detect-zeroes=unmap' -device ide-hd,bus=ahci1.1,drive=drive-sata6,id=sata6
You can try something like this:

args: -device ahci,id=ahci1,multifunction=on,bus=pci.0,addr=0xb -drive 'file=/dev/disk/by-id/ata-ST16000NM000J-2TW103_ZR5DKGFB,if=none,id=drive-sata6,format=raw,aio=threads,detect-zeroes=unmap' -device ide-hd,bus=ahci1.0,drive=drive-sata6,id=sata6 -drive 'file=/dev/disk/by-id/ata-ST16000NM000J-2TW103_ZR5D694X,if=none,id=drive-sata7,format=raw,aio=threads,detect-zeroes=unmap' -device ide-hd,bus=ahci1.1,drive=drive-sata7,id=sata7 -drive 'file=/dev/disk/by-id/ata-ST16000NM000J-2TW103_ZR60X3P0,if=none,id=drive-sata8,format=raw,aio=threads,detect-zeroes=unmap' -device ide-hd,bus=ahci1.2,drive=drive-sata8,id=sata8
 
Instead of passing through all of the drives individually, it would be better to pass through the while SATA controller. (Unless your boot drive is attached to it...)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!