우분투 데스크탑에서 핫스왑기능을 사용할 때 "마운트 해제"로만 해도 되는지 궁금해서 여기저기 찾아보고 질문도 올려보고 했지만 제대로 된 답변이 안달리더라.
결국 찾은 것이 아래 내용이다.

How to dynamically add/remove SCSI devices?

Extracted from Web submission (SCSI Programming HOWTO)
Tip provided by David Ranch
From the command-line, the commands are:

echo "scsi remove-single-device host channel ID LUN " > /proc/scsi/scsi
echo "scsi add-single-device host channel ID LUN " > /proc/scsi/scsi

[note of maintainer : WARNING, as it is written in /usr/src/linux/drivers/scsi/scsi.c :
* Consider this feature BETA.
* CAUTION: This is not for hotplugging your peripherals. As
* SCSI was not designed for this you could damage your
* hardware !
]
그러니까 해제할 때는 echo "scsi remove-single-device host channel ID LUN" > /proc/scsi/scsi 명령을 쓰고 붙일 때는 echo "scsi add-single-device host channel ID LUN" > /proc/scsi/scsi 하면 된다는 거다.
저 위에 host channel ID LUN은 df -l이나 cat /proc/scsi/scsi 하면 나온다.

Host: scsi5 Channel: 00 Id: 00 Lun: 00
  Vendor: ATA      Model: WDC WD10EADS-00P Rev: 01.0
  Type:   Direct-Access                    ANSI  SCSI revision: 05

예를 들어 위와 같이 나올 때 해제하는 방법은 echo "scsi remove-single-device 5 0 0 0" > /proc/scsi/scsi 하면 된다.

일단 해제는 되는데 재인식은 아직 테스트 해보지 못했다.
리부팅 해서 다시 해볼까나?

+ Recent posts