I want to thank you from here for the tour of the usb utils,
appreciated..
-- Daniele Bonini
Crystal Kolipe <kolip...@exoticsilicon.com> wrote:
> On Thu, Feb 09, 2023 at 11:02:14AM -0500, Bryan Steele wrote:
> > 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:
>
> Eject is slightly different.
>
> When you use eject against an sd device, it's basically setting a
> flag that says, 'once any outstanding I/O is finished on this device,
> then mark it offline', (I.E. no media present).
>
> So if you have running, for example:
>
> # dd if=/dev/rsd1c of=/dev/null bs=1m count=256 &
>
> and then do an eject from a different terminal, it should let the dd
> process complete, and then off-line the device.