Project

General

Profile

Bug #25713

Document share name length limitation

Added by Keysource Keysource over 3 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
No priority
Assignee:
Warren Block
Category:
Documentation
Target version:
Seen in:
Severity:
New
Reason for Closing:
Reason for Blocked:
Needs QA:
Yes
Needs Doc:
Yes
Needs Merging:
Yes
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

When a snapshot name is too long because of the concatenation of volume name + parent dataset name + dataset_name + snapshot name with to much long volume/datasets names the snapshot was not available into the Samba share.
For example if you create a volume called customer-vol-zpool-01 with a dataset named customer-dts-sambashares-01 and a child dataset named customer-dts-mypublicshare-01 then you create a automatic snapshot task with recursive option set on on customer-dts-sambashares-01 and share the dataset dts-mypublicshare-01 you not able to see any snapshots on this share.
If you try to listen the .zfs/snapshot directory with the ls command on the NAS for the dataset customer-mypublicshare-01 you got a "File name too long" on this directory.

History

#1 Updated by Dru Lavigne over 3 years ago

  • Assignee changed from Release Council to Timur Bakeyev

Timur: do you know the character limitation for the path? If so, we'll add it to the Guide.

#2 Updated by Timur Bakeyev over 3 years ago

  • Status changed from Unscreened to 15
  • Target version set to N/A

A lot of system limits are defined in the /usr/include/sys/syslimits.h, in particular PATH_MAX:

#define PATH_MAX                 1024   /* max bytes in pathname */

This defines the maximum size of a string with single pathname. There is a correlated NAME_MAX limit, that defines how much single element of the pathname aka filename(or directory name) may take:

#define NAME_MAX                  255   /* max bytes in a file name */

But that's not the end of the story. Path for the mounted ZFS dataset or any other mounted filesystem can't exceed MNAMELEN according to /usr/include/sys/mount.h:

#define MNAMELEN        88              /* size of on/from name bufs */
...
        char      f_mntfromname[MNAMELEN];  /* mounted filesystem */
        char      f_mntonname[MNAMELEN];    /* directory on which mounted */

I believe that the user actually experienced that limitation, as hitting 1024 bytes limit is quite hard.

It's amusing that the problem exists at least since 2010 - https://lists.freebsd.org/pipermail/freebsd-fs/2010-March/007964.html.

The good thing is that it's going to be finally addressed in FreeBSD 12.x https://lists.freebsd.org/pipermail/freebsd-fs/2017-April/024684.html

#3 Updated by Timur Bakeyev over 3 years ago

  • Status changed from 15 to Reviewed by Developer
  • Assignee changed from Timur Bakeyev to Release Council

#4 Updated by Dru Lavigne over 3 years ago

  • Category changed from OS to Documentation
  • Assignee changed from Release Council to Warren Block
  • Target version changed from N/A to 11.1

Warren: please add a note to the Guide with a comment that we can remove it once we move to 12.

#5 Updated by Dru Lavigne over 3 years ago

  • Subject changed from Shadow Copy not available when snapshot file name is too long to Document share length limitation
  • Status changed from Reviewed by Developer to Unscreened

#6 Updated by Ash Gokhale over 3 years ago

VBG-218-91728 appears to be related

#7 Updated by Warren Block over 3 years ago

  • Subject changed from Document share length limitation to Document share name length limitation
  • Status changed from Unscreened to Resolved

A note on path and name length limitations has already been added in https://github.com/freenas/freenas-docs/commit/1f92e004a5b47a9f4a01a4a3faa088c9ff462191
Live version at: http://doc.freenas.org/11/intro.html#path-and-name-lengths

I'm hesitant to add a note about FreeBSD 12 fixing this because there is no firm timeline for when it will be available.

#8 Updated by Dru Lavigne over 3 years ago

  • Target version changed from 11.1 to 11.0-U3

Also available in: Atom PDF