On Sat, 2020-06-27 at 16:55 +0200, Markus Schönhaber wrote:
27.06.20, 14:55 CEST, Patrick O'Callaghan:
> On Sat, 2020-06-27 at 14:15 +0200, Markus Schönhaber wrote:
> > 26.06.20, 22:33 CEST, Patrick O'Callaghan:
> >
> > > This works too, but unfortunately also removes the /sys/block/sdd
> > > files, meaning I can't turn the thing on again. However, if I
> > > physically switch it on and off, it reappears, IOW it causes a USB
> > > "insertion" event.
> > >
> > > Is there a way to cause an insertion event without physically doing
> > > anything to the dock?
> >
> > eject -t /dev/sdd
> >
> > might be worth a try. At least this (device node adapted, of course)
> > works for me with USB thumb drives which I "safely removed" using
the
> > GUI. If the udiskctl command you use internally does something similar
> > to the GUI function, eject -t might also work for you.
>
> The problem is that the device node (/dev/sdd) is removed by the
> udisksctl power-off command, so this doesn't work.
Did you try it?
Doing "safely remove" (for example in Dolphin) also removes the
corresponding device node.
eject -t <the device node not present any more>
for me, removes the necessity to pull an re-insert the thumb drive to
re-create the device node and to be able to access it again. That's the
whole point in issuing eject -t.
'eject -t' does not signal the dock to spin down the drives. Only by
using the power-down option to udisksctl, or by the kludgy method of
writing '1' to the sys/.../delete file does this happen. The latter
does allow me to power them up again, so I guess I'll be sticking with
that.
poc