2

Can you help me understand, why my SATA hotplug doesn't work? When I plug sata disk, lsblk doesn't change. There is only my system disk /dev/sda.

I have linux:

$ uname -a

Linux Z170-D3H 4.9.0-3-amd64 #1 SMP Debian 4.9.25-1 (2017-05-02) x86_64 GNU/Linux

Kernel settings:

$ cat /boot/config-4.9.0-3-amd64 | grep HOTPLUG

CONFIG_MEMORY_HOTPLUG=y
CONFIG_MEMORY_HOTPLUG_SPARSE=y
# CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE is not set
CONFIG_HOTPLUG_CPU=y
# CONFIG_BOOTPARAM_HOTPLUG_CPU0 is not set
# CONFIG_DEBUG_HOTPLUG_CPU0 is not set
CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
CONFIG_ACPI_HOTPLUG_CPU=y
CONFIG_ACPI_HOTPLUG_MEMORY=y
CONFIG_ACPI_HOTPLUG_IOAPIC=y
CONFIG_HOTPLUG_PCI_PCIE=y
CONFIG_HOTPLUG_PCI=y
CONFIG_HOTPLUG_PCI_ACPI=y
CONFIG_HOTPLUG_PCI_ACPI_IBM=m
CONFIG_HOTPLUG_PCI_CPCI=y
CONFIG_HOTPLUG_PCI_CPCI_ZT5550=m
CONFIG_HOTPLUG_PCI_CPCI_GENERIC=m
CONFIG_HOTPLUG_PCI_SHPC=m
CONFIG_XEN_BALLOON_MEMORY_HOTPLUG=y
CONFIG_XEN_BALLOON_MEMORY_HOTPLUG_LIMIT=512
# CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set

$ cat /boot/config-4.9.0-3-amd64 | grep SATA

CONFIG_SATA_ZPODD=y
CONFIG_SATA_PMP=y
CONFIG_SATA_AHCI=m
# CONFIG_SATA_AHCI_PLATFORM is not set
# CONFIG_SATA_INIC162X is not set
CONFIG_SATA_ACARD_AHCI=m
CONFIG_SATA_SIL24=m
CONFIG_SATA_QSTOR=m
CONFIG_SATA_SX4=m
# SATA SFF controllers with BMDMA
# CONFIG_SATA_DWC is not set
CONFIG_SATA_MV=m
CONFIG_SATA_NV=m
CONFIG_SATA_PROMISE=m
CONFIG_SATA_SIL=m
CONFIG_SATA_SIS=m
CONFIG_SATA_SVW=m
CONFIG_SATA_ULI=m
CONFIG_SATA_VIA=m
CONFIG_SATA_VITESSE=m

$ cat /boot/config-4.9.0-3-amd64 | grep AHCI

CONFIG_SATA_AHCI=m
# CONFIG_SATA_AHCI_PLATFORM is not set
CONFIG_SATA_ACARD_AHCI=m

SATA controller:

$ lspci | grep SATA

00:17.0 SATA controller: Intel Corporation Sunrise Point-H SATA controller [AHCI mode] (rev 31)
2
  • Why should lsmod change? The system doesn't load new modules if you hotplug. Use udevadm to see if you get the hotplug events.
    – dirkt
    Jun 3, 2017 at 13:47
  • @dirkt Thank you and sorry, I meant lsblk. Fixed. udevadm shows only USB events. When I connect SATA, nothing happens.
    – BlueManCZ
    Jun 3, 2017 at 20:34

1 Answer 1

6

Problem was in wrong BIOS configuration.

Solution (for my motherboard Z170-D3H) is go to BIOS > Peripherals > SATA Configuration and here enable Hot Plug option for each SATA port. Then save settings and restart computer.

Now everything works properly!

2
  • On my system (ASUS CM6850) you would have to change the SATA mode to AHCI or RAID in order to enable/disable 'Hot plug' mode for each drive. (if it is set to IDE mode, those options will not be available).
    – NeoH4x0r
    Mar 29, 2021 at 4:14
  • Also switching from IDE to AHCI/RAID mode will make your drive unable to boot (you will have to re-create the drive's partition, etc)
    – NeoH4x0r
    Mar 29, 2021 at 4:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.