From nobody Tue Sep 20 06:47:40 2022 X-Original-To: questions@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 4MWsZ1608Gz4dLpZ for ; Tue, 20 Sep 2022 06:48:09 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from se6.syd.hostingplatform.net.au (se6.syd.hostingplatform.net.au [IPv6:2400:b800:5::52]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4MWsYz5Tlxz3h3d for ; Tue, 20 Sep 2022 06:48:07 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from s121.syd3.hostingplatform.net.au ([103.27.34.4]) by se6.syd.hostingplatform.net.au with esmtps (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.92) (envelope-from ) id 1oaX2t-0004O6-DQ for questions@freebsd.org; Tue, 20 Sep 2022 16:47:54 +1000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nimnet.asn.au; s=default; h=Message-ID:From:CC:To:Subject: Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To: Date:Sender:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=icVP2agm0ktre/me53rs4tnde4/FCkqtiwI4usNyqBA=; b=UeOFhkzeviRMrHBPIHeRwfCKQn JdV56Qb4SenWIC33oX8q9ChZVWu2LpjMzC9pPdWyNZUfp89pgjwYuZ5Sz6bpa20uvdQ3Pgw56Nzd/ 1TSamt2JisbYZ+KYesiLsnn+ewCzweQEesNYIaiU86lZUVAd48Txhv4Iw30IHYwYVf6ud/LYruj7l jS2UuN3HLlj8FdhRGVatwXN4C4lspx/9ycJbR3GHGjQYmjFddLJaFc8d+LdLTzJ1uh4w1/uZOPYYg FT8mOUfZC2D1bnOqXA6099fruOEqWYX62ZTKGyMm+5hIbU+mjoHqEJDCBm1auv0cQWZpdWU82EFbH xLsZalvA==; Received: from [1.145.24.28] (port=1200 helo=Galaxy-J5-Pro) by s121.syd3.hostingplatform.net.au with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.95) (envelope-from ) id 1oaX2q-002f64-Er; Tue, 20 Sep 2022 16:47:49 +1000 Date: Tue, 20 Sep 2022 16:47:40 +1000 User-Agent: K-9 Mail for Android In-Reply-To: References: List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: disk non-destructive bad-block write/fix? To: grarpamp CC: Gary Aitken ,questions@freebsd.org From: Ian Smith Message-ID: X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - s121.syd3.hostingplatform.net.au X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - nimnet.asn.au X-Get-Message-Sender-Via: s121.syd3.hostingplatform.net.au: authenticated_id: smithi@nimnet.asn.au X-Authenticated-Sender: s121.syd3.hostingplatform.net.au: smithi@nimnet.asn.au X-Source: X-Source-Args: X-Source-Dir: X-Originating-IP: 103.27.34.4 X-SpamExperts-Domain: out-3.hostingplatform.net.au X-SpamExperts-Username: 103.27.34.4 X-SpamExperts-Outgoing-Class: ham X-SpamExperts-Outgoing-Evidence: Combined (0.15) X-Recommended-Action: accept X-Filter-ID: Pt3MvcO5N4iKaDQ5O6lkdGlMVN6RH8b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ANUQvyZzPgihL3FhyCT+8vOSJGHGnDZXw8f9eIYW4H Vh/UxFgv3Vl8SugHuMPfP9NtOxkpv0M3bEqPjumnp8Gmev19nmuGQVM= X-Report-Abuse-To: spam@se.syd.hostingplatform.net.au X-Rspamd-Queue-Id: 4MWsYz5Tlxz3h3d X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=nimnet.asn.au header.s=default header.b=UeOFhkze; dmarc=none; spf=pass (mx1.freebsd.org: domain of smithi@nimnet.asn.au designates 2400:b800:5::52 as permitted sender) smtp.mailfrom=smithi@nimnet.asn.au X-Spamd-Result: default: False [0.26 / 15.00]; SUBJECT_ENDS_QUESTION(1.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.991]; NEURAL_SPAM_MEDIUM(0.67)[0.675]; R_SPF_ALLOW(-0.20)[+ip6:2400:b800:5:0::49/123]; R_DKIM_ALLOW(-0.20)[nimnet.asn.au:s=default]; MIME_GOOD(-0.10)[text/plain]; NEURAL_SPAM_LONG(0.07)[0.072]; RCPT_COUNT_THREE(0.00)[3]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; DMARC_NA(0.00)[nimnet.asn.au]; ARC_NA(0.00)[]; HAS_X_GMSV(0.00)[smithi@nimnet.asn.au]; TO_MATCH_ENVRCPT_SOME(0.00)[]; HAS_X_AS(0.00)[smithi@nimnet.asn.au]; ASN(0.00)[asn:45638, ipnet:2400:b800:5::/48, country:AU]; MLMMJ_DEST(0.00)[questions@freebsd.org]; HAS_X_SOURCE(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; HAS_XOIP(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; DKIM_TRACE(0.00)[nimnet.asn.au:+]; HAS_X_ANTIABUSE(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N On 20 September 2022 3:45:55 pm AEST, grarpamp wrote= : > > throwing a lot of errors >=20 > USB=2E=2E=2E reseat cables=2E Or try another one/s, if external=2E But first I'd skip to your last point ie read testing, which also could ca= tch a bad cable=2E If it's just or mainly that, much angst relieved=2E > > Is there a way to exercise the free blocks on a ufs disk and move > all > > defective ones to the bad-block list? >=20 > That's function of the hw, not the fs=2E Unless the disk is really ancient, ISTR badblocks(ono) from 2=2E6-REL days= =2E > If you want to nuke the fs and do that to the disk > dd if=3D/dev/urandom of=3D/dev/da0 bs=3D1m >=20 > If not, then you can pray to hit most of the fs data areas with > dd if=3D/dev/urandom of=3D/mnt/bigrandfile bs=3D1m >=20 > but that's a prayer=2E And closer to last resort =2E=2E=2E > Better to buy enough media to have backups of backups=2E Ack, and it's so cheap these days=2E > > Or is that already happening in the above scenario? >=20 > Yes most firmwares modepages are set to automatically > write-reallocate, you can fiddle those using the scsi/ata/usb > spec and camcontrol=2E >=20 > Store a sha256 of all the files, > read them back to verify and compare to that=2E >=20 > > The disk is about 40% full >=20 > There's probably not a shrinkfs, and without checking where those > existing extents are, attempting to create a tailing 60% fs to > move the 40% into to write-realloc it=2E=2E=2E could end up footshot=2E Again, be sure cables are good before such desperate measures=2E > > wondering if the whole rest of it is trashed >=20 > dd if=3D/dev/da0 of=3D/dev/null bs=3D1m conv=3Dnoerror >=20 > But that's only a read test, not a write test=2E But nice and safe, for starters - and with noerror reporting all bad bits= =2E cheers, Ian