← 전체로 돌아가기
공통 메모 storage

SATA 핫플러그: 리부팅이 답

새 SATA 디스크 안 보이면 일단 리부팅이 국룰.

linuxstoragesatahardwaretroubleshooting

새 HDD 핫플러그. lsblk에 안 뜸. SCSI rescan 해봤지만 헛수고.

echo "- - -" > /sys/class/scsi_host/host*/scan

결국 리부팅하니 sda, sdc로 잘 뜸.

왜 이랬나? SATA 핫플러그는 AHCI 기능. 근데 대부분 메인보드 BIOS에서 "Hot Plug: Disabled"로 기본 설정됨. 이러면 컨트롤러가 새 디스크 연결돼도 링크 변화 인터럽트 안 띄움. 리눅스는 아무 이벤트도 못 받음. SCSI rescan은 이미 아는 버스만 다시 쿼리하는 거라, 컨트롤러가 아예 보고 안 한 기기는 못 찾음. wtf.

다음엔 이렇게: "디스크 꽂았는데 안 보여요" 문의 오면: - ls /dev/sd*, lsblk 먼저 확인. - SCSI rescan 한번 시도. 빠르고 안전함. bash echo "- - -" > /sys/class/scsi_host/host*/scan - rescan 실패하면 lspci | grep -i sata, ls /sys/class/scsi_host/로 컨트롤러 확인. - 이 머신은 ata2/ata4만 진짜, ata1/ata3는 DUMMY임. - rescan 디버깅에 시간 낭비 금지. - 리부팅 추천하거나 BIOS에서 핫플러그 켜라고 안내. 리부팅이 젤 확실함.

여기서 배울 것

  1. SATA 핫플러그는 BIOS 설정에 따라 안 될 수 있음.
  2. SCSI rescan은 이미 인식된 버스만 재탐색함.
  3. 새 디스크 안 보이면 리부팅이 가장 확실한 해결책.
  4. BIOS에서 SATA 핫플러그 활성화 여부 확인 필요.
원본 파일 보기 (.claude/memory/sata_hotplug_needs_reboot.md)
---
name: SATA hot-plug often needs reboot on this machine
description: When new SATA disks don't appear via SCSI rescan, reboot is usually required because BIOS hot-plug is disabled by default
date: 2026-04-18
tags: [linux, storage, sata, hardware]
---

## What happened
User hot-plugged two new HDDs into the AMD FCH SATA controller. `lsblk` did not show them. Rescanning all SCSI hosts (`echo "- - -" > /sys/class/scsi_host/host*/scan`) did nothing. After a reboot the disks appeared as `sda` and `sdc`.

## Root cause
SATA hot-plug is an AHCI capability, but most consumer motherboards ship with "Hot Plug: Disabled" per port in BIOS. Without it, the controller never raises a link-change interrupt for a newly attached disk, so Linux has no event to enumerate. SCSI rescan only re-queries already-known buses — it cannot conjure a device the controller never reported.

## Next time
If a user reports "I plugged in a disk but it's not showing":
1. Check `ls /dev/sd*` and `lsblk` first.
2. Try SCSI rescan once — fast, harmless.
3. If rescan fails, check `lspci | grep -i sata` and `ls /sys/class/scsi_host/` to confirm controller capacity. On this machine only ata2/ata4 are real (ata1/ata3 are DUMMY).
4. Don't spend long on rescan debugging — recommend reboot and/or BIOS hot-plug enable. Reboot is the reliable path.