[bug #46791] wishlist: no option to find devices for major/minor

Andreas Metzler <[email protected]>
Newsgroups gmane.comp.gnu.findutils.bugs
Message-ID <[email protected]>
Follow-up Comment #3, bug #46791 (group findutils):

Quoting Chris Dunlop on https://bugs.debian.org/397434

Just to add a voice...

My use case is to search for all the alternate paths to a specific device.

I was quite surprised to discover that find doesn't support searching by
major:minor, to the naive eye it looks like something that fits directly into
the existing options that search on the stat structure.

I can of course use multiple tools (e.g. find + awk) to do what I need
but it would be nice if "find" were able to do this directly.

tl;dr...

Whilst a ATA security erase is in progress on a device (e.g. hdparm
--security-erase), all other open()s of the device go into an unkillable
sleep
(wchan:blkdev) until the security erase completes - this can take many
minutes
to >24 hours (e.g. 20T HDD).

This means anything that performs device scans will go into an unkillable
sleep for the duration, e.g. various utilities from LVM2 like "pvs" and
"lvs".
I have regular operations that require such scans and blocking for an hour,
let alone 24 hours, is problematic.

LVM2 scans /dev, /sys/dev/block and /sys/block for all block devices and
tries
to open them, subject to a configurable "device filter" that can filter
devices by filesystem path name.

So I need to find all the paths to a specific major:minor to reject those
paths using the LVM2 device filter.

An alternate "coding required" solution would be for LVM2 to utilise
major:minor in it's device filter. This in fact would be the best solution to
this specific problem (other than secure erase not blocking) and I'll see if
it's possible to have this added to LVM2.



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?46791>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCZ2pJQAAKCRCqLAuaBUf3
TkixAQDcnmFJTp1VgU/5cFkGPWt72mc9dypVyVOPAt4cNGIa5gEAtpIsubxQxW9x
OTm+Mrb3wnfWhEkNf7PEJNrmWNQz9wc=
=Q1fj
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.