Using CIFS/SMB, getting invlid file handles and Admin perm errors

Status
Not open for further replies.

philhu

Patron
Joined
May 17, 2016
Messages
258
Hi, Freenas 9.10

I have a SMB volume opened. I write alot to the dirve, gigs and gigs a day. Large 2g+ files.

Sometimes, not too often, I am seeing 'Invalid file handle' messages trying to delete files on the share from Windows 10. If I go in as root or the smb dataset owner in shell, I can delete them. If I remount the drive, the errors on Windows persist.

I am also seeing errors trying to write random files to this share from windows. I might be writing 150 files from 1k to 3g, and halfway through a message pops up saying 'Administrator access required to complete transfer'. I can mount the drive as root, the share owner etc, nothing works. It is wierd too, if I try to move one file to retest, it will write the file to the NAS, I see it in the directory, pop up the message and when I say cancel, DELETE the nas written file from the NAS.

I have been getting around this error when it happens by sftp'ing the file to the NAS to my home directory, going in shell and mv'ing it to the correct place. That gives no error, but is very slow, as sftp is not the speediest protocol.

I had a old message here saying the handle problem was due to writing using smb to an nfs fileshare, so I switched everything to cifs/smb mounts, and the problem still persists

So this is using win10 to write directly to an smb fileshare, by the fileshare owner. Neither works, but using the same acct using sftp works for the same files!
 

philhu

Patron
Joined
May 17, 2016
Messages
258
Unix. No acls or other extensions in use

Why is it intermittent?
 

Attachments

  • invfilehandle.png
    invfilehandle.png
    19.2 KB · Views: 243
  • cifsxferprops.png
    cifsxferprops.png
    42.8 KB · Views: 268

philhu

Patron
Joined
May 17, 2016
Messages
258
I actually said unix.

My question is why is it so intermittent. That points to something wrong in the freenas/bsd implementation

Note i wrote 38Tb over 2 months before the first error. You guide is good, but there is something actually wrong here
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Quite simply, SMB shares only work properly with Windows permissions. There's no easy way of fixing that, because Windows and Unix use different permissions formats which cannot be made to coexist without a massive translation layer that nobody has ever written and open-sourced.

If I'm not mistaken, when using Unix permissions, Samba ends up trying to apply Windows paradigms to Unix permissions, which tends to break things in all sorts of fun ways, hence why it's officially discouraged by the devs of all projects involved. I believe it can be made to work if you stick to bare minimum Unix permissions (R/W/X only) and never touch permissions from Windows' side, but, again, this is discouraged and has caused problems.
 

philhu

Patron
Joined
May 17, 2016
Messages
258
ok, I bit the bullitt and built a samba/windows dataset and moved my windows user home directories to it. Works perfectly.

wierd though I cannot seem to make the system default the users to the new home directory path using /etc/passwd. what I ended up doing is building soft links from the locations freenas uses, to the shared cifs disk. This works like a champ. I set each home directory owned by the user and the cifs share group. I am able to change permissions fine using windows permissions and this setup
 
Status
Not open for further replies.
Top