Losing File

Status
Not open for further replies.

gearhead

Contributor
Joined
Mar 6, 2013
Messages
137
I have noticed from time to time some files are lost. I am certain that I am not deleting them. I regularly scrub the drives. zpool status does not report any problems. does anybody know what could cause this?

Thanks
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
I'd say they are being deleted somehow.

Can you tell us more than what you have. What kinds of files are they? What file sharing protocol are you using?

We've had several people that have thought something was wrong, ultimately we proved that they were being deleted by users...
 

gearhead

Contributor
Joined
Mar 6, 2013
Messages
137
I am using cifs. These are small data files access by a particular application that I have used for ten years. There are no other users beside me. I access the server from four different clients. At most two clients may have access to server but never they will access these files at the same time.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
Well, what I'd do first is enable the recycle bin function of CIFS. When stuff gets deleted it'll go in a folder with the user's name. So if you mapped /mnt/zpool/data1 with the username gearhead and the file test.txt is deleted you'd see the file get moved to /mnt/zpool/data1/.recycle/gearhead/test.txt.

If you setup 2 users and map them that way you can identify which one(or both) is deleting what.

But in all honesty, I'm totally not buying that your FreeNAS server is deleting stuff on its own. Your client could be encountering an error and deleting/overwriting the file or something. But I think there's no chance at all that your server is willy-nilly deleting files. That's something that would be noticed very quickly with the size of our userbase.
 

warri

Guru
Joined
Jun 6, 2011
Messages
1,193
Plus you might want to setup ZFS snapshots in this case. It enables to you recover files which have been deleted recently.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
That would work, but I think he's trying to find the cause for the deleted files and isn't as worried about recovering them.
 

Knowltey

Patron
Joined
Jul 21, 2013
Messages
430
I am using cifs. These are small data files access by a particular application that I have used for ten years. There are no other users beside me. I access the server from four different clients. At most two clients may have access to server but never they will access these files at the same time.

Yep, what cyberjock said. For the shares in question go to their configuration and enable "Export Recycle Bin"

Once that is enabled, anything that is deleted will be moved to /.recycle/username/path/to/folder/file.ext from the base of the share.

When you set it up, go ahead and do a test delete on a fake file you create just to make sure it's working, I've encountered a few times where for whatever reason the username folder under .recycle doesn't get created.
 

gearhead

Contributor
Joined
Mar 6, 2013
Messages
137
thanks everybody. I'll give your recommendations a try. As cyberjock mentioned, I am trying to find out why these files are deleted. Is it because they become corrupted and subsequently deleted? Is it a sever issue or a client issue?
 

Knowltey

Patron
Joined
Jul 21, 2013
Messages
430
thanks everybody. I'll give your recommendations a try. As cyberjock mentioned, I am trying to find out why these files are deleted. Is it because they become corrupted and subsequently deleted? Is it a sever issue or a client issue?
I'm going to guess a client issue, Even if a file was corrupted the server wouldn't just simply delete it.
 

gearhead

Contributor
Joined
Mar 6, 2013
Messages
137
So to enable recycle bin, I just check "export Recycle Bin", correct?
 

Knowltey

Patron
Joined
Jul 21, 2013
Messages
430
Yeah, export Recycle Bin on the share should enable it.
 
Status
Not open for further replies.
Top