All media marked as UNAVAILABLE after reformatting my drive

server-raspberry-pi

#1

Hi all,

I currently have Plex set up on a Raspberry Pi 3 running Raspbian, with all my content on an external 4TB HD. I've been having some issues recently where certain directories would become unreadable - the content would be gone and I would be unable to delete the directory.

I thought perhaps it was my harddrive, but after buying a new one of a different brand and having the issues pop up again, I thought perhaps it was my format type. I wiped the drive, reformatted from exFAT to ext4, and reloaded all my content. The file structure is identical as before, but now Plex marks every single movie I have as UNAVAILABLE!

I've changed permissions on all directories to 755, but still can't get Plex to recognize any of my content. What do I do?!?


#2

@jnnow said:
The file structure is identical as before, but now Plex marks every single movie I have as UNAVAILABLE!

I’ve changed permissions on all directories to 755, but still can’t get Plex to recognize any of my content. What do I do?!?

(1) Have you changed the permissions recursively, i.e. did you do something like this: chmod -R 755 /media/movies? If not, you might have given Plex access to the directories, but not to the files. Just take a look at the permission of a file that’s missing in plex.
(2) Have you told Plex to “Scan Library Files”?


#3

yes and yes

I even forced it to refresh all metadata, just in case.


#4

Ubuntu?
/media?

what did you format it as?

Is it being mounted by GVFS or /etc/fstab ?


#5

My OS is Raspbian GNU/Linux 8 (jessie) (which came with the Raspberry Pi)

I’ve named the drive library, and all my files show within /mnt/library.

It is mounted, and I’ve added the UUID to /etc/fstab. Here are the settings I used (UUID truncated for space):
UUID=XXX /mnt/library ext4 defaults 0 0


#6

I forgot to mention that I installed Plex version 1.12.1.4885 just before this took place.

I’m not saying this is the issue, just trying to anticipate questions.


#7

@jnnow said:
yes and yes

I even forced it to refresh all metadata, just in case.

Then please edit the affected library and go to the “Add Folders” page and review the listed “folder”, i.e. directory. Make sure there is no upper case lower case problem, considering the mount was exFAT previously. You can also just remove the current folder and select the folder again from the directory browser. No meta data will get lost.

If that does not work, it has to be a permissions problem.


#8

Debian == Ubuntu (Debian root)

Is ‘Nautilus’ running? (the file manager)


#9

@jnnow said:

It is mounted, and I’ve added the UUID to /etc/fstab. Here are the settings I used (UUID truncated for space):
UUID=XXX /mnt/library ext4 defaults 0 0

What are the permissions for /mnt/library? ls -al /mnt/library


#10

ls -la /mnt (shows both target directories)


#11

OK, turns out chmod -R wasn’t as recursive as I thought. I checked every layer of folders, and one of the parent directories was set to rwx------ . Once I changed it to rwxr-xr-x, everything came back online.


#12

While I have your attention, do you know of any reason some of my files and directories would suddenly become corrupted?

I’ve done some Googling, and all the answers say it’s a sign of impending hardware failure. I believed that once, but now it’s happened twice with two brand-new drives made by different companies. I’m starting to believe it is some thing I’m doing wrong rather than a hardware issue.


#13

in the ‘old’ days, windows would use text-mode copy on binary files (copy/b to keep it right).

If you’re doubting the HD, run SMART test and look at the number of remapped / reallocated sectors.
it will be ZERO until shortly before the drive dies completely. ZERO means it still has spare sectors to use.


#14

@jnnow said:
While I have your attention, do you know of any reason some of my files and directories would suddenly become corrupted?

Corrupting exFAT is easy, especially on an RPi. I hope you have connected your USB drive to a powered USB hub. Please don’t expect a stable operation using the low-powered embedded USB ports.


#15

My USB drive has its own power cord plugged into a battery backup for constant power. I was using exFAT until recently, so that may be the cause. I double-checked my WinSCP (processing videos on Windows, transferring them to Plex on Linux) settings to verify it is transferring in binary mode rather than text.

Anything else? I’d really hate to go buy a new HD if the problem really isn’t hardware related…


#16

Anything “FAT” is easy to corrupt. all the information is located in one place only


#17

Thanks for your help everyone! I’m up and running, with my fingers crossed that ext4 solves my corruption issues.


#18

Now that we know it was exFAT (a licensed codec from a company we all love to hate), it’s obvious why it corrupted.

You’re good with linux (until they get their hands on it too)