Some folders appearing empty on drive

Status
Not open for further replies.

flogbox

Cadet
Joined
Aug 3, 2015
Messages
5
Hey guys. i'm new to the forum but have been using FreeNAS for a number of years now.

I have a HP Microserver running 4 x 2TB WD greens used purely as a media server.
I'm currently running 9.1.1-RELEASE-x64, I'm not running RAID or JBOD, its setup as individual disks.

Anyway, i went to watch a movie on the weekend and a movie i knew i had wasn't displayed on my Kodi box.
I checked my FreeNAS box through my PC and the folder for the movie was there but the folder was empty.
Probably worth saying that i'm quite anal about my file structures and all my movies are in separate folders and scraped with Ember media manager (mkv, nfo, jpg, tbn, etc files).

I've only noticed this on one of the drives at this stage and not all folders are empty on this drive, some still have their contents.
Now i'm not sure if this is a file table error, a FreeNAS permissions error (i'm had a few issues with permissions in the past) or my HD is on the way out.
When i right click>properties on one of the empty folders it shows '0 bytes'

If anyone can offer some advice that would be great.

Thanks
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
If you run SMART tests on your drives, you should have an idea of how healthy they are. For example: smartctl -a /dev/ada0 (or whatever your device names are). If you have any questions about the output, you can post it here - just use code tags to preserve the formatting.

To verify if the data is really there, and not a permissions issue, I'd SSH into the box and browse the volumes.
 

flogbox

Cadet
Joined
Aug 3, 2015
Messages
5
Great, thanks gpsguy, exactly what was after.
I've done the smart test via shell but i can't work out how to copy the results.
I read on another forum that you can email yourself the results (not sure if this is only if the smart test fails)
I've added my email address in the smart config (web gui) but didn't receive any results.
I'm not sure what i'm looking for in the results but the "SMART overall-health self-assessment test result: PASSED"
 

DJ9

Contributor
Joined
Sep 20, 2013
Messages
183
You can just forward the results to a text file like so:
Code:
smartclt -a /dev/ada0 > smartresultsada0.txt


Or whatever filename.txt you'd like. This will then allow you to paste the info into the forum, or pastebin, etc.
 

flogbox

Cadet
Joined
Aug 3, 2015
Messages
5
I haven't done the smart tests again but i ssh'd into the drive and the files are in the folders so i assume its a permission issue.
Under windows if i open the folder it's just empty, when using a Mac i get a error saying i don't have permission to access that folder.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
I haven't done the smart tests again but i ssh'd into the drive and the files are in the folders so i assume its a permission issue.
Under windows if i open the folder it's just empty, when using a Mac i get a error saying i don't have permission to access that folder.
Yep, that's typical behavior for permissions issue. In Windows + Samba + ZFS acls, if you lack 'read' permissions your files will be invisible.
 

flogbox

Cadet
Joined
Aug 3, 2015
Messages
5
Yep, that's typical behavior for permissions issue. In Windows + Samba + ZFS acls, if you lack 'read' permissions your files will be invisible.
Seems weird that most folders on that drive are accessible though doesn't it?
 

flogbox

Cadet
Joined
Aug 3, 2015
Messages
5
Ok, I've fixed the issue, for anyone else interested here's what i did.

in the gui: Storage > view volumes > select the volume > change permissions (icon down the bottom) > tick "set permission recursively"

Folders now show the contents.
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
I'm glad to see you resolved your problem. Thanks for posting your solution. Someone searching the forums may run across this thread in the future and it's nice to see how your problem was resolved.
 

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,211
Regarding the smart tests, you don't have to do them again to see the result. Just do
sudo smartctl -a <device name>
and you will see a list of smart tests and results near the bottom of the output for that device.
 
Status
Not open for further replies.
Top