Starting with ZFS on fresh install
Paul Kraus
paul at kraus-haus.org
Mon Jan 28 16:22:41 UTC 2013
On Jan 28, 2013, at 10:39 AM, Mike Clarke wrote:
> If you're going to be using ZFS then you'll probably be better off not having
> separate partitions and letting ZFS manage space allocation if you want to
> limit the size of /var or any other part of the system,
You can manage space within a ZFS pool, regardless of whether you give the zpool whole disks or a partition.
rootpool 6.13G 56.4G 31K none
rootpool/do-not-remove 31K 1024M 31K none
rootpool/root 5.01G 56.4G 5.01G /
rootpool/tmp 60.5K 56.4G 60.5K /tmp
rootpool/var 111M 56.4G 111M /var
Shows a system with a rootpool and within the rootpool three separate fielsyetms:
/ (root)
/var
/tmp
You can control space usage with the zfs quota property.
Note the rootpool/do-not-remove daatset. This has a quota and reservation of 1 GB. It's purpose is to permit recovery in case the zpool is accidentally filled. ZFS requires *some* free space top process file / directory remove operations. If the zpool is completely filled you will NOT be able to remove anything to free up space. By having a dataset with a quota and reservation of 1 GB, that space is already marked as used so it will not be allocated. If the remainder of the zpool fills, then you can quiet the system (so running processes don't steal the space you are about to free up), change the quota / reservation (I like going down to 512 MB), and then remove some files / directories to free up space.
Note that the zpool itself (rootpool) is NOT used as a dataset and is NOT mounted. My experience with ZFS under Solaris taught me that while you *can* use that dataset, if you have any child datasets (and any other datasets created will, by definition, be children of the rootpool) you will end up with hierarchical datasets. This means that future operations on datasets will have to take place in very specific order (such as mounting and un mounting). By avoiding hierarchical datasets (that are actually used) you avoid that complexity.
--
Paul Kraus
Deputy Technical Director, LoneStarCon 3
Sound Coordinator, Schenectady Light Opera Company
More information about the freebsd-questions
mailing list