Project

General

Profile

Bug #7086

stale zfs file systems

Added by Ekki Gehm 7 months ago. Updated 5 months ago.

Status:
Resolved
Priority:
Normal
Category:
Installer
Target version:
Start date:
01/05/2017
Due date:
% Done:

100%

Affected version:
Affected Architecture:

Description

I am not sure if this is a bug or a feature. Seems the 'Auto install'-values are used from the native FreeBSD while pfSense installs only in a part of it. anyways: executing a 'zfs mount -a' could cause a problem...

While after boot this is the situation:

  1. df
    Filesystem 1K-blocks Used Avail Capacity Mounted on
    zroot/ROOT/default 233633892 613456 233020436 0% /
    devfs 1 1 0 100% /dev
    /dev/md0 3484 120 3088 4% /var/run
    devfs 1 1 0 100% /var/dhcpd/dev
    devfs 1 1 0 100% /cf/named/dev

But: There are some unused file systems in the pool...

#zfs list
NAME USED AVAIL REFER MOUNTPOINT
zroot 601M 222G 96K /zroot
zroot/ROOT 599M 222G 96K none
zroot/ROOT/default 599M 222G 599M /
zroot/tmp 96K 222G 96K /tmp
zroot/usr 384K 222G 96K /usr
zroot/usr/home 96K 222G 96K /usr/home
zroot/usr/ports 96K 222G 96K /usr/ports
zroot/usr/src 96K 222G 96K /usr/src
zroot/var 604K 222G 96K /var
zroot/var/audit 96K 222G 96K /var/audit
zroot/var/crash 96K 222G 96K /var/crash
zroot/var/log 124K 222G 124K /var/log
zroot/var/mail 96K 222G 96K /var/mail
zroot/var/tmp 96K 222G 96K /var/tmp

Associated revisions

Revision fcf164d6
Added by Renato Botelho 6 months ago

Make sure all ZFS volumes are mounted during boot and only mount /var and /tmp when MFS is disabled. Fixes #7086

Revision 5d81840b
Added by Renato Botelho 6 months ago

Fix #7086: Copy files over from /var before umount it and move to MFS

History

#1 Updated by Jim Thompson 7 months ago

  • Assignee set to Renato Botelho

#2 Updated by Renato Botelho 6 months ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100

I've reviewed which volumes are created during install on ZFS and also made changes on rc script to mount /var and /tmp from ZFS or memory depending of the MFS config option.

It's necessary a fresh install to test it

#3 Updated by Tobias Wigand 6 months ago

Tried a fresh install, maybe there is a problem with this change?
It gave me

pkg: No package(s) matching pfSense-kernel-*

More info here:

https://forum.pfsense.org/index.php?topic=123616.msg686279#msg686279

#4 Updated by Renato Botelho 6 months ago

  • Status changed from Feedback to Assigned

Yes, it broke ZFS install and I see why. I'll push a fix soon

#5 Updated by Renato Botelho 6 months ago

  • Status changed from Assigned to Feedback

A fresh install using next round of snapshots is required to validate the fix. Thanks!

#6 Updated by Tobias Wigand 6 months ago

Fresh install worked without problems. Can't say anything about the original problem, not enough knowledge in that area, sorry.
The System Information Widget seems to show unnecessary partitions now, though. More on an updated install, less on a fresh install, but I don't think they should show at all.
Do we need to reinstall old ZFS installations or can we fix them manually regarding the problems in this bug?

#7 Updated by Renato Botelho 6 months ago

Tobias Wigand wrote:

Fresh install worked without problems. Can't say anything about the original problem, not enough knowledge in that area, sorry.
The System Information Widget seems to show unnecessary partitions now, though. More on an updated install, less on a fresh install, but I don't think they should show at all.
Do we need to reinstall old ZFS installations or can we fix them manually regarding the problems in this bug?

Unfortunately they need to be reinstalled

#8 Updated by Vladimir Putin 6 months ago

What are the risks to continue using updated versions without reinstall?

#9 Updated by Renato Botelho 6 months ago

Vladimir Putin wrote:

What are the risks to continue using updated versions without reinstall?

There are no risks, it will only show a lot of different partitions. If you install a snapshot with my first attempt to fix, that didn't work, you will have the problem reported in https://redmine.pfsense.org/issues/7086#note-3

#10 Updated by Vladimir Putin 6 months ago

Thank you.

#11 Updated by Jim Pingle 5 months ago

  • Status changed from Feedback to Resolved

Looks good now, only has a few expected entries.

Also available in: Atom PDF