Re: USB "insertion" for permanently-connected devices

2020-06-29 Thread Patrick O'Callaghan
On Sun, 2020-06-28 at 12:27 +0100, Patrick O'Callaghan wrote: > On Sat, 2020-06-27 at 16:45 -0700, Samuel Sieb wrote: > > On 6/27/20 2:29 PM, Patrick O'Callaghan wrote: > > > On Sat, 2020-06-27 at 12:07 -0700, Samuel Sieb wrote: > > > > On 6/27/20 3:43 AM, Patrick O'Callaghan wrote: > > > > > (Note

Re: USB "insertion" for permanently-connected devices

2020-06-28 Thread Patrick O'Callaghan
On Sat, 2020-06-27 at 16:45 -0700, Samuel Sieb wrote: > On 6/27/20 2:29 PM, Patrick O'Callaghan wrote: > > On Sat, 2020-06-27 at 12:07 -0700, Samuel Sieb wrote: > > > On 6/27/20 3:43 AM, Patrick O'Callaghan wrote: > > > > (Note the message from mdadm. The RAID array has /dev/sdd and /dev/sde, > > >

Re: USB "insertion" for permanently-connected devices

2020-06-28 Thread Markus Schönhaber
Am 28.06.20 um 01:50 schrieb Samuel Sieb: > On 6/27/20 7:55 AM, Markus Schönhaber wrote: >> Doing "safely remove" (for example in Dolphin) also removes the >> corresponding device node. >> eject -t >> for me, removes the necessity to pull an re-insert the thumb drive to >> re-create the device n

Re: USB "insertion" for permanently-connected devices

2020-06-27 Thread Samuel Sieb
On 6/27/20 7:55 AM, Markus Schönhaber wrote: Doing "safely remove" (for example in Dolphin) also removes the corresponding device node. eject -t 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 poi

Re: USB "insertion" for permanently-connected devices

2020-06-27 Thread Samuel Sieb
On 6/27/20 2:29 PM, Patrick O'Callaghan wrote: On Sat, 2020-06-27 at 12:07 -0700, Samuel Sieb wrote: On 6/27/20 3:43 AM, Patrick O'Callaghan wrote: (Note the message from mdadm. The RAID array has /dev/sdd and /dev/sde, but, again, RAID has already been stopped before running udisksctl.) I re

Re: USB "insertion" for permanently-connected devices

2020-06-27 Thread Markus Schönhaber
27.06.20, 20:00 CEST, Patrick O'Callaghan: > 'eject -t' does not signal the dock to spin down the drives. No, it doesn't - and I never said it did. On the contrary: as I have tried to explain to you twice, it might help to re-create the removed device node of an already spun down disk and make it

Re: USB "insertion" for permanently-connected devices

2020-06-27 Thread Patrick O'Callaghan
On Sat, 2020-06-27 at 12:07 -0700, Samuel Sieb wrote: > On 6/27/20 3:43 AM, Patrick O'Callaghan wrote: > > On Fri, 2020-06-26 at 16:00 -0700, Samuel Sieb wrote: > > > I messed around > > > enough that I confused that USB controller and that entire bus was dead. > > >Fortunately, I managed to re

Re: USB "insertion" for permanently-connected devices

2020-06-27 Thread Samuel Sieb
On 6/27/20 3:43 AM, Patrick O'Callaghan wrote: On Fri, 2020-06-26 at 16:00 -0700, Samuel Sieb wrote: I messed around enough that I confused that USB controller and that entire bus was dead. Fortunately, I managed to reset the controller and got it back by telling the driver to remove it and t

Re: USB "insertion" for permanently-connected devices

2020-06-27 Thread Patrick O'Callaghan
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/s

Re: USB "insertion" for permanently-connected devices

2020-06-27 Thread Markus Schönhaber
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 >>> phys

Re: USB "insertion" for permanently-connected devices

2020-06-27 Thread 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: > > > In other threads I've mentioned I have a USB-powered external SATA > > dock, which I'm using mainly as a backup device. Currently, I have a > > script to power it down by doing this sort

Re: USB "insertion" for permanently-connected devices

2020-06-27 Thread Markus Schönhaber
26.06.20, 22:33 CEST, Patrick O'Callaghan: > In other threads I've mentioned I have a USB-powered external SATA > dock, which I'm using mainly as a backup device. Currently, I have a > script to power it down by doing this sort of thing: > >echo 1 > /sys/block/sdd/device/delete > > I can the

Re: USB "insertion" for permanently-connected devices

2020-06-27 Thread Patrick O'Callaghan
On Sat, 2020-06-27 at 13:46 +0930, Tim via users wrote: > Tim: > > > There are USB hubs with power switches on each port. > > > Ed Greshko: > > I think he really wants to do these things without manual > > intervention. :-) > > Well it avoids having to unplug and replug. ;-) As I said earli

Re: USB "insertion" for permanently-connected devices

2020-06-27 Thread Patrick O'Callaghan
On Sat, 2020-06-27 at 07:56 +0800, Ed Greshko wrote: > On 2020-06-27 07:50, Tim via users wrote: > > On Fri, 2020-06-26 at 21:33 +0100, Patrick O'Callaghan wrote: > > > Is there a way to cause an insertion event without physically doing > > > anything to the dock? > > There are USB hubs with power

Re: USB "insertion" for permanently-connected devices

2020-06-27 Thread Patrick O'Callaghan
On Fri, 2020-06-26 at 16:00 -0700, Samuel Sieb wrote: > On 6/26/20 2:45 PM, Patrick O'Callaghan wrote: > > On Fri, 2020-06-26 at 13:56 -0700, Samuel Sieb wrote: > > > On 6/26/20 1:33 PM, Patrick O'Callaghan wrote: > > > > udisksctl power-off -b /dev/sdd > > > > > > > > This works too, but unfortun

Re: USB "insertion" for permanently-connected devices

2020-06-26 Thread Tim via users
Tim: >> There are USB hubs with power switches on each port. Ed Greshko: > I think he really wants to do these things without manual > intervention. :-) Well it avoids having to unplug and replug. ;-) -- uname -rsvp Linux 3.10.0-1127.13.1.el7.x86_64 #1 SMP Tue Jun 23 15:46:38 UTC 2020 x

Re: USB "insertion" for permanently-connected devices

2020-06-26 Thread Ed Greshko
On 2020-06-27 07:50, Tim via users wrote: > On Fri, 2020-06-26 at 21:33 +0100, Patrick O'Callaghan wrote: >> Is there a way to cause an insertion event without physically doing >> anything to the dock? > There are USB hubs with power switches on each port. > I think he really wants to do these t

Re: USB "insertion" for permanently-connected devices

2020-06-26 Thread Tim via users
On Fri, 2020-06-26 at 21:33 +0100, Patrick O'Callaghan wrote: > Is there a way to cause an insertion event without physically doing > anything to the dock? There are USB hubs with power switches on each port. -- uname -rsvp Linux 3.10.0-1127.13.1.el7.x86_64 #1 SMP Tue Jun 23 15:46:38 UTC 2020

Re: USB "insertion" for permanently-connected devices

2020-06-26 Thread Samuel Sieb
On 6/26/20 2:45 PM, Patrick O'Callaghan wrote: On Fri, 2020-06-26 at 13:56 -0700, Samuel Sieb wrote: On 6/26/20 1:33 PM, Patrick O'Callaghan wrote: udisksctl power-off -b /dev/sdd This works too, but unfortunately also removes the /sys/block/sdd files, meaning I can't turn the thing on again.

Re: USB "insertion" for permanently-connected devices

2020-06-26 Thread Patrick O'Callaghan
On Fri, 2020-06-26 at 16:06 -0500, Roger Heflin wrote: > [root@roger2016-laptop ~]# lspci | grep -i usb > > 00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 > > xHCI Controller (rev 21) > > [root@roger2016-laptop ~]# ls -l /sys/devices/pci:00/:00:14.0/rescan > > --w---

Re: USB "insertion" for permanently-connected devices

2020-06-26 Thread Patrick O'Callaghan
On Fri, 2020-06-26 at 13:56 -0700, Samuel Sieb wrote: > On 6/26/20 1:33 PM, Patrick O'Callaghan wrote: > > udisksctl power-off -b /dev/sdd > > > > 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 swit

Re: USB "insertion" for permanently-connected devices

2020-06-26 Thread Roger Heflin
[root@roger2016-laptop ~]# lspci | grep -i usb 00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21) [root@roger2016-laptop ~]# ls -l /sys/devices/pci:00/:00:14.0/rescan --w---. 1 root root 4096 Jun 26 16:03 /sys/devices/pci:00/:00:14.0/resc

Re: USB "insertion" for permanently-connected devices

2020-06-26 Thread Roger Heflin
I show a "rescan" device on my pci device that has the usb port. Rescanning might find it. On Fri, Jun 26, 2020 at 3:57 PM Samuel Sieb wrote: > > On 6/26/20 1:33 PM, Patrick O'Callaghan wrote: > > udisksctl power-off -b /dev/sdd > > > > This works too, but unfortunately also removes the /sys/bloc

Re: USB "insertion" for permanently-connected devices

2020-06-26 Thread Samuel Sieb
On 6/26/20 1:33 PM, Patrick O'Callaghan wrote: udisksctl power-off -b /dev/sdd 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. I

USB "insertion" for permanently-connected devices

2020-06-26 Thread Patrick O'Callaghan
In other threads I've mentioned I have a USB-powered external SATA dock, which I'm using mainly as a backup device. Currently, I have a script to power it down by doing this sort of thing: echo 1 > /sys/block/sdd/device/delete I can then turn it on again using: echo "- - -" > /sys/class/sc