Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Apr 2023 13:41:39 +0200
From:      Polytropon <freebsd@edvax.de>
To:        freebsd@dreamchaser.org
Cc:        FreeBSD Mailing List <freebsd-questions@FreeBSD.org>
Subject:   Re: frequent disk error, need guidance
Message-ID:  <20230417134139.5a673c0b.freebsd@edvax.de>
In-Reply-To: <da04f7b2-2d8f-f7fb-5a00-e378a33e7a84@dreamchaser.org>
References:  <d5d43af7-58f4-656c-97c1-9d478db76096@dreamchaser.org> <20230415073315.7adfdddd.freebsd@edvax.de> <da04f7b2-2d8f-f7fb-5a00-e378a33e7a84@dreamchaser.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 15 Apr 2023 12:25:07 -0700, Gary Aitken wrote:
> 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.

Just a little trick:

	# cd /mnt/newsys
	# dump -Lauf0 - /dev/ada0p2 | restore -rf -

On a running system, using -L is never wrong. But if
you can, unmount /dev/ada0p2 (source partition), or
at least have it mounted read-only.



> There are only 2 sata slots on the mobo, so I can't mount a third
> system, although I might be able to build a memstick and use that.

Or a "USB converter" for SATA disks.



> Can I reboot in a read-only manner and do the above?

You _should_ do that. But dump's -L flag works, too.



> Never done that, not sure what's involved.
> Is single-user mode sufficient?

Not just sufficient, it's actually _recommended_.
Have as few interfering parts as possible.




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20230417134139.5a673c0b.freebsd>