From owner-freebsd-geom@FreeBSD.ORG Thu Jan 11 17:11:06 2007 Return-Path: X-Original-To: freebsd-geom@freebsd.org Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3BFE216A494 for ; Thu, 11 Jan 2007 17:11:06 +0000 (UTC) (envelope-from gcubfg-freebsd-geom@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id BEB9513C4AB for ; Thu, 11 Jan 2007 17:11:05 +0000 (UTC) (envelope-from gcubfg-freebsd-geom@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1H53S0-0002lj-MW for freebsd-geom@freebsd.org; Thu, 11 Jan 2007 18:10:52 +0100 Received: from p3ee213e5.dip0.t-ipconnect.de ([62.226.19.229]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 11 Jan 2007 18:10:52 +0100 Received: from christian.baer by p3ee213e5.dip0.t-ipconnect.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 11 Jan 2007 18:10:52 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-geom@freebsd.org From: Christian Baer Date: Thu, 11 Jan 2007 18:05:47 +0100 (CET) Organization: Convenimus Projekt Lines: 54 Message-ID: X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: p3ee213e5.dip0.t-ipconnect.de User-Agent: slrn/0.9.8.1 (FreeBSD) Sender: news Subject: How to mirror a geli partition? X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jan 2007 17:11:06 -0000 Hello Folks! At the moment I am setting up a new machine. This has two identical drives (Seagate Cheetah) installed. I will hold some very important data an some very unimportant :-) data. What I want to do is to create mirrors of those *partitions* containing the important stuff[1]. Since the data is sensitive I also wish to encrypt it with geli. I've done both things before, just not in combination. And I've never created a mirror with gmirror before. Currently I'm not even sure if I should rather use vinum oder geom. I went for geom, because it is there anyway because of geli. Comments about this are very welcome! These are my main questions: 1st The mirrored partitions will contain the same date (naturally) but the drives however will not. It this a problem? Meaning that the mirrored partitions on drive0 and drive1 will probably habe different positions on their drives. 2nd The gmirror manpage only uses full drives as providers in its examples. I am guessing that I could also use a partition as a provider like /dev/ad0s1d. Did I guess that right? 3rd What happens if the partitions aren't exactly the same size? This could happen if the partitions have different positions on the drive and I specify the size in MB or GB. I don't care if I lose a bit of room (meaning that the size of the smaller partition is the one that counts). I'm just a little worried that a rounding error that makes partition0 a few blocks larger than partition1 could cause problems. 4th This is actually the biggest problem I am facing. In what order do I do this? I was thinking along this way: 1 - Create partions and try to get them the same size. :-) 2 - Fill one (or both?) with random data. 3 - Make a geli provider out of one of them, newfs it. 4 - Do something like 'gmirror label -v -b load secret 1.eli' and 'gmirror insert 2.eli' I am not sure if I should reverse the order of 3 and 4. Or have I gotten the whole idea wrong? Can someone point me in the right direction? Regards, Chris [1] Backups will also be made but probably not always be up to date as the data on these drives will change very frequently.