Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ZFS mounting woes on Sol 11.3

13 views
Skip to first unread message

Chuck

unread,
Feb 10, 2023, 3:27:37 PM2/10/23
to
I have a home T2000 running Solaris 11.3, on which I created three zfs
filesystems (alice, bob, eve) with mountpoints /home/alice, /home/bob,
and /home/eve. On boot, the first two are mounted via zfs but the third
fails. Zfs reports that the mountpoint is not empty. Indeed, eve's
files are in /home/eve but why are they there?

Because zfs mount fails, all sorts of services thereafter fail.

I did experiment a bit with zfs but I do not remember (and did not
document) doing anything differently with eve. Here is some output that
may help.

root@hal:~# zfs mount
rpool/ROOT/solaris /
rpool/ROOT/solaris/var /var
rpool/VARSHARE /var/share
rpool/home/bob /home/bob
rpool/home/alice /home/alice
rpool /rpool
rpool/home /rpool/home
rpool/VARSHARE/zones /system/zones

So eve is not considered mounted by zfs.

root@hal:~# umount /home/eve
umount: warning: /home/eve not in mnttab
umount: /home/eve not mounted

So eve is not part of legacy mount/umount.

Advice/Help/Assistance requested.

John D Groenveld

unread,
Feb 10, 2023, 8:47:11 PM2/10/23
to
What's this output:
# zfs list -r

John
groe...@acm.org

Grant Taylor

unread,
Feb 11, 2023, 11:33:40 AM2/11/23
to
On 2/10/23 1:27 PM, Chuck wrote:
> Advice/Help/Assistance requested.

Please do a `find /home/eve` while rpool/home/eve is unmounted.

I want to say that I've had issues with zfs file systems not mounting
automatically if the mount point contained files.



--
Grant. . . .
unix || die

John D Groenveld

unread,
Feb 11, 2023, 3:10:35 PM2/11/23
to
In article <ts8g0u$f58$1...@tncsrv09.home.tnetconsulting.net>,
Grant Taylor <gta...@tnetconsulting.net> wrote:
>I want to say that I've had issues with zfs file systems not mounting
>automatically if the mount point contained files.

Absolutely.
My WAG is the OP created his eve user before creating the eve's home
directory filesystem.
useradd(1M) on the Solaris 11.4 supported branch has options to do
the right thing as does illumos useradd(8):
<URL:https://illumos.org/man/8/useradd>

John
groe...@acm.org

Chuck

unread,
Feb 11, 2023, 7:15:01 PM2/11/23
to
John, to answer your question:

root@hal:~# zfs list -r
NAME USED AVAIL REFER MOUNTPOINT
rpool 54.5G 12.4G 76.5K /rpool
rpool/ROOT 30.7G 12.4G 31K legacy
rpool/ROOT/solaris 30.5G 12.4G 20.8G /
rpool/ROOT/solaris-backup-1 96.1M 12.4G 16.2G /
rpool/ROOT/solaris-backup-1/var 1K 12.4G 222M /var
rpool/ROOT/solaris-backup-2 96.1M 12.4G 16.2G /
rpool/ROOT/solaris-backup-2/var 45K 12.4G 223M /var
rpool/ROOT/solaris/var 509M 12.4G 254M /var
rpool/VARSHARE 2.56M 12.4G 2.47M /var/share
rpool/VARSHARE/pkg 63K 12.4G 32K /var/share/pkg
rpool/VARSHARE/pkg/repositories 31K 12.4G 31K
/var/share/pkg/repositories
rpool/VARSHARE/zones 31K 12.4G 31K /system/zones
rpool/dump 4.06G 12.5G 3.94G -
rpool/home 17.7G 12.4G 31K /rpool/home
rpool/home/bob 279M 12.4G 279M /home/bob
rpool/home/alice 31K 12.4G 31K /home/alice
rpool/home/eve 1.94G 12.4G 1.94G /home/eve
rpool/swap 2.06G 12.5G 2.00G -


/home/eve has files in it and I cannot unmount it. Would you suggest
forcing an unmount?

Chuck

Grant Taylor

unread,
Feb 11, 2023, 8:53:42 PM2/11/23
to
On 2/11/23 5:14 PM, Chuck wrote:
> /home/eve has files in it and I cannot unmount it.

Why can't you unmount /home/eve? Is it because Eve is using the files
currently? Or is it that you've tried an unmount and it errored out for
some reason, possibly open files?

> Would you suggest forcing an unmount?

I always avoid /forced/ unmounting if at all possible.

Why are you wanting to unmount it? To see if there are files in the
underlying mount point?

I am more familiar with Linux than I am Solaris, so I'll say this: On
Linux, I would do a bind-mount of the /home directory on a different /
additional location (oft /mnt/bla) and then look therein (/mnt/bla/eve)
to access the underlying mount point without needing to unmount
anything. -- I don't know how to do similar in Solaris.

John D Groenveld

unread,
Feb 12, 2023, 8:34:21 AM2/12/23
to
In article <1742eb7448755709$2$3548892$3aa1...@news.newsdemon.com>,
Chuck <cc....@gmail.com> wrote:
>John, to answer your question:
>
>root@hal:~# zfs list -r
>NAME USED AVAIL REFER MOUNTPOINT

[snipped]

>rpool/home/eve 1.94G 12.4G 1.94G /home/eve

[snipped]

>/home/eve has files in it and I cannot unmount it. Would you suggest
>forcing an unmount?

# zfs umount -f rpool/home/eve
# find /home/eve

John
groe...@acm.org

Chuck

unread,
Feb 14, 2023, 2:20:33 PM2/14/23
to
On 2023-02-11 20:51, Grant Taylor wrote:
> On 2/11/23 5:14 PM, Chuck wrote:
>> /home/eve has files in it and I cannot unmount it.
>
> Why can't you unmount /home/eve? Is it because Eve is using the files
> currently? Or is it that you've tried an unmount and it errored out for
> some reason, possibly open files?
"zfs unmount rpool/home/eve" reports that /home/eve is not mounted and
"zfs get all rpool/home/eve" confirms this. Alice, Bob, and Eve are
test users and root is the only user signed on. (I thought those names
better than user[123].)


>> Would you suggest forcing an unmount?
>
> I always avoid /forced/ unmounting if at all possible.
Point taken.


> Why are you wanting to unmount it? To see if there are files in the
> underlying mount point?
>
> I am more familiar with Linux than I am Solaris, so I'll say this: On
> Linux, I would do a bind-mount of the /home directory on a different /
> additional location (oft /mnt/bla) and then look therein (/mnt/bla/eve)
> to access the underlying mount point without needing to unmount
> anything. -- I don't know how to do similar in Solaris.
There is no bind option in Solaris umount.

What is confusing me is that there are files in /home/eve but zfs
considers /home/eve unmounted. Whence those files? But you have given
me an idea.

C.

Chuck

unread,
Feb 14, 2023, 2:29:11 PM2/14/23
to
As I replied to Grant, zfs thinks that rpool/home/eve is not mounted and
a forced unmount told me the same thing.

1. I backed up eve.
2. I renamed /home/eve to /home/eve2 (via mv).
3. I tried mounting rpool/home/eve via zfs. It succeeded.
4. I noticed that there were files in /home/eve that had been removed
earlier. So /home/eve was an earlier copy of /home/eve2.
5. I unmounted /home/eve and deleted /home/eve2.
6. I can now (un)mount /home/eve without incident.

It seems that somehow, I covered /home/eve with another copy.
Disconcerting as to where the other copy came from.

Thanks to you and Grant for your help.

C.

>
> John
> groe...@acm.org

Grant Taylor

unread,
Feb 14, 2023, 3:13:59 PM2/14/23
to
On 2/14/23 12:20 PM, Chuck wrote:
> "zfs unmount rpool/home/eve" reports that /home/eve is not mounted and
> "zfs get all rpool/home/eve" confirms this.

Okay.

What does `find /home/eve` show while rpool/home/eve is unmounted?

> Alice, Bob, and Eve are test users and root is the only user signed on.
> (I thought those names better than user[123].)

;-)

> Point taken.

:-)

> There is no bind option in Solaris umount.

That sort of surprises me.

I make extensive use of bind mounts in Linux.

I assumed that Solaris had something similar and I was simply ignorant
of it.

> What is confusing me is that there are files in /home/eve but zfs
> considers /home/eve unmounted.  Whence those files?

I'm not aware of anything that prevents files from being placed in the
/home/eve directory used as a mount point for another file system
(rpool/home/eve). Especially buy root who should have permission to
write to the directory, or can do so by force.

> But you have given me an idea.

:-)
0 new messages