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