Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Mar 2010 21:14:12 +0100
From:      Mike Clarke <jmc-freebsd2@milibyte.co.uk>
To:        freebsd-questions@freebsd.org
Cc:        krad <kraduk@googlemail.com>
Subject:   Re: Copying mirrored partitions - will this work?
Message-ID:  <201003312114.12156.jmc-freebsd2@milibyte.co.uk>
In-Reply-To: <d36406631003310405i3e38de95o86a77ee8861d6e21@mail.gmail.com>
References:  <201003201532.48793.jmc-freebsd2@milibyte.co.uk> <201003311022.44297.jmc-freebsd2@milibyte.co.uk> <d36406631003310405i3e38de95o86a77ee8861d6e21@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 31 March 2010, krad wrote:

> On 31 March 2010 10:22, Mike Clarke <jmc-freebsd2@milibyte.co.uk> 
wrote:
> > On Saturday 20 March 2010, Mike Clarke wrote:

[snip]

> > > I have two 500GB disks, /dev/ad4 and /dev/ad8, each partitioned
> > > into 4 slices of 88, 88, 42 and 259GB. My system is installed on
> > > the first slices (ad4s1 and ad8s1) which are mirrored as
> > > /dev/mirror/gm0. The second slices (ad4s2 and ad8s2) are
> > > currently unused. My thoughts are to temporarily add ad4s2 into
> > > gm0 with "gmirror insert gm0 ad4s2" and wait for the mirror to
> > > synchronise. I should then be able to remove the temporary
> > > addition with "gmirror remove gm0 /dev/ad4s2" at which point
> > > ad4s2 should be a duplicate of the original system and I can then
> > > go ahead and create a new mirror with "gmirror label -b load gm1
> > > ad4s2" and "gmirror insert gm1 ad8s2". After editing /etc/fstab
> > > in the new mirror to use gm1 instead of gm0 I should then be able
> > > to boot into the system on slice 2 and upgrade it to STABLE while
> > > still keeping my original system to fall back to if required.
> > >
> > > Is this approach of moving disks from one mirror to another
> > > workable, or have I missed something that would lead me into deep
> > > trouble? I don't mind unduly if I make a mess of the second slice
> > > and have to start again but I don't want to lose the contents of
> > > my original system on slice 1.
> >
> > I decided to give it a try and the process went through very
> > smoothly. It was much less tedious than bsdlabel -> newfs ->
> > dump|restore, and quicker too. The mirror synchronised at a bit
> > over 100 MB/sec but dump| restore only gave me about 10 MB/sec.

[snip]

> One thing about your dump/restore speed. Did you play around with
> larger block sizes? Increasing it should give you better throughput.

I used 32 MB for the cache size but I expect the reduced speed comes 
about from the need to find and open a large number of files whereas 
synchronising the mirror just does a sequential disk to disk copy at 
block level.

-- 
Mike Clarke



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