From nobody Tue Jun 6 19:15:09 2023 X-Original-To: freebsd-stable@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QbKyV1CzCz4bF4F for ; Tue, 6 Jun 2023 19:18:42 +0000 (UTC) (envelope-from li-fbsd@citylink.dinoex.sub.org) Received: from uucp.dinoex.org (uucp.dinoex.org [IPv6:2a0b:f840::12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "uucp.dinoex.sub.de", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QbKyR579Vz4Pp8 for ; Tue, 6 Jun 2023 19:18:39 +0000 (UTC) (envelope-from li-fbsd@citylink.dinoex.sub.org) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of li-fbsd@citylink.dinoex.sub.org designates 2a0b:f840::12 as permitted sender) smtp.mailfrom=li-fbsd@citylink.dinoex.sub.org; dmarc=none Received: from uucp.dinoex.org (uucp.dinoex.org [IPv6:2a0b:f840:0:0:0:0:0:12]) by uucp.dinoex.org (8.17.2/8.17.2) with ESMTPS id 356JI80N073364 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Tue, 6 Jun 2023 21:18:08 +0200 (CEST) (envelope-from li-fbsd@citylink.dinoex.sub.org) X-MDaemon-Deliver-To: Received: (from uucp@localhost) by uucp.dinoex.org (8.17.2/8.17.2/Submit) with UUCP id 356JI8kO073363 for freebsd-stable@freebsd.org; Tue, 6 Jun 2023 21:18:08 +0200 (CEST) (envelope-from li-fbsd@citylink.dinoex.sub.org) Received: from admn.intra.daemon.contact (localhost [127.0.0.1]) by admn.intra.daemon.contact (8.17.1/8.17.1) with ESMTPS id 356JFaoL088135 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Tue, 6 Jun 2023 21:15:39 +0200 (CEST) (envelope-from li-fbsd@citylink.dinoex.sub.org) Received: from intra.daemon.contact (news@localhost) by admn.intra.daemon.contact (8.17.1/8.17.1/Submit) with NNTP id 356JF9Av087993 for freebsd-stable@freebsd.org; Tue, 6 Jun 2023 21:15:09 +0200 (CEST) (envelope-from li-fbsd@citylink.dinoex.sub.org) X-Authentication-Warning: admn.intra.daemon.contact: news set sender to li-fbsd@citylink.dinoex.sub.org using -f From: "Peter 'PMc' Much" X-Newsgroups: m2n.fbsd.stable Subject: Re: Camcontrol question related to Seagate disks Date: Tue, 6 Jun 2023 19:15:09 -0000 (UTC) Message-ID: References: <220afa61-4508-5dbd-c870-e405aa23c895@denninger.net> List-Id: Production branch of FreeBSD source code List-Archive: https://lists.freebsd.org/archives/freebsd-stable List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Tue, 6 Jun 2023 19:15:09 -0000 (UTC) Injection-Info: admn.intra.daemon.contact; logging-data="87992"; mail-complaints-to="usenet@citylink.dinoex.sub.org" User-Agent: slrn/1.0.3 (FreeBSD) To: freebsd-stable@freebsd.org X-Milter: Spamilter (Reciever: uucp.dinoex.org; Sender-ip: 0:0:2a0b:f840::; Sender-helo: uucp.dinoex.org;) X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (uucp.dinoex.org [IPv6:2a0b:f840:0:0:0:0:0:12]); Tue, 06 Jun 2023 21:18:11 +0200 (CEST) X-Spamd-Result: default: False [-2.67 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-0.99)[-0.995]; NEURAL_HAM_SHORT(-0.67)[-0.672]; FORGED_SENDER(0.30)[pmc@citylink.dinoex.sub.org,li-fbsd@citylink.dinoex.sub.org]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[freebsd-stable@freebsd.org]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[sub.org]; R_DKIM_NA(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; RCPT_COUNT_ONE(0.00)[1]; HAS_XAW(0.00)[]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; ASN(0.00)[asn:205376, ipnet:2a0b:f840::/32, country:DE]; TO_MATCH_ENVRCPT_ALL(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-stable@freebsd.org]; TO_DN_NONE(0.00)[]; FROM_NEQ_ENVFROM(0.00)[pmc@citylink.dinoex.sub.org,li-fbsd@citylink.dinoex.sub.org] X-Rspamd-Queue-Id: 4QbKyR579Vz4Pp8 X-Spamd-Bar: -- X-ThisMailContainsUnwantedMimeParts: N On 2023-06-06, Karl Denninger 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