Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 May 2023 11:18:13 +0200 (CEST)
From:      Sysadmin Lists <sysadmin.lists@mailfence.com>
To:        questions@freebsd.org
Subject:   Re: read and write back full disk to trigger relocation
Message-ID:  <2025846914.656453.1685438293844@ichabod.co-bxl>
In-Reply-To: <00671d49-83b1-26a0-4e28-47eb0d7cb95c@holgerdanske.com>
References:  <a111b6a7-0bf8-d3b9-9611-a7fbf36635b3@artem.ru> <1957739901.520492.1685310340560@ichabod.co-bxl> <0d0186c5-9542-1af3-2ce3-e28480b4b6d7@holgerdanske.com> <1961596841.3509648.1685359514813@fidget.co-bxl> <00671d49-83b1-26a0-4e28-47eb0d7cb95c@holgerdanske.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> ----------------------------------------
> 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



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