Setting up ZFS - Filesystem Properties and Installing on Root
apseudoutopia at gmail.com
Mon Nov 21 04:04:05 UTC 2011
I'll be setting up a server with ZFS on 9.0-RELEASE (when it's
released...). I've never used ZFS before, and although I've been
reading quite a bit about it, I have some questions.
My plan is to use RAID-Z1 across 4 disks. I'll be using GPT, and I
would like the root to be ZFS as well. I found a guide:
In step #4, it has you create boot, swap, and zfs partitions on all 3
(which would be 4 in my case) disks. Then, in step #5, you install the
bootloader into all 3 (4) drives. Why do you need boot and swap
partitions on EACH disk? It seems to me that you would only need disk
1 to have boot, swap, and zfs, and the other 3 disks only have one
partition (using the entire drive) for zfs's pool. Does it have to do
with the RAIDZ1 setup? Even then, I don't understand it because it's
not disk mirroring, it's RAID. The BIOS is set to look on one specific
disk for the loader, not all of them. It seems I'm not understanding
something entirely here.
Also, with ZFS, you can have an unlimited number of filesystems,
correct? I've been trying to figure out the best way to create these
filesystems with the appropriate flags (specifically: atime,
compression, devices, exec, quota, readonly, and setuid). If, for
example, I set devices=off and suid=off on the tank/var filesystem, it
is applied to the children filesystem, such as, /var/log, /var/db, and
so on? The flags/properties can be changed on-the-fly, correct? If,
for example, I set a filesystem noexec, but later realize I need exec,
I can change it without issue?
Does anyone with zfs experience have any tips on creating a filesystem
layout, in terms of which filesystems to create and what
flags/properties? Would it be bad to set noatime, nosuid, nodev, and
noexec all on the tank, then allow each property appropriately for
each directory as necessary? As in, set the whole tank noexec, but
allow exec for /bin, /usr/home, /usr/local/bin, etc.?
Thank you all very much!
More information about the freebsd-questions