Re: Some notes on RootOnZFS article in wiki

From: Mel Flynn <mel.flynn+fbsd.current_at_mailing.thruhere.net>
Date: Mon, 21 Dec 2009 15:27:26 -0900
On Monday 21 December 2009 09:47:47 Scot Hetzel wrote:

> I have updated the wiki to mention that you need an install media with
> the livefs support.

<snip>

> I had marked that step as optional, and as was stated in this thread
> it is not needed for GPT disks.   This optional step has been removed
> from the wiki.

Great work, thanks!

> >  3) By adding the swap partitions on the two mirrored disks to /etc/fstab
> > top actually shows the sum of these as available swap. My expectation
> > is/was that the swap would be mirrored and thus I'd have only the size of
> > one swap partition. If this isn't the case, can I get by with 1 of the
> > two since they're double the intended size or should one use 2 and thus
> > create them half the intended size?
> 
> To mirror the swap partitions, your will need to use gmirror.
> 
> 1. comment out/remove the /dev/gpt/swap{0,1} entries
> 2. add geom_mirror_load="YES" to /boot/loader.conf
> 2. reboot to make sure the system is not using the swap partitions
> 3. create the mirrored swap partitions using the gpt/swap0 and
> gpt/swap1 partitions:
> 
> gmirror label -b prefer swap gpt/swap0 gpt/swap1
> 
> NOTE: round-robin can also be used, but see the gmirror(8) man page
> about kernel dumps.
> 
> 4. change /etc/fstab to use the mirrored swap partition:
> 
> /dev/mirror/swap                 none                    swap    sw
>           0       0
> 
> If you try this, let me know how it turns out.

Works as advertised:
% swapinfo -h
Device          1K-blocks     Used    Avail Capacity
/dev/mirror/swap   4194300       0B     4.0G     0%

% gmirror status
       Name    Status  Components
mirror/swap  COMPLETE  ad4p2
                       ad6p2

Thanks for your work and advice!
-- 
Mel
Received on Mon Dec 21 2009 - 23:27:32 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:59 UTC