SMB, special characters, Mac...

Status
Not open for further replies.

Sean Hafeez

Dabbler
Joined
Jun 23, 2014
Messages
31
So I am trying to switch from mixed NFS and SMB to all SMB. I have a share called music, which is shared via NFS and SMB. When I run an rsync from my Mac local disk via NFS everything is happy. When I try to run it on the same share (but shared via SMB) I get a bunch of file has vanished errors, for example:

file has vanished: "/Volumes/music/Afro Cuban All Stars/A Toda Cuba Le Gusta/08 María Caracoles.mp3"

I have been doing some research and I believe this issues is do to the "special characters" in the filename.

When viewing the directory in Finder I can "see" the file, but opening it does not work and the file icon is not correct (ie, not music icon).

I have tried everything I could find on the web, but I have not found a fix.

I have added fruit and catia to the VFS objects in the share as wells as:

fruit:resource = file
fruit:metadata = netatalk
fruit:locking = netatalk
fruit:encoding = native

Does anyone know how to deal with this?

The SMB service is set for DOC CP437 (which does not matter as this is a Mac) and UNIX UTF-8

Thanks,
Sean
 
D

dlavigne

Guest
Which build version of FreeNAS (System -> Information)? Which Mac version?
 

Sean Hafeez

Dabbler
Joined
Jun 23, 2014
Messages
31
As an aside, I setup rsync services on the FreeNAS box and ran rsycn from the Mac to it with no issues. The issue is 100% due to it being a samba share. Every file it complains about vanishing is one with a non-US character in its name.

For example:

file has vanished: "/Volumes/music/Amy Grant/A Christmas Album/03 Preiset Dem König! (Praise The King).mp3"
file has vanished: "/Volumes/music/Ancient Rites/Dim Carcosa/06 Götterdämmerung (Twilight Of The Gods).mp3"
file has vanished: "/Volumes/music/BeauSoleil/L'Amour Ou La Folie/14 Ma Vie S'est Arrêtée.m4a"
file has vanished: "/Volumes/music/Bjork/Medúlla"
 
D

dlavigne

Guest
It is probably worth reporting at bugs.freenas.org. If you do, attach a debug (System -> Advanced -> Save Debug) to the report and post the issue number here.
 

Juliano Arantes

Dabbler
Joined
Jul 30, 2014
Messages
16
It seems to be an encoding problem. Although they're all using UTF-8, the Mac uses UTF-8 NFD and FreeNAS uses UTF-8 NFC! When using rsync from you Mac to FreeNAS you should convert it:

Code:
rsync -a --iconv=utf-8-mac,utf-8 localdir/ mynas:remotedir/


Check out this links, they should give you some insight on how to convert it:

https://serverfault.com/questions/3...ilenames-to-utf-8-nfc-in-either-rsync-or-afpd

https://gist.github.com/JamesChevalier/8448512

https://ubuntuforums.org/showthread.php?t=2251890
 

Sean Hafeez

Dabbler
Joined
Jun 23, 2014
Messages
31
It seems to be an encoding problem. Although they're all using UTF-8, the Mac uses UTF-8 NFD and FreeNAS uses UTF-8 NFC! When using rsync from you Mac to FreeNAS you should convert it:

Code:
rsync -a --iconv=utf-8-mac,utf-8 localdir/ mynas:remotedir/


Check out this links, they should give you some insight on how to convert it:

https://serverfault.com/questions/3...ilenames-to-utf-8-nfc-in-either-rsync-or-afpd

https://gist.github.com/JamesChevalier/8448512

https://ubuntuforums.org/showthread.php?t=2251890

Tried adding this "--iconv=utf-8-mac,utf-8" but still have the same issue.
 

Juliano Arantes

Dabbler
Joined
Jul 30, 2014
Messages
16
When mounting the NFS Share on the Mac, which options are you using? Have you included the "nfc" option? That's a must.

This is what I currently use, and has been giving me the best performance so far:

Code:
mount -t nfs -o rsize=65536,wsize=65536,intr,nolock,locallocks,rdirplus,readahead=128,noatime,nfc,actimeo=0 10.0.1.4:/mnt/Storage/Arquivos /Volumes/FreeNAS
 

Sean Hafeez

Dabbler
Joined
Jun 23, 2014
Messages
31
When mounting the NFS Share on the Mac, which options are you using? Have you included the "nfc" option? That's a must.

This is what I currently use, and has been giving me the best performance so far:

Code:
mount -t nfs -o rsize=65536,wsize=65536,intr,nolock,locallocks,rdirplus,readahead=128,noatime,nfc,actimeo=0 10.0.1.4:/mnt/Storage/Arquivos /Volumes/FreeNAS

The issue is with SMB shares, not NFS. NFS works fine. For NFS I just us the finder GUI to mount the share.
 

Juliano Arantes

Dabbler
Joined
Jul 30, 2014
Messages
16
In that case I'm not sure about what's happening, except that I'm pretty sure it's an encoding issue. But I've decided not to use SMB, performance was terrible, so I can't help much!
 

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,211
Sean, is the NFS access read-only? I thought the rule is - don't have two shares for the same data, although you can get away with it if one is read only. Each share does it's own permissions, and the result is chaos.
 
Status
Not open for further replies.
Top