madslundt / cloud-media-scripts

Upload and stream media from the cloud with or without encryption. Cache all new and recently streamed media locally to access quickly and reduce API calls
MIT License
89 stars 11 forks source link

Can't mount after update #31

Closed Dulanic closed 6 years ago

Dulanic commented 6 years ago

So this was running for me as mentioned previously. I purged all of my current install for this and reran the scripts. I am finding again that it won't mount now. Below is what I am seeing and not sure what the issue is....

CLI:

dulanic@mediaserver:/opt/cloud/scripts$ ./mount.remote
[ 2018-01-08@10:05:50 ] ###### Start Mount ######
[ 2018-01-08@10:05:55 ] Mounting Google Drive with Plexdrive in mountpoint: /opt/cloud/.cloud-encrypt
[ 2018-01-08@10:05:55 ] Mounted successfully with Plexdrive
[ 2018-01-08@10:06:00 ] Could not find encrypted mountpoint: /opt/cloud/.cloud-encrypt. Retrying in 10 seconds.
[ 2018-01-08@10:06:10 ] Could not find encrypted mountpoint: /opt/cloud/.cloud-encrypt. Retrying in 10 seconds.
[ 2018-01-08@10:06:20 ] Could not find encrypted mountpoint: /opt/cloud/.cloud-encrypt. Retrying in 10 seconds.
[ 2018-01-08@10:06:30 ] Could not find encrypted mountpoint: /opt/cloud/.cloud-encrypt. Retrying in 10 seconds.
[ 2018-01-08@10:06:40 ] Could not find encrypted mountpoint: /opt/cloud/.cloud-encrypt. Retrying in 10 seconds.
[ 2018-01-08@10:06:50 ] Could not read mountpoint: /opt/cloud/.cloud-encrypt
[ 2018-01-08@10:06:50 ] Mount failed

My rclone is good....

dulanic@mediaserver:/opt/cloud/rclone$ rclone --config rclone.conf ls gd-crypt:
     1024 .fstab.swp
        4 Media/test
      306 Media/Books/.driveinfo.calibre
        2 Media/Books/.metadata.calibre

My config:

#!/bin/bash
# shellcheck disable=SC2034
###############################################################################
# DIRECTORIES
###############################################################################
media_dir="/opt/cloud"

# Cloud directories
cloud_encrypt_dir="${media_dir}/.cloud-encrypt"
cloud_decrypt_dir="${media_dir}/.cloud-decrypt"

# Local directory
local_decrypt_dir="${media_dir}/.local-decrypt/Media"
plexdrive_temp_dir="/chunks"

# Media directory (FINAL)
local_media_dir="/local-media"

# Encrypt media (0 means no encryption)
encrypt_media=1

###############################################################################
# UNION-FS
###############################################################################
ufs_bin="/usr/bin/unionfs"

# Mount user Id's. Replace $(id with a different ID if you need to override.
uid=1000
gid=1000

ufs_options="-o cow,allow_other,direct_io,nonempty,auto_cache,sync_read,uid=$uid,gid=$gid"

###############################################################################
# PLEXDRIVE
###############################################################################
plexdrive_dir="${media_dir}/plexdrive"
plexdrive_bin="${plexdrive_dir}/plexdrive-linux-amd64"

mongo_database="plexdrive"
mongo_host="192.168.2.155"
mongo_user=""
mongo_password=""

plexdrive_options="--temp=${plexdrive_temp_dir} -o allow_other,read_only --clear-chunk-max-size=300G --clear-chunk-age=24h --chunk-size=10M"

###############################################################################
# RCLONE
###############################################################################
rclone_dir="${media_dir}/rclone"
rclone_bin="${rclone_dir}/rclone"

rclone_config="${rclone_dir}/rclone.conf"
rclone_options="--buffer-size 500M --checkers 16"
rclone_mount_options="${rclone_options} --read-only --allow-non-empty --allow-other --max-read-ahead 30G"

# Rclone endpoints
rclone_cloud_endpoint="gd-crypt:"
rclone_local_endpoint="local-crypt:"

google_drive_media_directory="Media" # Empty means media files are in root

###############################################################################
# Plex (empty trash)
###############################################################################
plex_url="http://192.168.2.155:32400"
plex_token="redacted"

###############################################################################
# MISC. CONFIG
###############################################################################
date_format="+%F@%T"

# Select to remove media files based on 'time', 'space' or 'instant'
#remove_files_based_on="instant"
#remove_files_based_on="time"
remove_files_based_on="space"

# Remove media files based on 'time'
remove_files_older_than=60 # In days

# Remove media files based on 'space'
remove_files_when_space_exceeds=500 # In Gigabytes
freeup_atleast=300  # In Gigabytes
Antexa commented 6 years ago

This line refer to your plexdrive conf not rclone.

[ 2018-01-08@10:06:50 ] Could not read mountpoint: /opt/cloud/.cloud-encrypt

Could you put the following output of this one :

ls -la /opt/cloud
Dulanic commented 6 years ago

It was all owned by my own user ID and the cloud dirs were there. It's OK I decided to go /w plexdrive 5.0 and setup systemd services for everything instead, ends up making things easier on my end.

Antexa commented 6 years ago

Glad to see that you found your solution.

The point of the ls -la, was to check if u got the right permission of execution.

chmod +x /opt/cloud/.cloud-encrypt
Dulanic commented 6 years ago

OK so I gave up on that, 5.0 is slow as shit lol, I reinstalled this again and this time it worked /w the exact same settings, no idea what the difference was.