On Wed, Feb 08, 2023 at 10:34:07AM -0300, vitmau...@gmail.com wrote:
> Hi,
> 
> I'm not using my drives for anything more than copying files, dd etc.
> I just got curious because you mentioned the act of detaching a device
> after umounting it and I don't know how to do that on OpenBSD. On
> Fedora I would issue "udisks --detach /dev/sdX" (older versions) or
> "udisksctl poweroff -b /dev/sdX" (newer versions).
> 
> Best,
> Vitor

Umounting should be good enough, but you can also use eject(1), which
should have the desired effect, e.g:

# disklabel sd1
# /dev/rsd1c:
type: SCSI
disk: SCSI disk
label: Flash Disk
...
# eject /dev/rsd1c
# disklabel sd1
disklabel: DIOCGDINFO: Input/output error
#

You'll need to physically reconnect the drive if you want to use it again.

-Bryan.

Reply via email to