Please help me with enabling HDD hotplugging

TwistedNebula

New Member
Nov 14, 2023
7
0
1
Hello, I bought HDD hot-swap bay but it doesn't work. Product page is in Korean, but h/w specification is in English if you scroll down further.

CPU Ryzen 7 3700X
Mainboard Aorus X570 Elite

- I enabled SATA hotplugging in BIOS
- HDD can be recognized if HDD is connected before Proxmox is booted
- HDD cannot be recognized if HDD is connected after Proxmox is booted

I did some research and I ran into couple of threads but couldn't solve my issue
- Sata hotplug doesn't work
- How do I make Linux recognize a new SATA /dev/sda drive I hot swapped in without rebooting?

Is there something needs to be done on Proxmox to enable HDD hotplugging?

UPDATE:

I monitored HDD hotplugging activity with dmesg -w but nothing happens when SATA disk connected/disconnected. I am totally lost.
 
Last edited:
I found solution. SATA Hot Plug indeed works but something more needs to be done on Proxmox side. As user1797 explains in How do I make Linux recognize a new SATA /dev/sda drive I hot swapped in without rebooting?, I needed to input echo "- - -" > /sys/class/scsi_host/host<n>/scan.

It was kind of weird that I had to go through from host0 to host9 in order to specify which host is connected to HDD hot-swap bay. I wonder if Proxmox team is working on this in order to make this more user-friendly.
 
It was kind of weird that I had to go through from host0 to host9 in order to specify which host is connected to HDD hot-swap bay. I wonder if Proxmox team is working on this in order to make this more user-friendly.
There is program that does this: rescan-scsi-bus.sh from scsitools and the rescanning is only necessary, if you do not support hotplugging in hardware. Most of my enterprise machines does rescanning automatically after plugging in a disk. The enclose, which also shows up on the scsi bus, is signalling that there is "something new", so that the OS is already aware of the hotplug.
 
There is program that does this: rescan-scsi-bus.sh from scsitools and the rescanning is only necessary, if you do not support hotplugging in hardware.
Do you mean Proxmox supposed to auto-detect HDD hot-plugging as long as my hardware supports it? If so, it is kind of confusing since I was told that my hardware supports HDD hot-plugging. Or maybe because my hardware isn’t enterprise level..
 
Do you mean Proxmox supposed to auto-detect HDD hot-plugging as long as my hardware supports it?
Yes, more precisely the Linux kernel does that, PVE is not involved in this. It also works in VMs. Just add a disk or resize an existing one and it'll immediately recognizes it.

If so, it is kind of confusing since I was told that my hardware supports HDD hot-plugging.
Your disk enclosure might support it, yet sata controllers often don't - at least in my experience. It's not an OS thing, on windows, you'll have the same problems and need to rescan, yet there is a button for that in the disk management. There is just hardware that does it and others does not.
 
There is program that does this: rescan-scsi-bus.sh from scsitools and the rescanning is only necessary,
Is scsitools a command that can be used in Proxmox shell? I tried it but console says the command couldn't be found.

Just to make things clear and out of curiosity, does enterprise-level disk enclosure have some kind of controller inside it?

As for mine, I contacted the manufacturer and heard that disk enclosure(HDD hot swap bay) I bought does not have any kind of controller and is only translating mainboard's SATA ports to 5.25 inch bay. If enterprise-level disk enclosure has its dedicated SATA controller and doesn't use mainboards internal controller, it makes sense that enterprise-level one provides automatic rescanning.

Edit:
The enclose, which also shows up on the scsi bus, is signalling that there is "something new", so that the OS is already aware of the hotplug.
Forgot to mention that my disk enclosure(HDD hot swap bay) doesn't show up on the scsi bus. I am not sure but it conforms to the fact that my disk enclousre doesn't have controller inside it.
 
Last edited:
Is scsitools a command that can be used in Proxmox shell? I tried it but console says the command couldn't be found.
That's the name of the package you need to install with apt install scsitools.


Just to make things clear and out of curiosity, does enterprise-level disk enclosure have some kind of controller inside it?
Depending on the hardware, there may be a multiplexer in it that has its own SCSI id.


As for mine, I contacted the manufacturer and heard that disk enclosure(HDD hot swap bay) I bought does not have any kind of controller and is only translating mainboard's SATA ports to 5.25 inch bay. If enterprise-level disk enclosure has its dedicated SATA controller and doesn't use mainboards internal controller, it makes sense that enterprise-level one provides automatic rescanning.
Enterprise hardware does normally not have SATA, they have SAS, that is backwards compatible with SATA. Some have a couple of ports for things liks DVD roms, they do not support SAS, only SATA.

Have you checked if there is some hotplug logic in your BIOS? Some have it, others don't.

Forgot to mention that my disk enclosure(HDD hot swap bay) doesn't show up on the scsi bus. I am not sure but it conforms to the fact that my disk enclousre doesn't have controller inside it.
That is normal, it has no logic.

As far as I know, hot-pluggable for single disks only defines the pyhsical aspect of hot plugging. There is also hot-plug support for the SATA controller that means, that it can detect the disk after a scan and there is hot-plugging with "insert / remove signaling", which is present in most enterprise hardware.
 
Have you checked if there is some hotplug logic in your BIOS? Some have it, others don't.
Yes, my mainboard's BIOS have hot-plug feature and I enabled it. I actually mentioned it on my first post. This is why it confuses me that my Proxmox system doesn't automatically detect HDD hot-plug.

Fortunately, I have either rescan-scsi-bus.sh or echo "- - -" > /sys/class/scsi_host/host<n>/scan to make it detect HDD hot-plug. I'll just live with it.

Thank you LnxBil for dedicating your time and effort on helping me!
 

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!