Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Dec 2025 15:36:11 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        Martin <iio7@protonmail.com>
Cc:        "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>
Subject:   Re: Prevent spin-up of USB HD after upgrading to FreeBSD 15
Message-ID:  <CANCZdfp7WSETfqxq=bc9fqrFFncYcRgzeJ%2BnyX3xZoOo-xPiAQ@mail.gmail.com>
In-Reply-To: <t565nv2ZOb8O-k2pel6bLS_AsjvqgIA6Io6cGvbkWjcPbC_miDkRrqzEWflTpN5hvINq7vwhuZ6y8avls__jRm464UoxN944kTpB-8yXXQc=@protonmail.com>
References:  <j7XoSQMU-9G-lOiNcAsrUE4FmIzX26V971Z5fLI7RtfIyvm_6PoXbSksem-pXoMZNy9CchKhGl7C2T9xkQAlL84Y89Y5byUOkOuIwSnBtlY=@protonmail.com> <CANCZdfooL8vCCKbm0txCb%2BTDffGhxc1fDD4SwVLM08tDZPz=GA@mail.gmail.com> <t565nv2ZOb8O-k2pel6bLS_AsjvqgIA6Io6cGvbkWjcPbC_miDkRrqzEWflTpN5hvINq7vwhuZ6y8avls__jRm464UoxN944kTpB-8yXXQc=@protonmail.com>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
On Wed, Dec 17, 2025 at 3:29 PM Martin <iio7@protonmail.com> wrote:

> On Wednesday, December 17th, 2025 at 6:29 AM, Warner Losh <imp@bsdimp.com>
> wrote:
>
> > On Tue, Dec 16, 2025, 10:17 PM Martin <iio7@protonmail.com> wrote:
> >
> > > I posted this in "questions", but think this might be the more correct
> > > place.
> > >
> > > I have an external Toshiba USB drive that automatically spins down
> > > after about 1 minute of idle. After upgrading to FreeBSD 15, the drive
> > > keeps spinning up again about every 5 minutes even though it is not
> > > being used and isn't mounted. This didn't happen in FreeBSD 14.3.
> > >
> > > The drive is running ZFS.
> > >
> > > I have monitored both /var/log/messages and daemon.log using tail to
> > > see if anything happens, but nothing goes on in those logs when it
> > > happens.
> > >
> > > If I export the drive rather than just unmount then it doesn't happen.
> > > So I am guessing that it's something ZFS specific/related perhaps.
> > >
> > > I have also tested the same drive on the same machine using Artix Linux
> > > and the drive stays spinned down, even when fully mounted using ZFS.
> > >
> > > I have used "top -s 0.1" in order to see if I can get a glimpse at
> > > something which might run on FreeBSD, but nothing is started.
> > >
> > > What has changed from 14.3 to 15 that might cause this annoying
> > > behavior? How do I track down what's spinning up my drive?
> >
> >
> > I have a dtrace thing that can find all the commands being sent.
> >
> > But before i go to the hassle.. what happens if you set
> kern.cam.da.poll_period=0?
>
> It's the same, nothing changes.
>

OK. So it's not the media polling code. I'll see if my camio code is in
shape to
share. What's your level of comfort using experimental code you might have
to
tinker with a little bit?

Warner

[-- Attachment #2 --]
<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Wed, Dec 17, 2025 at 3:29 PM Martin &lt;<a href="mailto:iio7@protonmail.com">iio7@protonmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wednesday, December 17th, 2025 at 6:29 AM, Warner Losh &lt;<a href="mailto:imp@bsdimp.com" target="_blank">imp@bsdimp.com</a>&gt; wrote:<br>
<br>
&gt; On Tue, Dec 16, 2025, 10:17 PM Martin &lt;<a href="mailto:iio7@protonmail.com" target="_blank">iio7@protonmail.com</a>&gt; wrote:<br>
&gt; <br>
&gt; &gt; I posted this in &quot;questions&quot;, but think this might be the more correct<br>
&gt; &gt; place.<br>
&gt; &gt; <br>
&gt; &gt; I have an external Toshiba USB drive that automatically spins down<br>
&gt; &gt; after about 1 minute of idle. After upgrading to FreeBSD 15, the drive<br>
&gt; &gt; keeps spinning up again about every 5 minutes even though it is not<br>
&gt; &gt; being used and isn&#39;t mounted. This didn&#39;t happen in FreeBSD 14.3.<br>
&gt; &gt; <br>
&gt; &gt; The drive is running ZFS.<br>
&gt; &gt; <br>
&gt; &gt; I have monitored both /var/log/messages and daemon.log using tail to<br>
&gt; &gt; see if anything happens, but nothing goes on in those logs when it<br>
&gt; &gt; happens.<br>
&gt; &gt; <br>
&gt; &gt; If I export the drive rather than just unmount then it doesn&#39;t happen.<br>
&gt; &gt; So I am guessing that it&#39;s something ZFS specific/related perhaps.<br>
&gt; &gt; <br>
&gt; &gt; I have also tested the same drive on the same machine using Artix Linux<br>
&gt; &gt; and the drive stays spinned down, even when fully mounted using ZFS.<br>
&gt; &gt; <br>
&gt; &gt; I have used &quot;top -s 0.1&quot; in order to see if I can get a glimpse at<br>
&gt; &gt; something which might run on FreeBSD, but nothing is started.<br>
&gt; &gt; <br>
&gt; &gt; What has changed from 14.3 to 15 that might cause this annoying<br>
&gt; &gt; behavior? How do I track down what&#39;s spinning up my drive?<br>
&gt; <br>
&gt; <br>
&gt; I have a dtrace thing that can find all the commands being sent.<br>
&gt; <br>
&gt; But before i go to the hassle.. what happens if you set kern.cam.da.poll_period=0?<br>
<br>
It&#39;s the same, nothing changes.<br></blockquote><div><br></div><div>OK. So it&#39;s not the media polling code. I&#39;ll see if my camio code is in shape to</div><div>share. What&#39;s your level of comfort using experimental code you might have to</div><div>tinker with a little bit?</div><div><br></div><div>Warner </div></div></div>
help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfp7WSETfqxq=bc9fqrFFncYcRgzeJ%2BnyX3xZoOo-xPiAQ>