Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Apr 2023 18:50:41 -0700
From:      Gary Aitken <freebsd@dreamchaser.org>
To:        John Levine <johnl@iecc.com>, freebsd-questions@freebsd.org
Subject:   Re: frequent disk error, need guidance
Message-ID:  <5793cdd5-c365-7769-49e9-366cb367a8a0@dreamchaser.org>
In-Reply-To: <20230415204721.DD803BF2E2EA@ary.qy>
References:  <20230415204721.DD803BF2E2EA@ary.qy>

next in thread | previous in thread | raw e-mail | index | archive | help
On 4/15/23 13:47, John Levine wrote:
> It appears that Gary Aitken <freebsd@dreamchaser.org> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5793cdd5-c365-7769-49e9-366cb367a8a0>