ZFS zfs list MOUNTPOINT none

I have installed FreeBSD 14 on a single disk. I then created a mirror with a second disk. I have now:

Code:
# gpart show
=>         40  15628053088  ada0  GPT  (7.3T)
           40         1024     1  freebsd-boot  (512K)
         1064    536870912     2  freebsd-swap  (256G)
    536871976  14881390592     3  freebsd-zfs  (6.9T)
  15418262568    209790560        - free -  (100G)

=>         40  15628053088  ada1  GPT  (7.3T)
           40         1024     1  freebsd-boot  (512K)
         1064    536870912     2  freebsd-swap  (256G)
    536871976  14881390592     3  freebsd-zfs  (6.9T)
  15418262568    209790560        - free -  (100G)

And:

Code:
# zpool status
  pool: root
 state: ONLINE
  scan: resilvered 2.20G in 00:00:06 with 0 errors on Sat Dec 16 03:10:20 2023
config:

    NAME        STATE     READ WRITE CKSUM
    root        ONLINE       0     0     0
      mirror-0  ONLINE       0     0     0
        ada0p3  ONLINE       0     0     0
        ada1p3  ONLINE       0     0     0

But this doesn't seem right:

Code:
# zfs list
NAME   USED  AVAIL  REFER  MOUNTPOINT
root  1.99G  6.79T  1.99G  none

On the other hand, /etc/fstab shows the mountpoint:

Code:
# cat /etc/fstab
# Device    Mountpoint    FStype    Options    Dump    Pass#
root        /            zfs        rw    0    0
/dev/ada0p2    none        swap    sw    0    0

Is this correct? Shouldn't the command zfs list show "/" as MOUNTPOINT?
 
How did the entry wind up in /etc/fstab? By default, from an install, there should not be any entry in fstab for ZFS stuff.
as root can you provide the output of "zpool history root"?
 
Thank you for the quick reply. Here it is:

Code:
# zpool history root
History for 'root':
2023-12-15.16:11:28 zpool create -f -m none -o cachefile=/tmp/bsdinstall_boot/zfs/zpool.cache root /dev/ada0p3
2023-12-16.03:10:15 zpool attach -f root ada0p3 ada1p3

I see, I must have read the wrong recipe...
 
How did you do the install? Did you drop to a shell and manually partition things or follow some other procedure?

My reason for asking is the installer can create a "root on ZFS" installation and all you should need to do is select that, maybe select UEFI or BIOS for booting. That swap seems to be a bit bigger than I'd expect the installer to create, but if the swap size is tied to the size of the device it may be ok.
 
Can't remember now, but must have partitioned manually. I did not want the entire disk be used which is what the automatic installer option would do.
 
Can't remember now, but must have partitioned manually. I did not want the entire disk be used which is what the automatic installer option would do.
I don't this this is correct. Last time I did a full install (probably late 12 or early 13) it did everything correctly all by itself.
 
I think it is not correct, just because of the line in fstab it is not necessary for you to specify anything. I have an installation of FreeBSD 13.0 in mirror mode, I installed it with the installation menu that the ISO has.

But you can consult this document, where you can see the procedure to do a mirror installation of FreeBSD:

Installing FreeBSD Root on ZFS (Mirror) using GPT

As I understand it, you only have to create the partition table, as you have it in ada0, the same in ada1. You do not have to create the datasheets since all of this will be replicated when you join ada1p3 with ada0p3 in mirror mode, you would only have to add ada1p2, which is the swap partition, to fstab, and delete that entry from zroot.

I think that would be enough.
 
The pool is created as root, that first filesystem mount point would have been /root. That's root's home directory.
 
The pool is created as root, that first filesystem mount point would have been /root. That's root's home directory.
That wouldn't work well.
The way as this is now, it looks like a functionally working configuration, could make sense, but is nonstandard..

Concerning the initial question: there are generally two ways to mount ZFS:
  1. configure the mountpoint property, and zfs will do the mount by itself, and nothing is in fstab. This is the standard way.
  2. configure the mountpoint to "none", have an entry in fstab and mount via that. That is perfectly possible, but not standard.
It gets more complicated here because this is the root filesystem. There is a standard way to do root-on-zfs.
This one here will not allow boot-environments. But if it otherwise works and suits the needs, I think it can be used.
 
zfs list | grep legacy
returns :
Code:
ZT2/ROOT/14.0-RELEASE-p3_2024-01-07_120956                                      40K   232G  25.7G  legacy
ZT2/ROOT/14.0-RELEASE-p3_2024-01-07_121012                                      56K   232G  25.7G  legacy
ZT2/ROOT/14.0-RELEASE_2024-01-07_120624                                         40K   232G  25.7G  legacy
ZT2/ROOT/14.0-RELEASE_2024-01-07_120712                                         56K   232G  25.7G  legacy
ZT2/ROOT/default                                                               154G   232G  30.2G  legacy
Only the last one is mounted. It's mounted on /
 
Back
Top