[patch] sysutils/beadm
Bryan Drewery
bdrewery at FreeBSD.org
Mon Mar 10 21:11:20 UTC 2014
On 2014-02-13 16:19, Andrew Hotlab wrote:
> First of all, thank you very much for the good work with this port.
> I'm sure it's changing the life of a lot FreeBSD system
> administrators!
>
> In my setup I have the following layout (several datasets for /usr,
> /var, etc.):
>
> NAME USED AVAIL REFER MOUNTPOINT
> sys 1.55G 18.0G 31K none
> sys/ROOT 532M 18.0G 31K none
> sys/ROOT/default 114K 18.0G 250M /
> sys/ROOT/default/tmp 22K 18.0G 38K /tmp
> sys/ROOT/default/usr 1K 18.0G 245M /usr
> sys/ROOT/default/var 48.5K 18.0G 36.4M /var
> sys/swap 1.03G 19.0G 16K -
>
> At this moment the utility does not seems to be able to manage this
> scheme, since it sets the mountpoint property as "legacy" for all
> datasets under the root, thus preventing to automatically mount any
> subdirectory at boot.
> I've tested this simple solution (to let do the job to the canmount
> property), and it seems to solve the problem without affecting the
> behavior when all system folders are located under a single root
> dataset (please see the patch below). I'd be glad if you'll include it
> in the next port revision.
>
> I'm at your disposal for any further detail.
>
> Best regards.
>
> Andrew
>
>
> --- ./beadm 2014-01-11 17:08:31.112384992 +0100
> +++ /usr/local/sbin/beadm 2014-01-11 17:06:38.620706860 +0100
> @@ -505,7 +505,7 @@
> if [ ${MOUNT} -eq 0 ]
> then
> zfs umount ${POOL}/${BEDS}/${2}
> - zfs set mountpoint=legacy ${POOL}/${BEDS}/${2}
> + zfs set mountpoint=/ ${POOL}/${BEDS}/${2}
I've tested this and agree with it. It should be added upstream as it
makes it simpler to have these extra /mounts. Otherwise you have to
explicitly set them with mountpoint=/usr, /var, instead of inheriting
from the / dataset.
The problems I mentioned were probably before we got the 'canmount'
support in to prevent remounting over /.
> fi
> fi
> if ! zpool set bootfs=${POOL}/${BEDS}/${2} ${POOL} 1> /dev/null 2>
> /dev/null
> @@ -518,6 +518,7 @@
> ZFS_LIST=$( zfs list -H -o name -r ${POOL}/${BEDS} )
> # disable automatic mount on all inactive boot environments
> echo "${ZFS_LIST}" \
> + | grep -v "^${POOL}/${BEDS}$" \
Note that this change is unrelated.
> | grep -v "^${POOL}/${BEDS}/${2}$" \
> | grep -v "^${POOL}/${BEDS}/${2}/" \
> | while read NAME
--
Regards,
Bryan Drewery
More information about the freebsd-ports
mailing list