[Bug 204093] [zfs] Overflowing the max path for ZFS snapshot automount leaves the zfs in an busy state

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Oct 28 15:26:01 UTC 2015


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=204093

            Bug ID: 204093
           Summary: [zfs] Overflowing the max path for ZFS snapshot
                    automount leaves the zfs in an busy state
           Product: Base System
           Version: 10.2-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs at FreeBSD.org
          Reporter: matthew at FreeBSD.org

To reproduce, set up a zfs with snapshots like so:

{{{
# zfs list -t all -r tank/.......1
NAME                    USED  AVAIL  REFER  MOUNTPOINT
tank/.......1
                     19K   769G    19K  /.......1
tank/.......1 at ....3.........4.........5.........6.........7.........8........
                     0      -    19K  -
tank/.......1 at ....3.........4.........5.........6.........7.........8.........
                     0      -    19K  -
tank/.......1 at ....3.........4.........5.........6.........7.........8.........9.........0
                     0      -    19K  -
}}}

These names are carefully calculated to hit or exceed the 88 character limit on
mountpoint path lengths when
the snapshots are automounted

Now, doing something that would cause the snapshots to automount leads to the
expected 'name too long' errors:

{{{
# find /.......1/.zfs/snapshot
/.......1/.zfs/snapshot
find:
/.......1/.zfs/snapshot/....3.........4.........5.........6.........7.........8.........:
File name too long
/.......1/.zfs/snapshot/....3.........4.........5.........6.........7.........8........
/.......1/.zfs/snapshot/....3.........4.........5.........6.........7.........8......../aaa
/.......1/.zfs/snapshot/....3.........4.........5.........6.........7.........8......../aaa/bbb
/.......1/.zfs/snapshot/....3.........4.........5.........6.........7.........8......../aaa/bbb/ccc
find:
/.......1/.zfs/snapshot/....3.........4.........5.........6.........7.........8.........9.........0:
File name too long
}}}

This is all as expected.  Problem is that now the tank/.......1 zfs is left in
a busy state:

{{{
# zfs destroy -r tank/.......1
cannot unmount '/.......1': Device busy
}}}

Needs a forced unmount to do anything with it:
{{{
# zfs umount -f /.......1
}}}

I'd expect that other than an error message there wouldn't be any side effects
of failing to automount
a snapshot due to overflowing the maximum allowed path length.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list