Looks like your problem is a combination of mounting a drive permanently and defining it in Plex with the proper ownership/permissions.
Mounting
To mount a drive manually, use the following command:
sudo mount /dev/sdc5 /home/dandy/mnt/additionaldrive
The problem with this command, however, is that the mount won't survive a reboot. Therefore, to have it mounted during boot, you need to edit your /etc/fstab
file. But first, you need to find the UUID of the particular partition that you want to mount. Use the command ls -l /dev/disk/by-uuid
to find the UUID. On my system, I get the following:
$ ls -l /dev/disk/by-uuid
total 0
lrwxrwxrwx 1 root root 10 Jul 2 16:13 0b132a87-938e-4654-b734-6a4a4105ca9c -> ../../dm-0
lrwxrwxrwx 1 root root 10 Jul 2 16:13 10442e1e-b19d-4b3a-8bb0-37c6dfb2e8ef -> ../../sdc1
lrwxrwxrwx 1 root root 10 Jul 2 16:13 2797e94e-82c5-4f66-8911-ad32fe5c8e73 -> ../../sda1
lrwxrwxrwx 1 root root 10 Jul 2 16:13 2ae71809-1068-4d24-b611-9e3d9270cc71 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Jul 2 16:13 fa789f63-a537-47cb-8f16-6348e4182b31 -> ../../dm-1
Once you identify the UUID for your partition, edit the /etc/fstab
file as follows. Be sure to substitute xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx with the UUID of your partition:
# mount /dev/sdc5 /home/dandy/mnt/additionaldrive
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx /home/dandy/mnt/additionaldrive nfs defaults 0 0
If you notice, the options I used are simply defaults
. This will allow rw access along with a couple other settings. For more information about the options and editing /etc/fstab
, see the documentation here. Adjust as necessary for your situation.
If you don't want to manually type out the UUID while editing /etc/fstab
, you can use the following commands to append the UUID to /etc/fstab
. After that, edit /etc/fstab
as needed.
Switch to root:
sudo bash
Make backup:
cp /etc/fstab /etc/fstab.bak
Append UUID to /etc/fstab
:
ls -l /dev/disk/by-uuid | grep sdc | awk '{print $9}' >> /etc/fstab
Plex Library Ownership/Permissions
Next, you need to make sure that this folder and its contents have the proper ownership/permissions for Plex to be able to read and write to. Plex Media Server runs as user plex. Therefore the media and directories need to allow read and write access to user plex. This is done with the following command:
sudo chown -R plex:plex /home/dandy/mnt/additionaldrive
For more information, a good tutorial for Plex is here, and the official documentation is here.
Side Note
I don't recommend creating your Plex library directory within your home directory. Instead, mount it somewhere like /mnt/addionaldrive
.
Also, you might want to consider using a group other than plex for your library. On my system, the directory and file ownership for my Plex Media Server library uses plex as the user but a different group, boden. This allows me more flexibility. Plex still needs to own the files, but I also want to have the directory accessible as a network drive via SMB. In order to do this, I defined a new group called boden that user plex and any other specific users are added to. Then within my Samba config file, I set it up for users to access this share point via the network. Additionally, if a file is written to the directory, it automatically defines ownership of plex:boden. This is handy when adding media to the library. But this is another topic you can explore on your own.