Re: USB "insertion" for permanently-connected devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 the message from mdadm. The RAID array has /dev/sdd and /dev/sde,
> > > > > but, again, RAID has already been stopped before running udisksctl.)
> > > > 
> > > > I really have my doubts about that.  Something definitely still has the
> > > > drives open at this point.  How did you stop it?
> > > 
> > > echo 1 > /sys/block/sdd/device/delete
> > > echo 1 > /sys/block/sde/device/delete
> > 
> > I meant how did you stop the RAID array before doing that?  And how did 
> > you verify that it really was stopped?
> 
> See the attached script. The RAID is stopped using mdadm and verified
> by checking /proc/mdstat. However on checking the logs I see that in
> fact the wait loop is not terminating when I call the script from
> crond. It does terminate when called directly from the command line.
> 
> I've modified the script to log the output of the mdadm command and
> will see what it says after the next crond run.
> 
> Note that the RAID is stopped only after a successful unmount of the
> filesystem, so it's very odd if something is still accessing it.

And that's the problem. After logging what was actually happening, it
turns out that mdadm is in /usr/sbin and simply wasn't executing
because that's not part of the $PATH when running from crond.

Facepalm.

I've changed the script to use the explicit path and hopefully that
will sort out the error messages. Note that it does run correctly when
starting the RAID, because that happens automatically when the dock is
fired up.

The auto-insertion question is still outstanding but I'm less concerned
about it since the kludgy version appears to work. I'll keep looking at
it all the same.

Thanks for your help.

poc
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux