files are disappearing

Status
Not open for further replies.

Shatz07

Dabbler
Joined
Jun 29, 2015
Messages
15
Hi guys, need some help...
We use samba share on FreeNAS (9.10 with all updates) and are facing unusual problem: files users are working on are disappearing. They don't delete it, even if they do, I don't see it in /var/log/messages. Here is an example, this is the last records about disappeared file in the messages. I don't even imagine how can this happen and what do do with it

Jun 15 19:39:20 nas smbd[50583]: nikolai opened file 05 Projects/05 /01 Stage One/04 Photo/To 3D_retouch/Fin/sn_B4_photo_01.psd read=Yes write=No (numopen=102)
Jun 15 19:39:20 nas smbd[50583]: [2016/06/15 19:39:20.477176, 2] ../source3/smbd/close.c:780(close_normal_file)
Jun 15 19:39:20 nas smbd[50583]: nikolai closed file 05 Projects/05 /01 Stage One/04 Photo/To 3D_retouch/Fin/sn_B4_photo_01.psd (numopen=101) NT_STATUS_OK
Jun 15 19:39:20 nas smbd[50583]: [2016/06/15 19:39:20.480442, 2] ../source3/smbd/open.c:1005(open_file)
Jun 15 19:39:20 nas smbd[50583]: nikolai opened file 05 Projects/05 /01 Stage One/04 Photo/To 3D_retouch/Fin/sn_B6_photo_02_E2.psd read=Yes write=No (numopen=102)
Jun 15 19:39:20 nas smbd[50583]: [2016/06/15 19:39:20.483129, 2] ../source3/smbd/close.c:780(close_normal_file)
Jun 15 19:39:20 nas smbd[50583]: nikolai closed file 05 Projects/05 /01 Stage One/04 Photo/To 3D_retouch/Fin/sn_B6_photo_02_E2.psd (numopen=101) NT_STATUS_OK
Jun 15 19:39:20 nas smbd[50583]: [2016/06/15 19:39:20.986819, 2] ../source3/smbd/close.c:780(close_normal_file)
Jun 15 19:39:20 nas smbd[50583]: nikolai closed file 05 Projects/05 /01 Stage One/04 Photo/To 3D_retouch/Fin/sn_B6_photo_02_E2.psd (numopen=100) NT_STATUS_OK


 

Sakuru

Guru
Joined
Nov 20, 2015
Messages
527
Do you have snapshots?
 

Shatz07

Dabbler
Joined
Jun 29, 2015
Messages
15
No, I use Syncthing plugin for backup and version control. But I can turn on snapshot task if it can help
 
Last edited:

Sakuru

Guru
Joined
Nov 20, 2015
Messages
527

Shatz07

Dabbler
Joined
Jun 29, 2015
Messages
15
I have backup, it's not a problem. Problem is files are disappearing without any traces
 

Sakuru

Guru
Joined
Nov 20, 2015
Messages
527
Do you have anything in /var/log/samba4?
 

Shatz07

Dabbler
Joined
Jun 29, 2015
Messages
15
Do you have anything in /var/log/samba4?
yep, there are log files there, but all of them have last records dated couple of months ago

Are these Mac clients? Post contents of /usr/local/etc/smb4.conf.
Mostly Mac, but there is also a couple of Windows 7 clients.
Here is config. Share I experience problems with is [work].

[global]
server max protocol = SMB2
encrypt passwords = yes
dns proxy = no
strict locking = no
oplocks = yes
deadtime = 15
max log size = 51200
max open files = 231221
logging = syslog:2
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
getwd cache = yes
guest account = nobody
map to guest = Bad User
obey pam restrictions = yes
directory name cache size = 0
kernel change notify = no
panic action = /usr/local/libexec/samba/samba-backtrace
nsupdate command = /usr/local/bin/samba-nsupdate -g
server string = NAS Server
ea support = yes
store dos attributes = yes
lm announce = yes
time server = yes
acl allow execute always = true
dos filemode = yes
multicast dns register = yes
domain logons = no
local master = yes
idmap config *: backend = tdb
idmap config *: range = 90000001-100000000
server role = standalone
netbios name = NAS
workgroup = WORKGROUP
security = user
pid directory = /var/run/samba
create mask = 0666
directory mask = 0777
client ntlmv2 auth = yes
dos charset = CP437
unix charset = UTF-8
log level = 2


[work]
path = /mnt/hd1/work
printable = no
veto files = /.snapshot/.windows/.mac/.zfs/
writeable = yes
browseable = yes
vfs objects = zfs_space zfsacl aio_pthread streams_xattr
hide dot files = yes
guest ok = no
nfs4:mode = special
nfs4:acedup = merge
nfs4:chown = true
zfsacl:acesort = dontcare
valid users = @others_allowed


[work3]
path = /mnt/hd1/work3
printable = no
veto files = /.snapshot/.windows/.mac/.zfs/
writeable = yes
browseable = no
vfs objects = zfs_space zfsacl aio_pthread streams_xattr
hide dot files = yes
guest ok = yes
nfs4:mode = special
nfs4:acedup = merge
nfs4:chown = true
zfsacl:acesort = dontcare
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
yep, there are log files there, but all of them have last records dated couple of months ago


Mostly Mac, but there is also a couple of Windows 7 clients.
Here is config. Share I experience problems with is [work].

[global]
server max protocol = SMB2
encrypt passwords = yes
dns proxy = no
strict locking = no
oplocks = yes
deadtime = 15
max log size = 51200
max open files = 231221
logging = syslog:2
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
getwd cache = yes
guest account = nobody
map to guest = Bad User
obey pam restrictions = yes
directory name cache size = 0
kernel change notify = no
panic action = /usr/local/libexec/samba/samba-backtrace
nsupdate command = /usr/local/bin/samba-nsupdate -g
server string = NAS Server
ea support = yes
store dos attributes = yes
lm announce = yes
time server = yes
acl allow execute always = true
dos filemode = yes
multicast dns register = yes
domain logons = no
local master = yes
idmap config *: backend = tdb
idmap config *: range = 90000001-100000000
server role = standalone
netbios name = NAS
workgroup = WORKGROUP
security = user
pid directory = /var/run/samba
create mask = 0666
directory mask = 0777
client ntlmv2 auth = yes
dos charset = CP437
unix charset = UTF-8
log level = 2


[work]
path = /mnt/hd1/work
printable = no
veto files = /.snapshot/.windows/.mac/.zfs/
writeable = yes
browseable = yes
vfs objects = zfs_space zfsacl aio_pthread streams_xattr
hide dot files = yes
guest ok = no
nfs4:mode = special
nfs4:acedup = merge
nfs4:chown = true
zfsacl:acesort = dontcare
valid users = @others_allowed


[work3]
path = /mnt/hd1/work3
printable = no
veto files = /.snapshot/.windows/.mac/.zfs/
writeable = yes
browseable = no
vfs objects = zfs_space zfsacl aio_pthread streams_xattr
hide dot files = yes
guest ok = yes
nfs4:mode = special
nfs4:acedup = merge
nfs4:chown = true
zfsacl:acesort = dontcare
Okay. It might be a permissions problem. It might be related to how photoshop handles metadata on samba shares. If you are in the mood for experimentation, try adding the following vfs objects to ALL of your samba shares: catia, fruit.

Then reboot a mac client and try to recreate the problem.

Out of curiosity, did you set the permissions type on these datasets to "windows"?
 

Shatz07

Dabbler
Joined
Jun 29, 2015
Messages
15
Okay. It might be a permissions problem. It might be related to how photoshop handles metadata on samba shares. If you are in the mood for experimentation, try adding the following vfs objects to ALL of your samba shares: catia, fruit.

Then reboot a mac client and try to recreate the problem.

Out of curiosity, did you set the permissions type on these datasets to "windows"?

Not sure I'll be able to recreate the problem right now, because it appeared only couple of times for the week, but explanation you are speaking of sounds reasonable. It happened while editing a file in Photoshop on Windows machine while this file was linked with a project opened on Mac client. I'll do as you are saying and'll look what'll happen.
Permissions type on this dataset is "windows".
And maybe you can explain, why deletion of file (I suppose, it happens on Mac client?) is not logged in /var/messages?
 
Last edited:

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Not sure I'll be able to recreate the problem right now, because it appeared only couple of times for the week, but explanation you are speaking of sounds reasonable. It happened while editing a file in Photoshop on Windows machine while this file was linked with a project opened on Mac client. I'll do as you are saying and'll look what'll happen.
Permissions type on this dataset is "windows".
And maybe you can explain, why deletion of file (I suppose, it happens on Mac client?) is not logged in /var/messages?
Perhaps some error is happening that isn't exposed in logging level 2. Increase logging level and check /var/log/samba4/log.smbd.
 
Status
Not open for further replies.
Top