From nobody Mon Apr 17 11:46:32 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 4Q0QJ81mXHz45n5D for ; Mon, 17 Apr 2023 11:46:48 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mout.kundenserver.de", Issuer "Telekom Security ServerID OV Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q0QJ533Yvz3Nwv for ; Mon, 17 Apr 2023 11:46:45 +0000 (UTC) (envelope-from freebsd@edvax.de) Authentication-Results: mx1.freebsd.org; dkim=none; spf=none (mx1.freebsd.org: domain of freebsd@edvax.de has no SPF policy when checking 212.227.126.133) smtp.mailfrom=freebsd@edvax.de; dmarc=none Received: from r56.edvax.de ([178.5.238.132]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPA (Nemesis) id 1MJVY8-1q3qrZ111E-00Jojh; Mon, 17 Apr 2023 13:46:33 +0200 Date: Mon, 17 Apr 2023 13:46:32 +0200 From: Polytropon To: freebsd@dreamchaser.org Cc: John Levine , freebsd-questions@FreeBSD.org Subject: Re: frequent disk error, need guidance Message-Id: <20230417134632.570f53b7.freebsd@edvax.de> In-Reply-To: <5793cdd5-c365-7769-49e9-366cb367a8a0@dreamchaser.org> References: <20230415204721.DD803BF2E2EA@ary.qy> <5793cdd5-c365-7769-49e9-366cb367a8a0@dreamchaser.org> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) 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=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:yRKAGu7UJGRWVALZzLHSC+B/wDT1SaobcIZZQlbUz/fbDxrN4mT o7UO/NPPIg4C4gXJ8Fm5yCc/HzPtOjYMi0NgZ3HJkft/yAMayYT4EDlZBX/kcVa7079ulh+ 9raZ102ihcHK6LzLJ+WAMbiPEk3JtpZV30GA0b/z1Ct/DJQOtQ4Txt5qOUAHhu+5eXrrJCR l3pmaLKms+zuj4mDSFf/w== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:mtu857NGLIs=;uNKD53jARuPRAOA/P8WnZ7WJjaL CN24x36wu8WGSDzNybpBdNv6cxSwYlKcNTB2YxQPm8ICXr+52Yr3+38+1ZmZMwIIFhk3UvIqL XzWaLucLo48j24jkKRVDD+q9Y2hj7d3s9hb6BloGabYR4ofsiPr0YA9wf01gHgSZhFmdbLBqW vY2h8BI630f1CgPhZoHilUN73LXwJCTx9vSR1sGSNu3LWEApvHka9uM2kE3XxAUaeeWpU0cdN ifI3QzjUlE3DkYP7mgBwMD+Qdu6b3V9pyN/xuKhMd3Ib8Nboy3zyc+41t10e20YldN2vBYm+8 cUrnYnppHIftlxGiERcLicu0Nnl20J04C801fmXKDLX53ClNZfM8FkM6bfwPQ53p6TqDPVgcA nHRzgm4XVJd2BUuAzXsScHyvZBqruzJ05yr50Yvy8QoII9HmKl0DwLjXlUGVJDhonUJHsaQ2R jGtOZScwVa90GO3APhHAiZbp+aTy3qu1DQA7/xfc5vOnrRTHgwFeJEdjYR954+1pn1Bo8GUwQ x+GhP0ey8EkzMwYD9L7J104pT+qKXiizsqPwuXD4YrRFoODN/dzocPqaRpyjpapmUvKmwSzpA nMqtod8TZ9j8vc/rQ+M1IeGbITef0/l9u96rUFmAIXCQzm0nrWRiiCZ1dSzrnQGvNi/JE4Sih OyRjKijuTpoVEo/lsF8jhZl5M5dz4UFMJmPVScBlJg== X-Spamd-Result: default: False [-0.19 / 15.00]; AUTH_NA(1.00)[]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-0.99)[-0.992]; NEURAL_HAM_SHORT(-0.59)[-0.594]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[edvax.de]; HAS_REPLYTO(0.00)[freebsd@edvax.de]; BLOCKLISTDE_FAIL(0.00)[178.5.238.132:server fail,212.227.126.133:server fail]; RCVD_IN_DNSWL_NONE(0.00)[212.227.126.133:from]; TO_MATCH_ENVRCPT_SOME(0.00)[]; R_SPF_NA(0.00)[no SPF record]; MLMMJ_DEST(0.00)[freebsd-questions@FreeBSD.org]; RCPT_COUNT_THREE(0.00)[3]; REPLYTO_EQ_FROM(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[212.227.126.133:from]; HAS_ORG_HEADER(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; R_DKIM_NA(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4Q0QJ533Yvz3Nwv X-Spamd-Bar: / X-ThisMailContainsUnwantedMimeParts: N On Sat, 15 Apr 2023 18:50:41 -0700, Gary Aitken wrote: > 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 That is correct: -L is used to make a "runtime snapshot" of a filesystem that could be subject to changes, i. e. to writes. > Not sure I understand that; > does -s normally start in read-only mode? Yes. Single-user mode starts the system with the root partition / mounted read-only, and all other partitions not mounted at all. If you have "one big /", this will also apply. If you have separate /tmp, /var, /usr, /opt, /home etc. partitions, you need to fsck and then mount them manually, after "mount -wu /". > Has it always done that? It's been quite a while since I did that. Yes, as far as I remember, and I remember since 4.0. ;-) > 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. Excellent! > 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? Those seem to be temporary files belonging to the updating program. There's probably nothing wrong with deleting them, as if they are needed, then freebsd-update would fetch or generate them anyway. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...