Mount a second Share Drive | PlexGuide.com

Mount a second Share Drive

  • Stop using Chrome! Download the Brave Browser via >>> [Brave.com]
    It's a forked version of Chrome with native ad-blockers and Google's spyware stripped out! Download for Mac, Windows, Android, and Linux!
Welcome to the PlexGuide.com
Serving the Community since 2016!
Register Now

PlexPower

Citizen+
Original poster
Sponsor
Mar 18, 2019
16
11
Hi all. I need help for mount a second Share Drive Manually.

I can pay via Paypal for this service. I have Discord for help me, step by step.

Thx and hope someone will me.
 

Edrock200

MVP
Staff
Nov 17, 2019
606
216
It's pretty easy. Assuming you mean a gdrive of some sort? Assuming your same account has rights to this other drive:

Log into host
sudo mkdir /mnt/tdrive2
sudo rclone config --config /opt/appdata/plexguide/rclone.conf
c for copy
Chose the # corresponding to your tdrive
Name the new one tdrive2 and press enter
E for edit
Edit tdrive2
Don't change any of the values until you get to the question of "are these settings right", then say yes, say no to generating a new token, say yes to selecting a new team drive. Enter the # for the new drive
Then q for quit

sudo cp /etc/systemd/system/tdrive.service /etc/systemd/system/tdrive2.service

sudo nano /etc/systemd/system/tdrive2.service
Press Ctrl \
Search for tdrive
Replace with tdrive2
Select A for replace all
Ctrl-X to exit, say yes to save

**See edit below***
*o nano /opt/appdata/plexguide/pgunion.sh
Look for the section that says ...NC:/mnt/tdrive=NC:/mnt/...
And add your new mount, e.g.
...NC:/mnt/tdrive=NC:/mnt/tdrive2=NC:/mnt/...
Ctrl-X, yes to save
*****

*Edit* I forgot the pgunion portion above is also built into the PG menu, and is an easier way to add your new path to unionfs.
sudo pg, option 10, then 2, then 1, add path, /mnt/tdrive2 */edit*

Stop your media/sonarr/radarr containers or anything that uses unionfs path in portainer

sudo systemctl daemon-reload
sudo systemctl start tdrive2
sudo systemctl enable tdrive2
sudo systemctl restart pgunion

Check /mnt/tdrive2 to see if it's mounted and /mnt/unionfs to ensure its merged in. If yes, restart containers.
 
Last edited:
  • Like
Reactions: 2 users

PlexPower

Citizen+
Original poster
Sponsor
Mar 18, 2019
16
11
It's pretty easy. Assuming you mean a gdrive of some sort? Assuming your same account has rights to this other drive:

Log into host
sudo mkdir /mnt/tdrive2
sudo rclone config --config /opt/appdata/plexguide/rclone.conf
c for copy
Chose the # corresponding to your tdrive
Name the new one tdrive2 and press enter
E for edit
Edit tdrive2
Don't change any of the values until you get to the question of "are these settings right", then say yes, say no to generating a new token, say yes to selecting a new team drive. Enter the # for the new drive
Then q for quit

sudo cp /etc/systemd/system/tdrive.service /etc/systemd/system/tdrive2.service

sudo nano /etc/systemd/system/tdrive2.service
Press Ctrl \
Search for tdrive
Replace with tdrive2
Select A for replace all
Ctrl-X to exit, say yes to save

sudo nano /opt/appdata/plexguide/pgunion2.sh
Look for the section that says ...NC:/mnt/tdrive=NC:/mnt/...
And add your new mount, e.g.
...NC:/mnt/tdrive=NC:/mnt/tdrive2=NC:/mnt/...
Ctrl-X, yes to save

Stop your media/sonarr/radarr containers or anything that uses unionfs path in portainer

sudo systemctl daemon-reload
sudo systemctl start tdrive2
sudo systemctl enable tdrive2
sudo systemctl restart pgunion

Check /mnt/tdrive2 to see if it's mounted and /mnt/unionfs to ensure its merged in. If yes, restart containers.
Dude you are awesome!!! But 2 little thing:
sudo nano /opt/appdata/plexguide/pgunion2.sh - I think you mean sudo nano /opt/appdata/plexguide/pgunion.sh beacause pgunion2.sh is blank.

Check /mnt/tdrive2 to see if it's mounted and /mnt/unionfs to ensure its merged in..... I don't know what you mean but i see /mnt/tdrive2 but in /mnt/unionfs, nothing change. i dont see the tdrive2.

And. /mnt/tdrive2 is same stuff from my first tdrive. So. my second tdrie stuff is not there.

Thx

EDIT:
My Bad... When i edit the rclone.cong and select the new tdrive id.... i select the good tdrive but dont change it. little bug. I fix that and all good now. But is very slow. Very very slow. Can you help me whit that?

EDIT 2:
I stop the Scan. Restart Plex in Portainer. Scan again in Plex. All good. You know... When you try go too fast. If any problem. I reply you and Thx.
 
Last edited:
  • Like
Reactions: 1 user

Edrock200

MVP
Staff
Nov 17, 2019
606
216
Dude you are awesome!!! But 2 little thing:
sudo nano /opt/appdata/plexguide/pgunion2.sh - I think you mean sudo nano /opt/appdata/plexguide/pgunion.sh beacause pgunion2.sh is blank.

Check /mnt/tdrive2 to see if it's mounted and /mnt/unionfs to ensure its merged in..... I don't know what you mean but i see /mnt/tdrive2 but in /mnt/unionfs, nothing change. i dont see the tdrive2.

And. /mnt/tdrive2 is same stuff from my first tdrive. So. my second tdrie stuff is not there.

Thx

EDIT:
My Bad... When i edit the rclone.cong and select the new tdrive id.... i select the good tdrive but dont change it. little bug. I fix that and all good now. But is very slow. Very very slow. Can you help me whit that?

EDIT 2:
I stop the Scan. Restart Plex in Portainer. Scan again in Plex. All good. You know... When you try go too fast. If any problem. I reply you and Thx.
Yep you are right about pguinion2, my bad. You are also correct on the bug. Sometimes it doesn't stick. Updating to the latest rclone fixes this but fyi if you ever go into the PG clone menu, it will revert to 1.48 and you will need to reinstall.

Slow how? On transfers or navigating? If the latter, do sudo pg, option PG clone, then rclone settings. Set your dir cache to the max 7120 I think. Then apply the settings.

Exit PG clone

Increase you inotify count so the system kernel can better cache the file system:

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf
sudo sysctl -p

Then cache the file system:

sudo apt install screen -y

screen -S cache bash
ls -alR /mnt/tdrive2

This will now begin to list the file structure on tdrive2 causing rclone to cache it. This takes a while so to exit the screen press ctrl-a then d. To reconnect type screen -r cache. When it's done type exit to exit the screen. This cache does not persist a reboot, to set it up to do this automatically on reboots see here:
If still slow, you can try creating a new set of keys and putting that in rclone for your new remote, as well as generating a new token. However I've copied my key/token a dozen times for new tdrive mounts and they all work fine, since each team drive has its own fresh set of limits for the same account, they are not combined. There are some universal limits such as API hits by ip address, but even generating new keys won't resolve that.
 

PlexPower

Citizen+
Original poster
Sponsor
Mar 18, 2019
16
11
Yep you are right about pguinion2, my bad. You are also correct on the bug. Sometimes it doesn't stick. Updating to the latest rclone fixes this but fyi if you ever go into the PG clone menu, it will revert to 1.48 and you will need to reinstall.

Slow how? On transfers or navigating? If the latter, do sudo pg, option PG clone, then rclone settings. Set your dir cache to the max 7120 I think. Then apply the settings.

Exit PG clone

Increase you inotify count so the system kernel can better cache the file system:

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf
sudo sysctl -p

Then cache the file system:

sudo apt install screen -y

screen -S cache bash
ls -alR /mnt/tdrive2

This will now begin to list the file structure on tdrive2 causing rclone to cache it. This takes a while so to exit the screen press ctrl-a then d. To reconnect type screen -r cache. When it's done type exit to exit the screen. This cache does not persist a reboot, to set it up to do this automatically on reboots see here:
If still slow, you can try creating a new set of keys and putting that in rclone for your new remote, as well as generating a new token. However I've copied my key/token a dozen times for new tdrive mounts and they all work fine, since each team drive has its own fresh set of limits for the same account, they are not combined. There are some universal limits such as API hits by ip address, but even generating new keys won't resolve that.
I will wait a little. i think is good for now.
 

Edrock200

MVP
Staff
Nov 17, 2019
606
216
I will wait a little. i think is good for now.
I forgot to mention the latest rclone supports google shortcuts now. So as long as the account you have mounted the tdrive with has rights to the shortcut target drives, rclone will follow them.

To use this, install the latest rclone :
curl https://rclone.org/install.sh | sudo bash

Then sudo systemctl restart tdrive

In Google drive on the web, go to the drive or folder you want access to, right click, and select "create shortcut." Create the shortcut on the tdrive that is already mounted in pg, and it should show up in /mnt/tdrive as well as /mnt/unionfs.

Note the pg 8.7.5 enforces install of rclone 1.48, which does not support shortcuts, so if you run sudo pg and the pg clone option at any point, you will need to reinstall the latest rclone after.
 

PlexPower

Citizen+
Original poster
Sponsor
Mar 18, 2019
16
11
I forgot to mention the latest rclone supports google shortcuts now. So as long as the account you have mounted the tdrive with has rights to the shortcut target drives, rclone will follow them.

To use this, install the latest rclone :
curl https://rclone.org/install.sh | sudo bash

Then sudo systemctl restart tdrive

In Google drive on the web, go to the drive or folder you want access to, right click, and select "create shortcut." Create the shortcut on the tdrive that is already mounted in pg, and it should show up in /mnt/tdrive as well as /mnt/unionfs.

Note the pg 8.7.5 enforces install of rclone 1.48, which does not support shortcuts, so if you run sudo pg and the pg clone option at any point, you will need to reinstall the latest rclone after.
My friend. You totally lost me. Do i really need that?
 

Edrock200

MVP
Staff
Nov 17, 2019
606
216
My friend. You totally lost me. Do i really need that?
No you don't lol. I was posting this on case someone else comes across this thread because using Google shortcuts is much easier in most cases, basically all you do is upgrade rclone, restart tdrive service, create shortcuts.

But you already have the second drive mounted so no need to do any of this. :)
 

Recommend NewsGroups

      Up To a 58% Discount!

Trending