From: Torfinn Ingolfsen on
Hi,

Now that FreeBSD 8.0 is out, I am thinking about building me a new file
server at home.
In general, thiss will be a small PC type box, and it will only be a
file server, no other duties.

I am thinking:
- amd64
- 2 to 4 GB RAM
- 3 physical hard drives for the system drive and the storage pool.

Questions:
- am I on the right track here? Or would you recommend something different?
- should I keep the system drive on a different set of disks? (if so,
would a 2 disk zfs mirror be good?)

--
Torfinn Ingolfsen,
Norway
From: MZ on
Torfinn Ingolfsen wrote:
> Hi,
>
> Now that FreeBSD 8.0 is out, I am thinking about building me a new file
> server at home.
> In general, thiss will be a small PC type box, and it will only be a
> file server, no other duties.
>
> I am thinking:
> - amd64
> - 2 to 4 GB RAM
> - 3 physical hard drives for the system drive and the storage pool.
>
> Questions:
> - am I on the right track here? Or would you recommend something different?
> - should I keep the system drive on a different set of disks? (if so,
> would a 2 disk zfs mirror be good?)

Sounds awfully similar to my setup and application. I've been using ZFS
under FreeBSD 7.2 for a personal server/router. I plan on moving to 8.0
this week sometime to take advantage of ZFS 13.

The 3 disk raid-z configuration seems to make more sense than the 2 disk
mirror. As far as usable space goes, you're talking double with the 3
disk array. I actually use a small 4th disk (UFS) just for the OS (and
swap, and temp, etc).

Anyway, I've had zero problems with it, and the array is incredibly easy
to import/export from different systems when it comes time to upgrade
hardware. Yes, I'd definitely do it with 2 to 4 GB at your disposal,
and double yes to amd64 (due to its memory management, you're less
likely to fight kernel panics and configuration issues).

Disk speed is ok, not great. I've tried a couple different SATA
controllers, with pretty varied results for speed, so choose wisely in
that regard. They also say more memory has a big impact on speed, but I
haven't tested it. Surprisingly, there didn't seem to be a difference
going from DDR2-667 to DDR2-800.

The only drawback I've seen so far is that it's difficult (in FreeBSD,
at least) to spin these drives down when not in use. And, I could be
wrong, but it's even harder with ZFS.
From: Torfinn Ingolfsen on
MZ wrote:
> The 3 disk raid-z configuration seems to make more sense than the 2
disk mirror. As far as usable space goes, you're
> talking double with the 3 disk array. I actually use a small 4th
disk (UFS) just for the OS (and swap, and temp, etc).

I decided to go for a 2 disk mirror for the system, set up like this:
root(a)kg-f2# zpool list
NAME SIZE USED AVAIL CAP HEALTH ALTROOT
zroot 59.5G 28.8G 30.7G 48% ONLINE -
root(a)kg-f2# zpool status
pool: zroot
state: ONLINE
scrub: scrub completed after 0h7m with 0 errors on Mon Dec 14 22:33:12
2009
config:

NAME STATE READ WRITE CKSUM
zroot ONLINE 0 0 0
mirror ONLINE 0 0 0
gpt/disk0 ONLINE 0 0 0
gpt/disk1 ONLINE 0 0 0

errors: No known data errors
I used this[1] guide for the setup.

disk0 is a partition on ad4 and disk1 a partition on ad6:
root(a)kg-f2# dmesg | grep ^ad
ad4: 238475MB <SAMSUNG HD252HJ 1AC01118> at ata2-master SATA300
ad6: 238475MB <SAMSUNG HD252HJ 1AC01118> at ata3-master SATA300
ad8: 953869MB <SAMSUNG HD103SJ 1AJ100E4> at ata4-master SATA300
ad10: 953869MB <SAMSUNG HD103SJ 1AJ100E4> at ata5-master SATA300
ad12: 953869MB <SAMSUNG HD103SJ 1AJ100E4> at ata6-master SATA300
ad14: 953869MB <SAMSUNG HD103SJ 1AJ100E4> at ata7-master SATA300
ada0 at siisch0 bus 0 scbus0 target 0 lun 0
ada0: <SAMSUNG HD103SJ 1AJ100E4> ATA/ATAPI-8 SATA 2.x device
ada0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO size 8192bytes)
ada0: Command Queueing enabled
ada0: 953869MB (1953525168 512 byte sectors: 16H 63S/T 16383C)

and the rest are five disks for the storage pool (not set up yet).
Question: should I use gpart to create partitions on the data disks, or
is there a better way?
(I'm not very familiar with zfs yet)

References:
1) http://wiki.freebsd.org/RootOnZFS/GPTZFSBoot/Mirror
--
Torfinn Ingolfsen,
Norway
From: Michael Sierchio on
Torfinn Ingolfsen wrote:

> Question: should I use gpart to create partitions on the data disks, or
> is there a better way?

No, you should use whole disks, because ZFS can enable write caching
and do other nice things. And you can designate hot spares - I don't
know if autoreplace works in FreeBSD yet, but it is a great feature
of zfs pools.

Write caching is always safe because of the copy-on-write method, zfs
avoids the write hole that exists with normal raid devices.

If you are sure you want to go with mirrors, stick with mirrors. It
doesn't work as well to have different storage types in a pool (raidz1
and mirror, for example). zpool will discourage you from doing it by
preventing you unless you force it.


From: Torfinn Ingolfsen on
Michael Sierchio wrote:
> Torfinn Ingolfsen wrote:
>
>> Question: should I use gpart to create partitions on the data disks, or
>> is there a better way?
>
> No, you should use whole disks, because ZFS can enable write caching
> and do other nice things. And you can designate hot spares - I don't
> know if autoreplace works in FreeBSD yet, but it is a great feature
> of zfs pools.

Ok. Do I labele the disks with glabel, or what?

> If you are sure you want to go with mirrors, stick with mirrors. It
> doesn't work as well to have different storage types in a pool (raidz1
> and mirror, for example). zpool will discourage you from doing it by
> preventing you unless you force it.

Aha. I am not trying to put the data disks in the same pool as the
system disks - I will create a separate pool for them. I guess I'll use
raidz1.

--
Torfinn Ingolfsen,
Norway