Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Jul 2006 08:04:13 -0400
From:      John Nielsen <lists@jnielsen.net>
To:        freebsd-questions@freebsd.org
Cc:        Olivier Nicole <on@cs.ait.ac.th>, questions@freebsd.org
Subject:   Re: Creating vinum RAID 1 on place
Message-ID:  <200607070804.13892.lists@jnielsen.net>
In-Reply-To: <200607070429.k674TkjX027354@banyan.cs.ait.ac.th>
References:  <200607070429.k674TkjX027354@banyan.cs.ait.ac.th>

next in thread | previous in thread | raw e-mail | index | archive | help
On Friday 07 July 2006 00:29, Olivier Nicole wrote:
> Is there a trick on the way to build a vinum RAID 1 without backup-in
> the data first?
>
> I have the two disk that will get mirrored. One of the disk if
> formated as UFS 4.2 and already holds all the data. The second disk is
> blank.
>
> NormallyI should start with 2 blank disks, label them as vinum, create
> the vinum plex, then push the data on that RAID. Is there a way to do
> it without blanking both disk first (a RAID 0 on a single disk, copy
> the data on the RAID 0), label the other disk as vinum and create a
> RAID1?

This is quite possible.  The 100% safe way would be to configure the blank 
disk as the sole member of a (degraded) mirror set, use dump / restore to 
transfer the data from the existing filesystem to the "mirror", then wipe the 
old filesystem and add the original disk to the mirror.

The faster but only 90% safe way would be to "gmirror label" the partition 
containing the existing filesystem and then adding the second disk as a 
member. This is not safe if the last sector of the existing provider (where 
gmirror stores its metadata) is (or could be in the future) used by the 
filesystem. Frequently the geometry works out such that there are spare 
sectors at the end of a partition that are not used by newfs, but if you're 
not sure then don't go this route. See the archives of this and other lists 
for details about this situation.

JN



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