Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Jan 2007 18:05:47 +0100 (CET)
From:      Christian Baer <christian.baer@informatik.uni-dortmund.de>
To:        freebsd-geom@freebsd.org
Subject:   How to mirror a geli partition?
Message-ID:  <eo5qpb$1uev$4@nermal.rz1.convenimus.net>

next in thread | raw e-mail | index | archive | help
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.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?eo5qpb$1uev$4>