Date: Tue, 6 Jun 2023 19:15:09 -0000 (UTC) From: "Peter 'PMc' Much" <pmc@citylink.dinoex.sub.org> To: freebsd-stable@freebsd.org Subject: Re: Camcontrol question related to Seagate disks Message-ID: <slrnu7v1dt.8ud.pmc@disp.intra.daemon.contact> References: <220afa61-4508-5dbd-c870-e405aa23c895@denninger.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2023-06-06, Karl Denninger <karl@denninger.net> wrote: > Certain "newer" Seagate drives have an EPC profile that doesn't interact > as expected with the camcontrol "standard" way to tell spinning disks to > go into an idle state. > > Specifically those that support this: > https://www.seagate.com/files/docs/pdf/en-GB/whitepaper/tp608-powerchoice-tech-provides-gb.pdf "This" whole lengthy babble sounds just like EPC. > The usual has been "camcontrol idle da{x} -t 600" has typically resulted > in a 10 minute timeout, after which it goes into low power I entertain quite a zoo of disks of various brands and ages, and my impression is, about a third of them might behave as "typically" expected in that regard. And practically every model behaves different, some of them in an obscure and unexpected way. Sadly I don't have actual SAS devices available (and it doesn't get clear to me if Your's is SAS or SATA). With SATA You can send low-level commands to the disk via 'camcontrol cmd' - *IF* you manage to figure out what these commands should read. > (sometimes > you want "standby" rather than "idle" depending on the recovery time and > power mode you're after and the specifics of the drive in question.) And which one would You want? Short abstract of the crap: - deskstar/ultrastar older models may have a two-level timer variable with separate values for idle and stop. - WD (whatever rainbow) may have the timer value hidden behind a "vendor specific" gate, as described on truenas ("hacking green and red..."). - ultrastar (newer) may have EPC, but the timer values have only vague realtime resemblance. . seagate (consumer) may be configured to kill themselves with an incredible amount of almost immediate parkings. - ... I for my part got tired of the whole stuff, and there is a little tool in ports sysutils/gstopd, that can be easily expanded to handle SATA, and then the machine (and not the disk) will control when the disk is to stop. (ask me for patch) > The reason is that /it appears //these drives, on power-up, do not > enable the timers /until and unless you send a SSU "START" with the > correct power conditioning bits. Specifically, the power conditioning > value of "7h" has to be specified. If its not then the EPC timers are > present but, it appears, they are not used. If You can figure out how this command should actually look like byte-wise, you can probably send them. > Does anyone know the proper camcontrol command to do this? The "start" > command sent when the system spins up does not appear to do so. If I > send an "idle" or "standby" to the drive with a timeout it takes > effect That stays unclear to me. "start" is SCSI, "idle" and "standby" is SATA. > immediately but any access to it spins it up (as expected) and it does > not re-enter the lower-power mode on the timer, implying that the SSU > command did not enable the timers, and thus they remain inactive even > though they ARE set and camcontrol does report them. Hm, what is SSU? Staggered Spin-Up? I'm trying to configure delayed spin-up with this one on plain SATA: # camcontrol cmd /dev/ada2 -a "EF 06 00 00 00 00 00 00 00 00 00 00" but that doesn't really work, because the device driver has it's own ideas about when to taste the device... No, wait... > To allow unlimited flexibility in controlling the drive’s > PowerChoice technology feature, the Start/Stop Unit (SSU) SCSI > command can be used. Hm... so this would be the *SCSI* command 0x1B... then this one should work (here is the 'STOP' incantation; replace with Your proper bit values according to that seagate paper): # /sbin/camcontrol cmd /dev/xxx -c "1B 01 00 00 00 00" HTH PMc
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?slrnu7v1dt.8ud.pmc>