Re: read and write back full disk to trigger relocation
Date: Tue, 30 May 2023 09:18:13 UTC
> ---------------------------------------- > From: David Christensen <dpchrist@holgerdanske.com> > Date: May 29, 2023, 4:12:24 PM > To: <questions@freebsd.org> > Subject: Re: read and write back full disk to trigger relocation > > > Your mail client and my mail client (Thunderbird) indent things > differently. I have reformatted the above per Thunderbird conventions. > I have had to do this every time I reply to your messages. I do not > have this issue with most other messages I reply to. That doesn't surprise me. My mail client is web-based, but this provider seems hellbent on ruining what used to be a good service. Can't say I recommend them. > Testing dd(1) and gmirror(8): > > 2023-05-29 15:21:32 toor@vf1 ~ > # freebsd-version ; uname -a > 12.4-RELEASE-p2 > FreeBSD vf1.tracy.holgerdanske.com 12.4-RELEASE-p1 FreeBSD > 12.4-RELEASE-p1 GENERIC amd64 > > 2023-05-29 15:23:05 toor@vf1 ~ > # gmirror label mymirror ada3 ada4 > > 2023-05-29 15:24:11 toor@vf1 ~ > # gmirror status mymirror > Name Status Components > mirror/mymirror COMPLETE ada3 (ACTIVE) > ada4 (ACTIVE) > > 2023-05-29 15:52:41 toor@vf1 ~ > # dd if=/dev/ada3 of=/dev/ada3 bs=1m > dd: /dev/ada3: Operation not permitted > > 2023-05-29 15:53:45 toor@vf1 ~ > # dd if=/dev/ada4 of=/dev/ada4 bs=1m > dd: /dev/ada4: Operation not permitted > > 2023-05-29 15:53:52 toor@vf1 ~ > # dd if=/dev/mirror/mymirror of=/dev/mirror/mymirror bs=1m > 1023+1 records in > 1023+1 records out > 1073741312 bytes transferred in 3.299006 secs (325474224 bytes/sec) > > > This confirms that the kernel will not allow writes to mirror components > when they are active, as it should. If a process could write to a > component of a mirror, that would bypass the mirror driver, defeat the > purpose of the mirror, allow race conditions, and result in data loss/ > data corruption. > > > David > > That makes sense. I wouldn't recommend running it on a live system anyway. Probably wiser to boot into a livecd and run it on a single disk. gmirror shouldn't notice a difference since the data isn't presently corrupted, just decaying (is my guess). 3TB is a lot of data to process. -- Sent with https://mailfence.com Secure and private email