• ZFS mounting woes on Sol 11.3

    From Chuck@21:1/5 to All on Fri Feb 10 15:27:30 2023
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John D Groenveld@21:1/5 to All on Sat Feb 11 01:47:05 2023
    What's this output:
    # zfs list -r

    John
    groenveld@acm.org

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Grant Taylor@21:1/5 to Chuck on Sat Feb 11 09:31:43 2023
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John D Groenveld@21:1/5 to gtaylor@tnetconsulting.net on Sat Feb 11 20:10:25 2023
    In article <ts8g0u$f58$1@tncsrv09.home.tnetconsulting.net>,
    Grant Taylor <gtaylor@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
    groenveld@acm.org

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Chuck@21:1/5 to John D Groenveld on Sat Feb 11 19:14:55 2023
    On 2023-02-11 15:10, John D Groenveld wrote:
    In article <ts8g0u$f58$1@tncsrv09.home.tnetconsulting.net>,
    Grant Taylor <gtaylor@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
    groenveld@acm.org

    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Grant Taylor@21:1/5 to Chuck on Sat Feb 11 18:51:44 2023
    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.



    --
    Grant. . . .
    unix || die

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John D Groenveld@21:1/5 to cc.63dw@gmail.com on Sun Feb 12 13:34:15 2023
    In article <1742eb7448755709$2$3548892$3aa16cbb@news.newsdemon.com>,
    Chuck <cc.63dw@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
    groenveld@acm.org

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Chuck@21:1/5 to John D Groenveld on Tue Feb 14 14:29:05 2023
    On 2023-02-12 08:34, John D Groenveld wrote:
    In article <1742eb7448755709$2$3548892$3aa16cbb@news.newsdemon.com>,
    Chuck <cc.63dw@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

    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
    groenveld@acm.org

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Chuck@21:1/5 to Grant Taylor on Tue Feb 14 14:20:27 2023
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Grant Taylor@21:1/5 to Chuck on Tue Feb 14 13:11:59 2023
    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.

    :-)



    --
    Grant. . . .
    unix || die

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)