snapshot mounting limits - clarification of FreeNAS guide?

Status
Not open for further replies.

Stilez

Guru
Joined
Apr 8, 2016
Messages
529
Section 1.1 of the FreeNAS guide mentions four filename/path length limits for the current version. The first is accompanied by an example, the second is clear from description, but the third and fourth aren't very helpful:
Mounted Filesystem Paths - 88 bytes
Mounted filesystem path length (MNAMELEN). Longer paths can prevent a device from being mounted.

Device Filesystem Paths - 63 bytes
devfs(8) device path lengths (SPECNAMELEN). Longer paths can prevent a device from being created.
which to me are not exactly clear.

It would help me a lot to have an example. Suppose we have a setup like this:
  • Nested dataset: tank/dataset1/dataset2
  • Snapshot name: tank/dataset1/dataset2@manualsnap_20180112-180000
  • Top level dataset mountpoint: /mnt/dataset1 as usual.

    (The paths and filenames are just placeholders for the example and could be longer or shorter)
Then my questions are:
  1. If I want to avoid issues with ls /mnt/tank/dataset1/dataset2/.zfs/snapshot/manualsnap_20180112-180000/ and its subdirs, and I want to be able to directly ls into its subdirs and access files within them, which part of that path mustn't hit the 63/88 char limits?
  2. If the path above is too long and for whatever reason it's inconvenient to rename anything, I can manually mount the snapshot instead ( mount -f zfs tank/dataset1/dataset2@manualsnap_20180112-180000 /mnt/TEMP_MOUNT_DIR). If it successfully mounts, then only the 255/1024 normal limits affect my use of it. But which parts of the command must be within 63/88 chars for mount to succeed? Do the 63/88 character limits apply to the ZFS dataset's path (the first path arg), or the mountpoint's path (the second path arg), or what limits apply to them?
Thanks - this would be very helpful to be clear about.
 
D

dlavigne

Guest
The docs team is still waiting to get a clear definition of those 2 so we can add examples. If anyone knows, we're all ears :smile:
 

Stilez

Guru
Joined
Apr 8, 2016
Messages
529
Please, and thanks in advance - I look forward to hearing the answer, as it would be very useful :)
 

Stilez

Guru
Joined
Apr 8, 2016
Messages
529
The docs team is still waiting to get a clear definition of those 2 so we can add examples. If anyone knows, we're all ears :)
I did some experimenting, and have updated the docs to reflect what I found. I got exactly the 88 char limit in both cases, after allowing for a trailing slash (or zero, or whatever it was internally!). See https://github.com/freenas/freenas-docs/pull/54
 
Status
Not open for further replies.
Top