Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Feb 2005 10:30:05 -0800 (PST)
From:      Doug White <dwhite@gumbysoft.com>
To:        Karl Denninger <karl@denninger.net>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: Lock/reboot, no dump (ugh)
Message-ID:  <20050209102604.A13316@carver.gumbysoft.com>
In-Reply-To: <20050208193609.A8080@denninger.net>
References:  <20050208193609.A8080@denninger.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 8 Feb 2005, Karl Denninger wrote:

> Hi folks;
>
> FreeBSD 5.3-STABLE #1: Wed Feb  2 22:57:48 CST 2005     karl@FS.denninger.net:/usr/obj/usr/src/sys/KSD-SMP
>
> Sources from January 30th.
>
> Scenario:
>
> 1.	Using GEOM_MIRROR to mirror two SATA drives.
>
> 2.	Nightly, a third drive is used to back up, as follows:
>
> 	a. Check to see if the drive is visible on the SATA interface.
> 	b. If not, "atacontrol attach 2" to scan the bus it is plugged into
> 	c. Verify that it is now online.
> 	d. Use "gmirror insert ...." to insert it into the mirror.
> 	e. Wait for it to sync.
> 	f. Stop critical processes (e.g. DBMS, etc)
> 	g. "gmirror deactivate ...." to remove the backup from the mirror.
> 	h. "gmirror forget" to clean up the RAID
> 	i. "atacontrol detach 2" to detach and spin down the disk.

This is only safe if you also unmount the filesystem(s) that are stored on
the mirror volume.  If you don't unmount it then you'll get behavior like
this -- unflushed blocks vanish.  If you insist on doing dirty copies then
you might try mounting the FS sync, but performance will fall through the
floor.

If you're testing simple attach/detach then you might start with a
quiescent volume (unmounted or filled with test patterns) and do mirror
attach/sync/detach in a loop.  THat would take the FS, and any in-memory
filesystem state corruption, out of the picture.

-- 
Doug White                    |  FreeBSD: The Power to Serve
dwhite@gumbysoft.com          |  www.FreeBSD.org



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