Solved fstab question

Hello,

I have installed FreeBSD 10 using the ZFS file system. My question is: is it normal that my /etc/fstab is blank? Should I have anything in there?

Thank you
Fred
 
If you have no swap space then it is normal for a full ZFS system to have a blank /etc/fstab. If you do have a partition set aside for swap, that will need adding.
 
Yep, ZFS doesn't need or require /etc/fstab. So if there are no other filesystems it would indeed be empty.
 
Thank you usdmatt, this what I had in my script in regard to swap:
Code:
zfs create -V 1G zroot/swap
zfs set org.freebsd:swap=on zroot/swap
zfs set checksum=off zroot/swap
zfs set copies=1 zroot/swap

Does this mean that I need to add the following in my /etc/fstab?
Code:
zroot/swap                       /swap                      zfs     rw      0       0

Or is it not needed?
 
Ah no, because you've set the
Code:
org.freebsd:swap=on
property, the swap device will be created automatically on boot by the ZFS rc script.

If you didn't set that property, you can mount swap using fstab, by adding an entry for /dev/zvol/zroot/swap, but you don't need to, and it generally makes more sense to use the property like you have done (For one it means you don't have to remember to edit /etc/fstab if you ever remove the swap dataset from ZFS).

In my first post I was talking more about if you have a completely separate disk partition (such as /dev/ad0p1) set aside for swap, that is unrelated to the pool.
 
Back
Top