Page 1 of 1

ZFS Snapshots - File name too long

Posted: 22 Jul 2013 09:43
by effgee
Having an issue with datasets and snapshots.
Basically for some reason, snapshots in .zfs directories can't be listed either in the console or in a samba share. I get this errors

nas4free: snapshot # pwd
/mnt/usb-backup/Daily-Backups/mypool/home/andreas/.zfs/snapshot
nas4free: snapshot # ls -la
ls: 20130721_1829_autosnap_HOURLY: File name too long
ls: 20130721_2330_autosnap_HOURLY: File name too long
ls: 20130722_0936_autosnap_HOURLY: File name too long
total 0
dr-xr-xr-x 5 root wheel 5 Jul 22 10:11 .
dr-xr-xr-x 4 root wheel 4 Jul 6 00:26 ..
nas4free: snapshot # ls
ls: 20130721_1829_autosnap_HOURLY: File name too long
ls: 20130721_2330_autosnap_HOURLY: File name too long
ls: 20130722_0936_autosnap_HOURLY: File name too long


All I found is a few mentions of this about 3-4 years ago and no resolutions.
Anyone have a clue?

Re: ZFS Snapshots - File name too long

Posted: 22 Jul 2013 22:40
by kkd
http://en.wikipedia.org/wiki/Comparison_of_file_systems

so i think the limit is 255 chars.
try to compress the files, or rename the directories to shorter names.

Re: ZFS Snapshots - File name too long

Posted: 22 Jul 2013 23:06
by Onichan
kkd wrote:http://en.wikipedia.org/wiki/Comparison_of_file_systems

so i think the limit is 255 chars.
try to compress the files, or rename the directories to shorter names.
That says the name limit is 255, not the directory. So I don't think renaming the directory will help, but I would agree it seems like some filename is too long.

Re: ZFS Snapshots - File name too long

Posted: 23 Jul 2013 06:31
by kkd
Onichan wrote:
kkd wrote:http://en.wikipedia.org/wiki/Comparison_of_file_systems

so i think the limit is 255 chars.
try to compress the files, or rename the directories to shorter names.
That says the name limit is 255, not the directory. So I don't think renaming the directory will help, but I would agree it seems like some filename is too long.
if (length(dirs) + length(filename))>255 then error="filename is too long" ;)

Re: ZFS Snapshots - File name too long

Posted: 23 Jul 2013 16:35
by raulfg3
But example is not the case: 59 + 29 =88 less than 255. So user problem is other ( i do not know what)

Re: ZFS Snapshots - File name too long

Posted: 24 Jul 2013 06:07
by fsbruva
UTF-8 doesn't always use a single byte per character.

Try copying one of the snapshots to another file location, and see if you can "ls" it then.