[Trac-bugs] [PC-BSD Trac] #346: Cannot create /usr and /usr/ports as ZFS mountpoints during installation

PC-BSD trac at pcbsd.org
Fri Aug 13 23:43:44 PDT 2010

#346: Cannot create /usr and /usr/ports as ZFS mountpoints during installation
 Reporter:  gja            |       Owner:  kris
     Type:  System Defect  |      Status:  new 
 Priority:  major          |   Milestone:      
Component:  Installer      |     Version:  8.1 
 Keywords:                 |  
 Installing PCBSD 8.1 from x64 DVD.

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

 - UFS 1G for /boot[[BR]]
 - SWAP of 8G[[BR]]
 - 'basic' ZFS of the rest for /home, /var, /tmp, /, /usr, /usr/ports and

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

 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

 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.


Ticket URL: <https://trac.pcbsd.org/ticket/346>
PC-BSD <http://trac.pcbsd.org>
PC-BSD Project Management

More information about the Trac-bugs mailing list