All files have red trash icon after hardware upgrade

Server Version#: Latest
Player Version#: Latest

I moved my music library from a 4TB USB drive to an 8TB USB drive. The old drive is now mounted in a sub directory. The library mount point is the same. The time gap between un-mounting of the old drive and the mounting of the new drive was a minute or two. This procedure resulted in the whole of the music library being trashed. I have run the Scan command from a client system, and then I ran Scan on the server machine. The library was not restored.

Is there a way to fix this without deleting the whole library and adding it again? I am not going to do that because there is too much manual labor involved in fixing the thousands of errors Plex will make. I have spent many weeks of labor fixing up the library so that my family that is now out of state can still hear the music they heard at home. I’m not going to bother repeating the labor if the library cannot be repaired.

Thanks.

I’m not sure I understand what you did to get to that point.

Have you verified the items are actually pointing to the correct path (e.g. using the exact same mount point)?
Do you still have an old folder linked to your library (potentially one that’s no longer available)?
If the media is in it’s designated location and the plex service account on your system has permission to see the files, they should be showing as “available” in your library after scanning it.

On Linux, care must be taken with mounting.

  1. Before mounting, the mount point directory must provide 755 (read for Plex) at minimum

  2. After mounting, the same directory (which now is the top of the HDD) must also minimally be 755.

The 7 is for your username, 55 is for group and others. Plex is ‘others’

Thanks for the reply, @tom80H . Yes, same mount point.

I have given the parent directory to the plex group, with read access, and applied the change to all sub directories. I ran the Scan after this, but the library is not restored.

My videos were also transferred from one drive to another, under the same mount point as before. The permissions of the parent directory were identical to those of the music, before I made the change of group. The libraries were unaffected in Plex. Only music is broken, even with the directory and all contents given to the plex group. (My account was added to the plex group long ago.)

I’m quite confident permissions are not the problem, but I could be wrong.

@IsaiahSellassie

May I ask where the mount point is and is it a mount you created in /etc/fstab?

On most Linux systems, specifically Debian/Ubuntu variants /media will claim exclusive ownership of the files regardless what permissions you assign.

This having been said, May I suggest reviewing

The mount point is /home/isaiahsellassie/Music. Yes, it has been in fstab for a long time, and always mounts automatically on boot up
 Ubuntu’s auto mounting of USB drives has been turned off. The directory is accessible and usable to all other apps except Plex. Nothing has been changed except the physical hard drive. The sub directory /JAZZ has the drive mounted under it that used to be mounted under the parent Music.

Is there a way to restore the database from a backup? Would that be easier? I have added only a few albums to the new drive, so I don’t mind fixing those again after they are scanned in.

Selective restore from a database is not possible (if that’s what you’re hoping).

The DB is either “All or nothing”. (file swap).

If I’m understanding, and please correct me again if needed ?

  1. You have the mount point ~/Music.
  2. This is the same mount arrangement you previously had.
  3. You’ve added ~/Music/JAZZ to this new HDD.
  4. All of ~/Music is not availble.

What folders are listed in the library section for PMS to scan?

No, ~/Music/JAZZ has a separate physical drive under it. In the old arrangement ~/Music/CLASSICAL had its own physical drive under it.

All of ~/Music is available. It is the only directory added to the Plex library. The sub directories, /JAZZ now and /CLASSICAL before were not added separately. They were scanned as part of ~/Music.

That would be fine. I have not added much after the hard drive change. I don’t mind manually fixing those few albums, after they get scanned in. If I can get the library exactly as it was before the hard drive upgrade, that works for me.

@IsaiahSellassie

Thank you for clarifying.

One last question. I ask this because, if I’m right, a DB restore won’t fix it and we’ll be right here again to make the proper correction.

If you do the following:

Let’s see what the file system’s permissions are

cd  ~/Music
ls -la | grep JAZZ
ls -la | grep CLASSICAL

Now let’s look at the mount point (where this problem is usually rooted)

  1. Unmount JAZZ & CLASSICAL
  2. Get a comparative listing again
ls -la | grep JAZZ
ls -la | grep CLASSICAL

Would you please show me both sets of outputs?

I am asking this because if Plex cannot read that top-most directory, it will flag everything it knows underneath it as Unavailable.

This is why it’s pointing to where it’s mounted; most likely the pre-mount permissions.

Firstly, CLASSICAL is no longer on its own separate drive. Only JAZZ is. There are 2 drives total. Now, here are the outputs:

drwxr–r-- 328 isaiahsellassie plex 36864 Sep 6 18:18 JAZZ
drwxr–r-- 350 isaiahsellassie isaiahsellassie 45056 Sep 8 14:29 CLASSICAL

After unmounting the drive:
drwxr-xr-x 2 root root 4096 Sep 5 17:04 JAZZ

You were right! I did not change it, but the GUI disk manager runs in sudo mode for mounting and unmounting, so that’s how it changed I suppose.

Out of curiosity I also checked the parent directory, mounted and unmounted respectively:
drwxr–r-- 65 isaiahsellassie plex 4096 Sep 5 17:04 Music
drwxr-xr-x 3 isaiahsellassie isaiahsellassie 4096 Sep 5 16:50 Music

After correction of permissions, unmounted
drwxr-xr-x 2 isaiahsellassie plex 4096 Sep 5 17:04 JAZZ

I ran the Scan in Plex, but iit stopped as usual after a minute. Library is not restored.

Thank you .

So you’re using the GUI disk manager to do the mounting?

That’s going to set a flag and , in spite of the permissions, going to block every username (including Plex) except you.

I really suggest the best way to do this is to make the entries in /etc/fstab for it to mount at boot time.

Doing this means it avoids the GUI mounter and all the problems associated with it.
PLUS, the drive will be mounted before Plex starts and Plex will always find the media there ready for it.

If I may add


This permission setting is wrong.

drwxr–r--

That’s 744, not 755. To traverse the directory, it must have execute x.

Directories get 755, files get 644.

This is what you need to fix.

drwxr–r-- 328 isaiahsellassie plex 36864 Sep 6 18:18 JAZZ
drwxr–r-- 350 isaiahsellassie isaiahsellassie 45056 Sep 8 14:29 CLASSICAL

Sorrry I missed it at first read.

All drives are set to mount at boot time from fstab entries. I use the GUI disk manager only when I am making changes. I used it to format the new drive with EXT4 and mount it in a temporary location— ~/Music1 —so as to run rsync on the data. After all the data was copied over, I unmounted the old drive, and mounted the new drive under ~/Music. Then I mounted the old drive temporarily in ~/JAZZ, deleted all other files except the JAZZ sub dir, moved all files from JAZZ sub dir to the root of the drive, deleted the JAZZ sub dir,. Then I unmounted it from ~/JAZZ and mounted it in ~/Music/JAZZ. All this was done with the GUI tool. Except of course the rsync was done from a terminal.

The final step was cleaning up the fstab in a text editor. Then I rebooted and all drives mounted perfectly as written in fstab. This includes ~/Videos which Plex is reading without any issues. It also is a new drive, with the data copied over by rsync. The permissions are identical. How come the video library is working fine, and only music is broken? The same GUI tool was used to mount and unmount.

Thanks.

Again, I apologize for not catching when you posted but I found the issue.

When you posted this, which I think is from before they are mounted:

drwxr–r-- 328 isaiahsellassie plex 36864 Sep 6 18:18 JAZZ
drwxr–r-- 350 isaiahsellassie isaiahsellassie 45056 Sep 8 14:29 CLASSICAL

is where the fault is.

  1. cd ~/MUSIC
  2. unmount
  3. chmod 755 CLASSICAL JAZZ
  4. mount
  5. cd ~/MUSIC
  6. chmod 755 CLASSICAL JAZZ

Now refresh in Plex.

“Command ‘unmount’ not found”

May I see your /etc/fstab please?

I’ll give you all the exact commands.

The fstab contents:


> # /etc/fstab: static file system information.
> #
> # Use 'blkid' to print the universally unique identifier for a
> # device; this may be used with UUID= as a more robust way to name devices
> # that works even if disks are added and removed. See fstab(5).
> #
> # <file system> <mount point>   <type>  <options>       <dump>  <pass>
> # / was on /dev/sda2 during installation
> UUID=913219b3-4363-41e0-8444-c39239cf8de1 /               ext4    errors=remount-ro 0       1
> # /boot/efi was on /dev/sda1 during installation
> UUID=8637-7636  /boot/efi       vfat    umask=0077      0       1
> # swap was on /dev/sdc1 during installation
> UUID=98bc5429-438d-4f1e-911a-1a8757251609 none            swap    sw              0       0
> 
> /dev/disk/by-id/usb-WD_My_Book_25ED_5652474A3753364B-0:0-part1 /home/isaiahsellassie/Music auto nosuid,nodev,nofail,x-gvfs-show,x-gvfs-name=Music 0 0
> /dev/disk/by-id/usb-Seagate_BUP_RD_NA7T0H8S-0:0-part1 /home/isaiahsellassie/Music/JAZZ auto nosuid,nodev,nofail,x-gvfs-name=JAZZ,x-gvfs-show 0 0
> /dev/disk/by-id/usb-WD_My_Passport_25E2_575831314442374C44434459-0:0-part1 /home/isaiahsellassie/Videos auto nosuid,nodev,nofail,x-gvfs-show,x-gvfs-name=Videos 0 0
> /dev/disk/by-id/usb-WD_My_Passport_0827_5758393141373552464E4334-0:0-part5 /home/isaiahsellassie/backup auto nosuid,nodev,nofail,x-gvfs-name=backup 0 0

MODERATOR EDIT: Readability

You can copy & paste each line, one at a time.

sudo bash
umount /home/isaiahsellassie/Music/JAZZ
chmod 755 JAZZ CLASSICAL
umount /home/isaiahsellassie/Music
chmod 755 Music
mount /home/isaiahsellassie/Music
mount /home/isaiahsellassie/Music/JAZZ
exit

Please correct me if CLASSICAL isn’t in the Music directory.

It is in ~/Music/CLASSICAL. It used to be on a separate hard drive mounted in that location. Not any more. Now ~/Music/JAZZ is on its own separate drive.

Running the command sequence next.

I’m going to add two more commands to that – just to be safe.

chmod 755 ~/Music
chmod 755 ~/Music/JAZZ

Now, even if already set, I set it again. (overlaying these can get tricky)