Project

General

Profile

Bug #11307

fs-minimal figures zfs mounts wrong in a zone

Added by John Levon 4 months ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:

Description

fs-minimal does something like:

readmnttab / < /etc/mnttab
if [ "$fstype" = zfs ] ; then
rootiszfs=1
be=$special
fi

...
if [ "$rootiszfs" = 1 ] ; then
/sbin/zfs list -rH -o mountpoint -s mountpoint -t filesystem $be | \
while read mountp ; do
if [ "x$mountp" != "x" -a "$mountp" != "legacy" ] ; then
mounted $mountp - zfs < /etc/mnttab && continue
/sbin/zfs mount $be$mountp
fi
done
fi

But in a zone, that "$special" is from something like:

  1. head -1 /etc/mnttab
    zones/7948c62d-f436-4b69-b29b-75dacc3b2b8e / zfs rw,nodevices,setuid,nonbmand,exec,xattr,noatime,dev=1690061 1562155667

So we'll then try to mount zones/7948c62d-f436-4b69-b29b-75dacc3b2b8e/zones/7948c62d-f436-4b69-b29b-75dacc3b2b8e

As we ignore the failure, it doesn't matter much, and it's dubious that it would even try?

Also available in: Atom PDF