Opened 5 years ago

Closed 3 years ago

#346 closed System Defect (fixed)

Cannot create /usr and /usr/ports as ZFS mountpoints during installation

Reported by: gja Owned by: kris
Priority: major Milestone:
Component: Installer Version: 8.1
Keywords: Cc: trac-bugs@…


Installing PCBSD 8.1 from x64 DVD.

Used the GUI to set up the following custom partitioning on ad0s1:

  • UFS 1G for /boot
  • SWAP of 8G
  • 'basic' ZFS of the rest for /home, /var, /tmp, /, /usr, /usr/ports and /Programs

(arguably a not-unreasonable configuration so one can later set separate ZFS quotas on each mountpoint's file system, and compression on /usr/ports)

The key problem in the above turns out to be specifying /usr/ports as a mountpoint for the ZFS pool.

Installer correctly creates tank0 with all the stipulated mountpoints (including tank0/usr/ports) then proceeds through "pc-sysinstall: Starting Extraction" and "pc-sysinstall: Extraction Finished" steps.

However, during final tidying up and resetting of ZFS mountpoints, the installer barfs when attempting "zfs set mountpoint=/usr/ports tank0/usr/ports".

Seems that the backend creates tank0/usr and tank0/usr/ports in the correct order. From pc-sysinstall.log:

zfs create -p tank0/usr
Running: zfs create -p tank0/usr
Running: zfs set mountpoint=/mnt/usr tank0/usr
Running: zfs set atime=off tank0/usr
zfs create -p tank0/usr/ports
Running: zfs create -p tank0/usr/ports
Running: zfs set mountpoint=/mnt/usr/ports tank0/usr/ports
Running: zfs set atime=off tank0/usr/ports

It tries to reset the mountpoints in the reverse order:

Running: zfs set mountpoint=/var tank0/var
Running: zfs unmount tank0/var
Running: zfs set mountpoint=/usr/ports tank0/usr/ports
cannot mount '/usr/ports': failed to create mountpoint
property may be set but unable to remount filesystem
Error 1: zfs set mountpoint=/usr/ports tank0/usr/ports

I surmise that because /usr/ports doesn't exist in the 'real' file system (or perhaps because /usr is a UFS file system at this point in the installation process), the "zfs set mountpoint=/usr/ports tank0/usr/ports" fails in an unexpected way, causing the entire installation to abort.

(Would this be helped by including a "mkdir -p" before each "zfs set mountpoint" to ensure the target exists?)

Or perhaps there's some other explanation. Anyway, hope this helps.


Change History (3)

comment:1 Changed 5 years ago by gja

The title is perhaps misleading -- I've quite happily created /usr as a ZFS mountpoint during PCBSD 8.1 installations, just not when coupled with adding /usr/ports as another mountpoint.

comment:2 Changed 3 years ago by dlavigne

Is this still an issue with 9.0?

comment:3 Changed 3 years ago by kenmoore

  • Resolution set to fixed
  • Status changed from new to closed

Closing this ticket as it does not appear to be an issue with the PC-BSD 9.1 installer (did not test 9.0 installer)

Note: See TracTickets for help on using tickets.