From nobody Sun Apr 16 01:50:41 2023 X-Original-To: freebsd-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 4PzY6s6mPCz45WSB for ; Sun, 16 Apr 2023 01:50:45 +0000 (UTC) (envelope-from freebsd@dreamchaser.org) Received: from nightmare.dreamchaser.org (ns.dreamchaser.org [66.109.141.57]) (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 "discoveriesinwood.com", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PzY6s1F9Nz4XlL for ; Sun, 16 Apr 2023 01:50:45 +0000 (UTC) (envelope-from freebsd@dreamchaser.org) Authentication-Results: mx1.freebsd.org; none Received: from [192.168.151.122] (breakaway [192.168.151.122]) by nightmare.dreamchaser.org (8.16.1/8.16.1) with ESMTP id 33G1ofKG001109; Sat, 15 Apr 2023 19:50:41 -0600 (MDT) (envelope-from freebsd@dreamchaser.org) Message-ID: <5793cdd5-c365-7769-49e9-366cb367a8a0@dreamchaser.org> Date: Sat, 15 Apr 2023 18:50:41 -0700 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 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.7.0 Reply-To: freebsd@dreamchaser.org Subject: Re: frequent disk error, need guidance Content-Language: en-US To: John Levine , freebsd-questions@freebsd.org References: <20230415204721.DD803BF2E2EA@ary.qy> From: Gary Aitken In-Reply-To: <20230415204721.DD803BF2E2EA@ary.qy> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.4 (nightmare.dreamchaser.org [192.168.151.101]); Sat, 15 Apr 2023 19:50:42 -0600 (MDT) X-Rspamd-Queue-Id: 4PzY6s1F9Nz4XlL X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:21947, ipnet:66.109.128.0/19, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 4/15/23 13:47, John Levine wrote: > It appears that Gary Aitken said: >> of fbsd in such cases), wanted to see if the following is a good way >> to copy the old disk to the new one. >> >> mount /dev/ada1p2 /mnt/newsys >> cd /mnt/newsys >> dump -0 -f - /dev/ada0p2 | restore -r -Dv -f - >> >> However... this is a running system, which seems unlikely to produce >> a consistent result. > > I'd shut down to single user, make a /.snap directory, and do dump -L > to tell it to make a snapshot before dumping. That should work OK. Thanks. (Needed to mount /tmp read-write) The -L didn't work because boot -s mounted the filesystem read-only; at least that's what it claimed: dump -0 -L -f - /dev/ada0p2 | restore -r -Dv -f - Verify tape and initialize maps DUMP: WARNING: -L ignored for read-only filesystem Not sure I understand that; does -s normally start in read-only mode? Has it always done that? It's been quite a while since I did that. In any case, I let the dump|restore go through, and it seems to have been successful. Booted into the restored system and running it now; smartctl short test ok and doing long now. It looks like the bad blocks/sectors were files in /var/db/freebsd-update/files/xxx.gz I unzipped a file in that directory and it appears that they are the saved files from the old system when upgrading. Is that correct? Any reason not to remove all files in /var/db/freebsd-update/files since the upgraded to 12.x system has been running for several months now? Thanks, Gary