Disapearing File, Data Still Present

Sebastianws

Dabbler
Joined
Feb 23, 2020
Messages
17
First time posting, please let me know if I need to change or clarify anything. Sorry if I get some terms wrong or I stuff it up a little!

I have FreeNAS-11.1-U7 running on an old PC that I run a Plex server off. I haven't used it in a long time and I does not store anything critical.

I went to remove a file filled with tv kids shows and place it on a hard drive just to free up some space. I cut the file from the folder in my Plex volume and pasted it in a hard-drive plugged in to my PC. The file disappeared from the Plex volume and appeared in the hard-drive but no copying commenced. I waited a good 20 min with nothing happening so I rebooted the PC. After the reboot the file was appearing empty in the hard-drive and it seem all the data is still in the Plex volume as the 'used space' remained the same. But the folder does not appear in the Plex volume so I can no longer access that data.

I dont have a snapshot to role back to as its wasnt turned on (im not sure why, I was under the impression I had set snapshots up my I must have made a mistake, totally my bad), so Im wondering if someone knows of another way to recover the contents?

Im not sure what other info I can add to assist in clarifying the issue so please let me know and ill greatfuly give as much much explanations as possible!
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,702
Try restarting your plex jail... there's a still to be fixed bug that means in some cases that jail mounts hold the free space back until a restart.
 

Sebastianws

Dabbler
Joined
Feb 23, 2020
Messages
17
I restarted the Jail but the folder didn't reappear, I restarted the entire server as well but that didn't fix it ether.
Any other ideas?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,702
OK; can you elaborate your dataset and directory structure a bit... perhaps we're looking at a dataset/directory collision?
 

Sebastianws

Dabbler
Joined
Feb 23, 2020
Messages
17
Hi Sretalla,

Sorry for the very slow reply, due to every thing that's going on I'm now home all day so I promise to be more snappy with the responses!

the datasets (which I believe to be the same as volumes, is that correct?) Is set up as a 2TB mirror.
Mirror2TB has two main folders beneath it (screenshot attached)
- Files
- Plex

And one jail for my Plex server to run in.

Does this answer your question? sorry if its far to vague.
 

Attachments

  • FreeNAS Volumes.png
    FreeNAS Volumes.png
    8.8 KB · Views: 143

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,702
the datasets (which I believe to be the same as volumes, is that correct?)
Pools would equate to volumes, datasets are a lower level (although all pools/volumes have a "root dataset" with the same name as the pool/volume, so it gets confusing).

Can you show the result from ls -l /mnt/Mirror2TB ?
 

Sebastianws

Dabbler
Joined
Feb 23, 2020
Messages
17
Right ok, that makes sense. That was a good way of putting it!

This was the output from: ls -l /mnt/Mirror2TB

mirror.png
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,702
OK, how about ls -l /mnt/Mirror2TB/Plex ?
 

Sebastianws

Dabbler
Joined
Feb 23, 2020
Messages
17
AAmntMirror2TBPlex.png


Yeah the file does not appear there as well. 'kids' was definitely within that same group of folders and I have checked within all of those folders as well to ensure that I didnt acedentaly move it. But I could not find it.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,702
OK, so let's see if we can get to the place that has all the files:

du -sh /mnt/Mirror2TB/Plex
 

Sebastianws

Dabbler
Joined
Feb 23, 2020
Messages
17
That just returns:
mirror plex.png


So nothing new... all those other folders (TV, Music, Movies, etc) are not made within the FreeNAS Volumes but from when I remotly access the Plex folder from my desktop (like you would make a normal folder withing another local folder).
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,702
So if I get it, you are saying you had (before the problem) 1.6 TB of files under Plex?

Now you see that you still have it...

So the job would be to dig (using that same command) into each of the subdirectories of Plex (like du -sh /mnt/Mirror2TB/Plex/TV ) and see where the space has gone... if you can get to 1.6TB by adding them all up, it's still there somewhere.

Also, if you know the name of one of the files that would be amongst the missing, you could try find /mnt/Mirror2TB/Plex -name "*guess*" (where you replace the word "guess" between the asterisks with the word you know).
 

Sebastianws

Dabbler
Joined
Feb 23, 2020
Messages
17
Yeah easy,

So when search for the sposific file it, which I know is there, it returns as if it has successfully completed a command but does not provide information:
FileSearch.png


In regards to the storage:
FreenasSpace.png


This equates a total of 938.35G
there was an additional 177G that i have since removed from the server
Total of: 1,115.35GB / 69.7%
out of: 1,600GB
so just over 30% of the data is uncounted for.

Even as of this morning the storage still states that 92% of Plex storage is being used by the Plex folder
Freenas Volumes.png
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,702
Are you convinced there are no snapshots?

How about running
zfs list -t snapshot
 

Sebastianws

Dabbler
Joined
Feb 23, 2020
Messages
17
Oh damn there are, I was sure I didnt have it set
Snapshots.png


the: freenas-boot/ROOT/11.1-U7@2019-08-16-21:26:54 might be perfectly timed as well.

How should I proceed from here? Just try and role back to that and see if the missing folder appears?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,702
start with
zfs set snapdir=visible Mirror2TB/Plex

Then look under /mnt/Mirror2TB/Plex/.zfs/

Rather than rolling back the snapshot (and losing changes you made after the problem), just copy the files out of there back to the original/desired location.
 

Sebastianws

Dabbler
Joined
Feb 23, 2020
Messages
17
ok not a problem, I've set that.

Could you just elaborate on what you mean by "look under"?

Also, could you point me in the direction of a document that explains how I can do that copy of the files once I navigate to the correct snapshot?
I really appreciate the time that you've taken to help with this, sorry for all the questions!
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,702
You could start with cd /mnt/Mirror2TB/Plex/.zfs/snapshot

and

ls -l to look at what's there. The commands we were using before will also work.

Then use something like this (maybe need some changes based on what you find with ls and cd:
cp -R /mnt/Mirror2TB/Plex/.zfs/snapshot/manual-20200223/Kids /mnt/Mirror2TBPlex/Kids
 

Sebastianws

Dabbler
Joined
Feb 23, 2020
Messages
17
I successfully navigated there and found the 17 snapshots.

could you explain where you got the "manual-20200223" from in the restore command (cp -R /mnt/Mirror2TB/Plex/.zfs/snapshot/manual-20200223/Kids /mnt/Mirror2TBPlex/Kids)? And is that part of the command how to select the snapshot that you want to restore the "Kids"file from?

Im just not sure how to point that restre towards the correct snapshot.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,702
could you explain where you got the "manual-20200223" from in the restore command
In your screenshot, the line with Plex in it, after the @ symbol (the name of the snapshot).

The snapshots are mounted and visible under /mnt/Mirror2TB/Plex/.zfs/snapshot/

What you do with those files (except I don't think you can delete or change them) is up to you. So in this case, copying them to the wanted location is the right action... later when you delete the snapshot, your copy will remain.

In case it helps, it looks like you only have 1 snapshot of that dataset (the one that is holding 1.6TB).
 
Last edited:
Top