madslundt / docker-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
100 stars 34 forks source link

Fuse folder /local-media can see files in container but not in host mapped to /media #2

Closed Azlaroc closed 7 years ago

Azlaroc commented 7 years ago

my fuse of two folders in the container is working just fine but when I browse the host and look I am not seeing the fused files in the folder I have mapped. in the container /local-decrypt and /cloud-decrypt are fused together to /local-media /local-media in the container is mapped to /media in the host from within the container I can see files in /local-media but not from /media in the host

Azlaroc commented 7 years ago

I will provide details of my build and setup tonight. Maybe its a permissions issue with the /media folder in the host?

davidjameshowell commented 7 years ago

What's the output of docker inspect for that container?

Azlaroc commented 7 years ago

[ { "Id": "bdf06605cc65f87e0d003414a9488d407ff78693552e9d0fa97aa14ef7a0dc45", "Created": "2017-08-22T14:39:12.113480152Z", "Path": "/bin/sh", "Args": [ "-c", "init" ], "State": { "Status": "running", "Running": true, "Paused": false, "Restarting": false, "OOMKilled": false, "Dead": false, "Pid": 5117, "ExitCode": 0, "Error": "", "StartedAt": "2017-08-22T14:59:56.516297136Z", "FinishedAt": "2017-08-22T14:59:50.246648037Z" }, "Image": "sha256:72f44adfefba30f6c230b47cf26e5dce3d161580d1b7d383ece823db67b8b836", "ResolvConfPath": "/var/lib/docker/containers/bdf06605cc65f87e0d003414a9488d407ff78693552e9d0fa97aa14ef7a0dc45/resolv.conf", "HostnamePath": "/var/lib/docker/containers/bdf06605cc65f87e0d003414a9488d407ff78693552e9d0fa97aa14ef7a0dc45/hostname", "HostsPath": "/var/lib/docker/containers/bdf06605cc65f87e0d003414a9488d407ff78693552e9d0fa97aa14ef7a0dc45/hosts", "LogPath": "/var/lib/docker/containers/bdf06605cc65f87e0d003414a9488d407ff78693552e9d0fa97aa14ef7a0dc45/bdf06605cc65f87e0d003414a9488d407ff78693552e9d0fa97aa14ef7a0dc45-json.log", "Name": "/cloud-media-scripts-mcm897_51806350433", "RestartCount": 0, "Driver": "overlay", "MountLabel": "", "ProcessLabel": "", "AppArmorProfile": "", "ExecIDs": [ "c2ef5f069b672779da99112a05b71f32349a3266eeda7743b90a5b8c41ab6925" ], "HostConfig": { "Binds": [ "/media:/local-media", "/mnt/external/media:/local-decrypt", "/configurations:/config", "/mnt/external/plexdrive:/chunks", "/logs:/log" ], "ContainerIDFile": "", "LogConfig": { "Type": "json-file", "Config": {} }, "NetworkMode": "default", "PortBindings": null, "RestartPolicy": { "Name": "no", "MaximumRetryCount": 0 }, "AutoRemove": false, "VolumeDriver": "", "VolumesFrom": null, "CapAdd": [ "MKNOD", "SYS_ADMIN" ], "CapDrop": null, "Dns": null, "DnsOptions": null, "DnsSearch": null, "ExtraHosts": null, "GroupAdd": null, "IpcMode": "", "Cgroup": "", "Links": null, "OomScoreAdj": 0, "PidMode": "", "Privileged": true, "PublishAllPorts": true, "ReadonlyRootfs": false, "SecurityOpt": [ "label=disable" ], "UTSMode": "", "UsernsMode": "", "ShmSize": 67108864, "Runtime": "runc", "ConsoleSize": [ 0, 0 ], "Isolation": "", "CpuShares": 0, "Memory": 0, "CgroupParent": "", "BlkioWeight": 0, "BlkioWeightDevice": null, "BlkioDeviceReadBps": null, "BlkioDeviceWriteBps": null, "BlkioDeviceReadIOps": null, "BlkioDeviceWriteIOps": null, "CpuPeriod": 0, "CpuQuota": 0, "CpusetCpus": "", "CpusetMems": "", "Devices": [ { "PathOnHost": "/dev/fuse", "PathInContainer": "/dev/fuse", "CgroupPermissions": "" } ], "DiskQuota": 0, "KernelMemory": 0, "MemoryReservation": 0, "MemorySwap": 0, "MemorySwappiness": -1, "OomKillDisable": false, "PidsLimit": 0, "Ulimits": null, "CpuCount": 0, "CpuPercent": 0, "IOMaximumIOps": 0, "IOMaximumBandwidth": 0 }, "GraphDriver": { "Name": "overlay", "Data": { "LowerDir": "/var/lib/docker/overlay/e722957f0eff33c43a2fe95dbe9c187f806cd4e995450c84634740f491eab4c0/root", "MergedDir": "/var/lib/docker/overlay/34d7ae08810dcf4d2560a32e327f6f0e72e6c4c0c8d233cd940f45d5d5d7d3ce/merged", "UpperDir": "/var/lib/docker/overlay/34d7ae08810dcf4d2560a32e327f6f0e72e6c4c0c8d233cd940f45d5d5d7d3ce/upper", "WorkDir": "/var/lib/docker/overlay/34d7ae08810dcf4d2560a32e327f6f0e72e6c4c0c8d233cd940f45d5d5d7d3ce/work" } }, "Mounts": [ { "Source": "/media", "Destination": "/local-media", "Mode": "", "RW": true, "Propagation": "rprivate" }, { "Source": "/mnt/external/media", "Destination": "/local-decrypt", "Mode": "", "RW": true, "Propagation": "rprivate" }, { "Source": "/configurations", "Destination": "/config", "Mode": "", "RW": true, "Propagation": "rprivate" }, { "Source": "/mnt/external/plexdrive", "Destination": "/chunks", "Mode": "", "RW": true, "Propagation": "rprivate" }, { "Source": "/logs", "Destination": "/log", "Mode": "", "RW": true, "Propagation": "rprivate" }, { "Name": "5e598e69482e25088f55f4db5eea5d68ad18f639d24fcb0de663989ecade263f", "Source": "/var/lib/docker/volumes/5e598e69482e25088f55f4db5eea5d68ad18f639d24fcb0de663989ecade263f/_data", "Destination": "/cloud-encrypt", "Driver": "local", "Mode": "", "RW": true, "Propagation": "" }, { "Name": "c01876d6dfe72123a54a6f1ace93d94445eaae0cc764647d52de6ce8b66d456c", "Source": "/var/lib/docker/volumes/c01876d6dfe72123a54a6f1ace93d94445eaae0cc764647d52de6ce8b66d456c/_data", "Destination": "/data/db", "Driver": "local", "Mode": "", "RW": true, "Propagation": "" }, { "Name": "d1f2176694221c0ff04c869831e285454d26de71bf5f242964d60ec3fe0d260e", "Source": "/var/lib/docker/volumes/d1f2176694221c0ff04c869831e285454d26de71bf5f242964d60ec3fe0d260e/_data", "Destination": "/cloud-decrypt", "Driver": "local", "Mode": "", "RW": true, "Propagation": "" } ], "Config": { "Hostname": "bdf06605cc65", "Domainname": "", "User": "", "AttachStdin": false, "AttachStdout": false, "AttachStderr": false, "Tty": true, "OpenStdin": true, "StdinOnce": false, "Env": [ "REMOVE_LOCAL_FILES_WHEN_SPACE_EXCEEDS_GB=\"350\"", "FREEUP_ATLEAST_GB=\"100\"", "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "BUFFER_SIZE=500M", "MAX_READ_AHEAD=30G", "CHECKERS=16", "RCLONE_CLOUD_ENDPOINT=gd-crypt:", "RCLONE_LOCAL_ENDPOINT=local-crypt:", "CHUNK_SIZE=10M", "CLEAR_CHUNK_MAX_SIZE=", "CLEAR_CHUNK_AGE=24h", "MONGO_DATABASE=plexdrive", "DATE_FORMAT=+%F@%T", "REMOVE_LOCAL_FILES_BASED_ON=space", "REMOVE_LOCAL_FILES_AFTER_DAYS=30" ], "Cmd": [ "/bin/sh", "-c", "init" ], "Image": "madslundt/cloud-media-scripts:latest", "Volumes": { "/chunks": {}, "/cloud-decrypt": {}, "/cloud-encrypt": {}, "/config": {}, "/data/db": {}, "/local-decrypt": {}, "/local-media": {}, "/log": {} }, "WorkingDir": "/data", "Entrypoint": null, "OnBuild": null, "Labels": {} }, "NetworkSettings": { "Bridge": "", "SandboxID": "f6e987ae6feada75facdbfaf0fc996c1ca53e1eb4bf26853a365a763cd4dd62d", "HairpinMode": false, "LinkLocalIPv6Address": "", "LinkLocalIPv6PrefixLen": 0, "Ports": {}, "SandboxKey": "/var/run/docker/netns/f6e987ae6fea", "SecondaryIPAddresses": null, "SecondaryIPv6Addresses": null, "EndpointID": "2263f482305fdd77e7d2a2f65542f2825a81487f5f38c87e8c814fa06af3381a", "Gateway": "172.17.0.1", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "IPAddress": "172.17.0.3", "IPPrefixLen": 16, "IPv6Gateway": "", "MacAddress": "02:42:ac:11:00:03", "Networks": { "bridge": { "IPAMConfig": null, "Links": null, "Aliases": null, "NetworkID": "6448b57de935be718afd3dfa5b3d0f465309cbbc4c2ad0f907157a25f3953eb7", "EndpointID": "2263f482305fdd77e7d2a2f65542f2825a81487f5f38c87e8c814fa06af3381a", "Gateway": "172.17.0.1", "IPAddress": "172.17.0.3", "IPPrefixLen": 16, "IPv6Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "MacAddress": "02:42:ac:11:00:03" } } } } ]

madslundt commented 7 years ago

Did you add the :shared to the volumes?

https://github.com/madslundt/docker-cloud-media-scripts#parameters

Azlaroc commented 7 years ago

I did not, Let me try that. I will let you know.

Azlaroc commented 7 years ago

Sir you are a genius! That worked! Thank you for making this for everyone! In the coming days I will document how I got this up and running on photon OS being managed by Admiral. Thanks again!

madslundt commented 7 years ago

Glad I could help and good job with the document!