scsictl(8) 'detach' equiv in camcontrol(8) ?

Brian A. Seklecki lavalamp at
Thu Feb 22 16:02:11 UTC 2007

NBSD provides a safe way to detach the kernel data structures of a disk, 
'scsictl detach [target] [lun]'

>From scsictl(8) man page:

"Commands pertaining to scsi busses:
         scan target lun
         detach target lun
    Use `any' or `all' to wildcard target or lun"

We seem to be missing this feature.  "Stop" is just going to cause the 
disk to spin down.  So what is the equiviliant recommended procedure on 

Current thinking:
- Umount the FS;
- Remove it from any geom(4) devices
- Physically pull the drive
- Rescan the bus w/ camcontrol and let it discover that the disk is no
   longer there
- Insert the new drive
- Rescan the bus and let it discover the new drive

Presumably instead of rescanning the whole bus, you could scan a specific 



 	-lava (Brian A. Seklecki - Pittsburgh, PA, USA)

More information about the freebsd-questions mailing list