Bug #12144
openBug in ``df -t`` filtering if two filesystems use the same mountpoint
0%
Description
When using RAM disks for /tmp
and /var
on a ZFS installation, the System Information widget on the Dashboard appears to show multiple copies of /var
instead of the expected ZFS datasets mounted under /var
.
This is simple to reproduce:
1. Install fresh with ZFS
2. Enable RAM disks for /tmp and /var under System > Advanced, Misc with the default values
3. Reboot
This appears to be due to a bug in df -t <type>
.
The full output of df
is OK:
: df -Th Filesystem Type Size Used Avail Capacity Mounted on pfSense/ROOT/default zfs 29G 670M 28G 2% / devfs devfs 1.0K 1.0K 0B 100% /dev pfSense/cf zfs 28G 96K 28G 0% /cf pfSense/var zfs 28G 3.2M 28G 0% /var pfSense/home zfs 28G 96K 28G 0% /home pfSense zfs 28G 96K 28G 0% /pfSense pfSense/cf/conf zfs 28G 616K 28G 0% /cf/conf pfSense/var/log zfs 28G 188K 28G 0% /var/log pfSense/var/empty zfs 28G 96K 28G 0% /var/empty pfSense/var/cache zfs 28G 96K 28G 0% /var/cache pfSense/var/db zfs 28G 1.1M 28G 0% /var/db pfSense/var/tmp zfs 28G 104K 28G 0% /var/tmp /dev/md0 ufs 38M 76K 35M 0% /tmp /dev/md1 ufs 58M 9.5M 44M 18% /var devfs devfs 1.0K 1.0K 0B 100% /var/dhcpd/dev
Filtering to only UFS shows the expected entries for /tmp and /var:
: df -Tht ufs Filesystem Type Size Used Avail Capacity Mounted on /dev/md0 ufs 38M 76K 35M 0% /tmp /dev/md1 ufs 58M 9.5M 44M 18% /var
Filtering for ZFS shows multiple copies of /var and not the datasets:
: df -Tht zfs Filesystem Type Size Used Avail Capacity Mounted on pfSense/ROOT/default zfs 29G 670M 28G 2% / pfSense/cf zfs 28G 96K 28G 0% /cf /dev/md1 ufs 58M 9.5M 44M 18% /var pfSense/home zfs 28G 96K 28G 0% /home pfSense zfs 28G 96K 28G 0% /pfSense pfSense/cf/conf zfs 28G 616K 28G 0% /cf/conf /dev/md1 ufs 58M 9.5M 44M 18% /var /dev/md1 ufs 58M 9.5M 44M 18% /var /dev/md1 ufs 58M 9.5M 44M 18% /var /dev/md1 ufs 58M 9.5M 44M 18% /var /dev/md1 ufs 58M 9.5M 44M 18% /var
N.B. The /var lines show their type as ufs
which doesn't match what we asked for
This appears to be an upstream bug in df
but it would be nice if we could work out a fix before the next release, either on our own or by coordinating with the maintainer of df
in FreeBSD.