On Tue, Dec 1, 2020 at 1:07 PM Samuel Sieb <sam...@sieb.net> wrote:
>
> On 12/1/20 8:42 AM, Patrick O'Callaghan wrote:
> > On Tue, 2020-12-01 at 09:01 -0700, Chris Murphy wrote:
> >> On Tue, Dec 1, 2020 at 6:59 AM Tom Horsley <horsley1...@gmail.com> wrote:
> >>>
> >>> On Tue, 1 Dec 2020 14:52:21 +0100
> >>> Roberto Ragusa wrote:
> >>>
> >>>> How do you power them down?
> >>>
> >>> I don't know about the original poster, but my "noauto" disks
> >>> timeout and power down all by themselves, then even when they aren't
> >>> mounted at all, every time I reboot, the reboot hangs while it
> >>> spins up the disks for some reason. I constantly wish I could make
> >>> it stop doing that.
> >>
> >> Enumeration. I'm not sure if it's udev scanning everything, or the
> >> kernel or both. And also maybe libblkid, to know what everything is.
> >> The only way it can know what it is, it needs to be spun up to read
> >> the partition map and all the signatures on each partition.
> >
> > Obviously it needs to spin up if it needs to know these things. My
> > point is that it doesn't need to know them until I tell it.
>
> But it can't know that it shouldn't until it knows what's there. :-)
> The kernel scanning the USB bus will trigger the dock to check the
> drives which will spin them up.  Even if the dock didn't, the kernel
> would still check the drives, so they would still be started.

Yep. For sure the kernel is what's responsible for reading the
partition table. And that alone would cause a spin up. e.g.

[    6.426044]  sdb: sdb1 sdb2

Only later does udev come in with "aha! a partition! let's scan it!"
and then I see things like:

[    6.506645] BTRFS: device label fedoraroot devid 2 transid 398800
/dev/sdb2 scanned by systemd-udevd (326)

And there is an interaction with libblkid in the kernel to determine
that this partition contains a Btrfs signature, what the label is,
what the fs UUID is. And it's udev along with that information from
libblkid that creates the disk by label, disk by uuid, disk by
partuuid, disk by whatever.

The parameter to use to get detailed udev reporting dumped into the
journal is udev.log_priority=debug and then you can see what does
what, and in what order.

-- 
Chris Murphy
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
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@lists.fedoraproject.org

Reply via email to