FreeBSD 8.0 system setup with ZFS steps

2009-11-29 Thread Derrick Ryalls
Greetings,

I created the following guide when I was trying out ZFS in VirtualBox
on my windows machine.  I created 5 hard drives: 1 to represent a
flash drive to boot off of, 4 to represent the large hard drives I
would be using in raid.  It seemed to work to get a running system,
but wanted to make sure I wasn't doing anything stupid or missing a
good step.

FreeBSD 8.0 with ZFS


*Setup
   Use a 2gig Flash device.  1 gig is enough space though.  512M will be tight.
   Collect the 4 other SATA drives.
*Start FreeBSD normal install.
   Select the flash device as the device to install to.
   Use the entire device
   Install the bootMgr
   Create a single slice taking up the entire device, mount to /
   Select distribution minimal
   Run install
   Normal post install answers
   Reboot
*Activate ZFS 
(http://www.freebsd.org/doc/en/books/handbook/filesystems-zfs.html)
   Follow instructions for RaidZ
   Be sure to add the instructions for daily raid mails
*Create mount points in pool
   home
   local
   obj
   ports
   src
   var
   share
   tmp
*One at a time, copy existing data from / to new mount points.
Instructions are in the link above
*Reboot (make sure nothing is broken)
*Swap
   zfs create -V 4g storage/swap
   geli onetime -s 4096 /dev/zvol/storage/swap (encryption, might not be needed)
   swapon /dev/zvol/storage/swap.eli
*pkg_add -r bash
*Add users
*Normal setup at this point.

/copy

My goal is to not burn out the flash drive with a bunch of writes, so
it should primarily be read only, with the occasional edit to a config
file or installworld.  I tried putting /etc in a ZFS pool to take
advantage of snapshots and such, but the machine couldn't find the
boot drive as that information is stored in /etc and ZFS is not loaded
at that point.

Am I doing something stupid that may burn out the flash drive or cause
the system to be rather slow?

Thanks,

Derrick
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: FreeBSD 8.0 system setup with ZFS steps

2009-11-29 Thread Polytropon
Pease allow me a terminology note:

On Sun, 29 Nov 2009 18:30:57 -0800, Derrick Ryalls ryal...@gmail.com wrote:
 *Start FreeBSD normal install.
Select the flash device as the device to install to.
Use the entire device

This step creates a slice covering the whole disk. Make sure that
the slice is marked active when it should be the booting slice.



Install the bootMgr

Only needed if you want to dual-boot something. In normal cases,
writing the standard MBR is completely sufficient, because it
only boots to FreeBSD.



Create a single slice taking up the entire device, mount to /

A single partition - you've already created a slice.

Terminology comparison from Windows land: A SLICE is a DOS
primary partition, and a PARTITION is comparable to a logical
volume inside an extended DOS partition. Partitions are the
subdivisions of a slice holding a file system.



 *pkg_add -r bash

Really? :-)



 Am I doing something stupid that may burn out the flash drive or cause
 the system to be rather slow?

Not that I see it. You could make sure that any mount options
refering to the UFS / on the flash drive are honoring the fact
that writes should be minimized, such as the noatime option.
This shouldn't have negative effects on the booting process or
the FreeBSD system running on it.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org