Re: Identifying what is accessing a USB device.

2021-04-06 Thread Patrick O'Callaghan
On Fri, 2021-03-26 at 21:46 -0600, Chris Murphy wrote: > On Fri, Mar 26, 2021 at 5:21 PM Patrick O'Callaghan > wrote: > > > > I have an external USB-3 2-disk docking station, and a script which > > can > > power up and down the drives as needed. > > > > I have a systemd automount unit that corre

Re: Identifying what is accessing a USB device.

2021-03-28 Thread Patrick O'Callaghan
On Sun, 2021-03-28 at 07:46 +0800, Ed Greshko wrote: > On 27/03/2021 20:18, Patrick O'Callaghan wrote: > > but > > it's a real kludge > > Previously you had said that getting all of this to work was a > "hobby".  Not nice to call > the output of your hobby a "kludge".  :-) :-) Much worse if it wa

Re: Identifying what is accessing a USB device.

2021-03-27 Thread Ed Greshko
On 27/03/2021 20:18, Patrick O'Callaghan wrote: but it's a real kludge Previously you had said that getting all of this to work was a "hobby".  Not nice to call the output of your hobby a "kludge".  :-) :-) But, you do have to admit that you're putting things together to do something that pr

Re: Identifying what is accessing a USB device.

2021-03-27 Thread Patrick O'Callaghan
On Sat, 2021-03-27 at 11:29 -0500, Roger Heflin wrote: > > > You probably should send the power down and wait a few seconds > > > before > > > starting the loop.    It would seem to be pretty likely that if > > > in > > > the > > > middle of the spin-down *ANY* command that is received causes it >

Re: Identifying what is accessing a USB device.

2021-03-27 Thread Roger Heflin
On Sat, Mar 27, 2021 at 9:35 AM Patrick O'Callaghan wrote: > > On Sat, 2021-03-27 at 07:59 -0500, Roger Heflin wrote: > > Wireshark won't help as it won't tell you what process is doing. And > > decoding the commands will be very difficult. > > Yes, that's what I thought. > > > You probably shoul

Re: Identifying what is accessing a USB device.

2021-03-27 Thread Patrick O'Callaghan
On Sat, 2021-03-27 at 07:59 -0500, Roger Heflin wrote: > Wireshark won't help as it won't tell you what process is doing.  And > decoding the commands will be very difficult. Yes, that's what I thought. > You probably should send the power down and wait a few seconds before > starting the loop.  

Re: Identifying what is accessing a USB device.

2021-03-27 Thread Roger Heflin
Wireshark won't help as it won't tell you what process is doing. And decoding the commands will be very difficult. You probably should send the power down and wait a few seconds before starting the loop.It would seem to be pretty likely that if in the middle of the spin-down *ANY* command tha

Re: Identifying what is accessing a USB device.

2021-03-27 Thread Patrick O'Callaghan
On Fri, 2021-03-26 at 21:46 -0600, Chris Murphy wrote: > On Fri, Mar 26, 2021 at 5:21 PM Patrick O'Callaghan > wrote: > > > > I have an external USB-3 2-disk docking station, and a script which > > can > > power up and down the drives as needed. > > > > I have a systemd automount unit that corre

Re: Identifying what is accessing a USB device.

2021-03-27 Thread Patrick O'Callaghan
On Fri, 2021-03-26 at 23:36 -0400, R. G. Newbury wrote: > > > Subject: Identifying what is accessing a USB device. > > > I have an external USB-3 2-disk docking station, and a script which > > can > > power up and down the drives as needed. > > > > I ha

Re: Identifying what is accessing a USB device.

2021-03-27 Thread Patrick O'Callaghan
On Sat, 2021-03-27 at 09:50 +0800, Ed Greshko wrote: > On 27/03/2021 07:20, Patrick O'Callaghan wrote: > > This never happens if I run the script directly from the command > > line > > (i.e. the drives power down and stay down). > > > > Clearly the docking unit isn't just doing this flakily on its

Re: Identifying what is accessing a USB device.

2021-03-26 Thread Chris Murphy
On Fri, Mar 26, 2021 at 5:21 PM Patrick O'Callaghan wrote: > > I have an external USB-3 2-disk docking station, and a script which can > power up and down the drives as needed. > > I have a systemd automount unit that correctly powers up the dock when > accessed, then mounts the drives (thanks Ed)

Re: Identifying what is accessing a USB device.

2021-03-26 Thread R. G. Newbury
Subject: Identifying what is accessing a USB device. I have an external USB-3 2-disk docking station, and a script which can power up and down the drives as needed. I have a systemd automount unit that correctly powers up the dock when accessed, then mounts the drives (thanks Ed). After an

Re: Identifying what is accessing a USB device.

2021-03-26 Thread Ed Greshko
On 27/03/2021 07:20, Patrick O'Callaghan wrote: This never happens if I run the script directly from the command line (i.e. the drives power down and stay down). Clearly the docking unit isn't just doing this flakily on its own. Something is making it happen, and I've no idea how to discover wha

Identifying what is accessing a USB device.

2021-03-26 Thread Patrick O'Callaghan
I have an external USB-3 2-disk docking station, and a script which can power up and down the drives as needed. I have a systemd automount unit that correctly powers up the dock when accessed, then mounts the drives (thanks Ed). After an idle time, automount unmounts the drives. A script detects