Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Aug 2008 16:54:17 -0400
From:      John Nielsen <lists@jnielsen.net>
To:        freebsd-questions@freebsd.org
Cc:        Julien Cigar <jcigar@ulb.ac.be>
Subject:   Re: Cloning a gmirrored hard drive
Message-ID:  <200808251654.17772.lists@jnielsen.net>
In-Reply-To: <1219679441.2701.19.camel@frodon.be-bif.ulb.ac.be>
References:  <48B186B3.4030803@stupar.homelinux.net> <20080825143507.A9361@wojtek.tensor.gdynia.pl> <1219679441.2701.19.camel@frodon.be-bif.ulb.ac.be>

next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 25 August 2008 11:50:41 am Julien Cigar wrote:
> Stupid question: can't you use growfs on the existing gmirror (after
> replace /dev/oneofdisk, resync, replace /dev/otherdisk, resync) ?
> Is it mandatory to create a *new* gmirror ?

There is no way to resize a gmirror provider without creating a new one. 
You could possibly insert the new large drive into the mirror, deactivate 
it, make a new gmirror on it (clobbering the old one), THEN use growfs.. 
but that's a lot mor ecomplicated and error-prone than doing it the right 
way using dump/restore. If downtime is a concern then use Ivan's method 
below but without going into single-user--just be sure to give -L to 
dump.

> On Mon, 2008-08-25 at 14:37 +0200, Wojciech Puchar wrote:
> > >> Hi!
> > >>
> > >> My situation: I have a server with FBSD 7 installed with two 40 GB
> > >> disks in RAID 1 (gmirror) config.
> > >> Now I have noticed the lack of space on the drive so I am thinking
> > >> to change these disks for two 160 GB.
> > >> What is the best way to clone the main hard disk in raid 1 config?
> > >> Is
> >
> > gmirror remove yourmirrorname /dev/oneofdisk
> >
> > shutdown and replace this one with 160GB
> >
> > boot single user
> >
> > make gmirror with this new 160GB drive (only one drive now so not
> > real mirror)
> >
> > newfs and copy all data make it bootable, shutdown, remove second
> > 40GB drive, add second 160GB drive, boot and then
> >
> > gmirror insert yournewmirror seconddrive
> >
> > that's all.
> > _______________________________________________
> > freebsd-questions@freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> > To unsubscribe, send any mail to
> > "freebsd-questions-unsubscribe@freebsd.org"





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