Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Sep 2017 12:56:52 +0100
From:      Frank Leonhardt <frank2@fjl.co.uk>
To:        freebsd-questions@freebsd.org
Subject:   Re: using gmirror and zfs mirror on the same box -- thoughts?
Message-ID:  <b019093a-f582-9aee-a13f-1920aca034a8@fjl.co.uk>
In-Reply-To: <CAOyJeZSXazwfGjoM8qOnSE0AXOMbfuqxEJgamEWJNy=yE1rcgw@mail.gmail.com>
References:  <012a6d18-7f67-9855-1740-479329bf9a65@gmail.com> <8930b791-c872-cc6c-55b0-189f405a3b05@fjl.co.uk> <CAOyJeZSXazwfGjoM8qOnSE0AXOMbfuqxEJgamEWJNy=yE1rcgw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 01/09/2017 01:09, Shamim Shahriar wrote:
> Hi Frank, thanks for your feedback, much appreciated. I'm not sure about
> gmirror being broken -- I am experiment (currently) with 12 current on a
> very broken machine which seem to be working fine. The way the machine is
> broken -- it is a Lenovo tower, supposed to work either legacy or efi
> booting, but fails with efi booting in most cases with drives that
> occasionally boots, and cannot boot legacy or efi from gpt drives at all.
> Only thing seem to work properly is legacy bit with MBR. So I used a couple
> of 1tb drives, made MBR partitions -- 3 slices, first with root boot and
> the lot, 2nd with tmp and swap (did not want to mirror those, so the second
> HDD has /var/tmp and swap), third slice with zfs only. The first slices in
> gmirror, third slices geli encrypted zfs mirror. Seems to be working fine.
> So far I have not noticed any data error. I'm to some extent certain that
> if the machine could boot from gpt, I could have gotten away without having
> to do slices and use just partitions. But cannot confirm until I try out
> the actual machine.
>
> I'll need to check the link you sent, but that will be tomorrow. Badly in
> need of a shut eye.
>
> Thanks again.
>
> On 31 Aug 2017 11:33 pm, "Frank Leonhardt" <frank2@fjl.co.uk> wrote:
>
> On 17/08/2017 23:48, Shamim Shahriar wrote:
>
>> Good evening all, hope everyone is well.
>>
>> I have a strange requirement for a particular system that will sit at a
>> remote location. I intend to use mirror, but at the same time encrypt the
>> system. Boot time encryption is not an option -- I need the system to boot
>> up normally (with network and ssh running, so I can do the rest remotely)
>> and do not wish to risk the normal bootup due to some issues with either
>> geli or other matters (fsck after a power out comes to mind). I would like
>> to have the OS part mirrored as well the data part. As for the data part --
>> I definitely wish to use zfs with encryption. Encrypting OS is not
>> necessary (but if can be done safely, ideas are welcome)
>>
>> Now, I can use multiple zpool, but then all of them will try to be
>> active/functional when the machine boots. If I intend to encrypt the data
>> pool (geli), then it needs to wait until the encryption part is taken care
>> of.
>>
>> So, I am thinking (probably in a very wrong way, corrections welcome), if
>> I get the OS part gmirror-ed, then that comes up with the OS, I have
>> network and ssh to get into the system, and then manually run the
>> encryption and zfs part.
>>
>> The system has 8GB RAM, which I am assuming should be good enough for
>> geli, gmirror and zfs parts.
>>
>> If anyone has any better suggestion/scenerio to share, that is greatly
>> welcome. If you think this might actually be disfunctional, please share
>> your thoughts on that (preferably with explanation as to why this is a bad
>> idea). if you have any suggestion that you think is a much better option,
>> please do feel free to share.
>>
> Hi Shamim,
>
> This sounds like a very good idea to me. I often go for mixed systems; boot
> off geom mirrored UFS drives and use ZFS for storage. At one time you had
> to boot from UFS, and it's only been simple to boot from ZFS since 10.0
> (IIRC).
>
> Although you can boot from a complex raidz array it has problems. For
> example, when you swap a failed drive you don't get the boot code back
> unless you put it there. And there's also more to go wrong (HBA, SAS
> expander and so on). If you boot from a pair of SATA drives directly
> connected to the motherboard it's just more likely to work.
>
> And the final "good thing" about booting from a mirrored UFS is that you
> can use the drive for faster database storage - eli a partition for this if
> needed.
>
> Booting from a geom mirror seems to have broken since 11 - you might want
> to read this:
>
> http://blog.frankleonhardt.com/2017/zfs-is-not-always-the-an
> swer-bring-back-gmirror/
>
> Regards, Frank.
>
> Hi Frank, thanks for your feedback, much appreciated. I'm not sure about
> gmirror being broken -- I am experiment (currently) with 12 current on a
> very broken machine which seem to be working fine. The way the machine is
> broken -- it is a Lenovo tower, supposed to work either legacy or efi
> booting, but fails with efi booting in most cases with drives that
> occasionally boots, and cannot boot legacy or efi from gpt drives at all.
> Only thing seem to work properly is legacy bit with MBR. So I used a couple
> of 1tb drives, made MBR partitions -- 3 slices, first with root boot and
> the lot, 2nd with tmp and swap (did not want to mirror those, so the second
> HDD has /var/tmp and swap), third slice with zfs only. The first slices in
> gmirror, third slices geli encrypted zfs mirror. Seems to be working fine.
> So far I have not noticed any data error. I'm to some extent certain that
> if the machine could boot from gpt, I could have gotten away without having
> to do slices and use just partitions. But cannot confirm until I try out
> the actual machine.
>
Hi Shamim,

When I say geom mirror is "broken" on 12 I am talking about the way you 
could install it on a boot drive. This used to be easy but the old 
method does not work. If you follow the link it explains how I did it.

Your configuration looks very interesting! Are you using two drives?

If I wanted to do what you are doing I would use geom mirror to mirror 
the whole drive. Then if I wanted ZFS I would install it on one 
partition, and let geom mirror look after all the mirroring. I'm not 
sure if this is what you are doing by reading your description. Are you 
using geom mirror on one partition and ZFS mirror on the other one?

Regards, Frank.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b019093a-f582-9aee-a13f-1920aca034a8>