make sure you have NFS enabled on the Syno (file services)
also make sure you have nfs-common installed on the debian host.
make the directory on the host where /config will be mapped.
( I’ll use ‘/dockerplex’ in this example. Edit appropriately)
Mount and suck across the entire Plex shared folder
sudo bash
# Make the container's map point
mkdir /dockerplex
mount lan.ip.of.syno:/volume1 /mnt
cd /mnt/Plex
# Mass copy
tar cf - . | (cd /dockerplex ; tar xf -)
# If you're changing uid/gid, fix it now
chown -R newUID:newGID /dockerplex
umount /mnt
Make directories for where each share from the syno will mount.
sudo bash
mkdir /syno
mkdir /syno/volume1 /syno/volume2 (add one for each volume)
chmod 755 -R /syno
Setup /etc/fstab (Showing NFS here – which is the easiest)
Here’s the magic for in the container: (the media volume mapping)
This keeps the environment inside the container exactly as it was native on the syno.
Instead of NFS, I’ll be using cifs. I’ve already mapped the Synology media drive to Debian, so that part is good.
I read somewhere that only the Media, Metadata, Plug-in Support, and Plug-ins folders need to be migrated, yet you say bring it all. What is difference? Do I need Cache, Codecs, Crash Reports, Diagnostics, and Logs from the Synology installation? Not trying to be argumentative, just learning here.
Both are native Linux machines but you want to use a Microsoft protocol and not the native NFS (Linux) protocol ?
NFS is a LOT faster and easier (and supports multiple concurrent usernames) than CIFS on Linux
By performing a full map, you won’t need to edit the shared folders ( a typical required step ) after you migrate.
You’ll still have the same amount of data in the end but why waste the time rebuilding it , and the manual labor, if you can just copy it and be smart about it ?
This is the one advantage of moving Linux → Linux AND being in a container.
The container can emulate the Synology fileystem
To put this in perspective, total time for this task should be:
Time for the tar copy of all the data to complete
Add 15 minutes to setup the local linux host for the NFS mount points
Synology’s NFS implementation is a mess. If this was Linux-to-Linux, I’d consider NFS, but, Synology Linux? That’s not for me. FWIW, I’ve been using cifs with success, and high transport.
Actually, their implementation is exactly per specification.
I have a DS1815+, I have a Ubuntu 20.04 NAS DIY server, the NFS mount is the exact same .
mount IP-or-host:/path/to/directory /local-path
If you want speed, add the async option (they have sync, per spec, as default)
There is one limitation, RSIZE and WSIZE max at 131072. This is the old spec.
Regardless of these limits, I can still saturate 1 Gbps coming from the NAS.
When I setup LACP, it will deliver 3 Gbps (on 4 links) sustained .
If you want CIFS and are comfortable with it – that’s , of course, your call.
Re the sequence above, it will work with CIFS .
Mirroring the Plex environment (which is Linux) inside the container works.
I do it very often here with my testing when developing the packaging.
I have several LXCs and they are wonderful to work with.
Well… I think I’m there… but potentially have some mapping on reboot issues as the docker mappings may be getting ahead of the drive mappings from my NAS, which then cannot complete.
But otherwise things are good.
I did notice though that all my shows are being rescanned for intros… So maybe that data does not reside locally… but most metadata (except for a few posters), and viewing history seems to be good.
What I see is that /media/nas_media is not mounting my NAS volume1/media shared folder, but instead /media/nas_media displays empty folders “tv shows” and “downloads” which appear to be created from my sonarr container, which has the following volume mappings…
A-ha. That pesky “volume1” … I’ll give this a shot. I was hoping only to map “media” under which both “tv shows”, “movies”, and “downloads” all exist… And then point to the specfic “tv shows” folder in the Plex library mapping. FWIW, I’m coming from DSM6.
I’m still having issues with docker containers starting before the NAS shares are mounted> When this happens docker creates the necessary folders at the mount location, and the fstab mount then fails.
Somehow I must delay docker until the NAS shares are mounted.
FWIW, I tried NFS mounts and the same happened.For now, I will drop the “restart always” on affected containers.
I moved Plex to Debian (Buster headless) in a docker container. The NAS shared folder “media” looks like this…
media
| - tv
| - movies
Initially, using fstab, I mapped /volume1/media/ (Syno) to /media/nas_media (Debian)
The Plex libraries (tv, for example), then mapped to /media/nas_media/tv using Library settings.
I also run a sonarr container on Debian… with a volume mount like
volume:
- media/nas_media/tv:tv
Everyone is happy until I reboot. Apparently docker runs before the mount “handshake” between Debian and Synology is complete. Two problems surface.
Because sonarr is expecting /media/nas_media/tv, it adds the folder tv to /media/nas_media… which prevents the mapping to occur between Debian and Synology, as the directory /media/nas_media is no longer empty. Hence Plex sees no tv content.
If I instead, prevent sonarr from restarting at reboot, The Plex docker starts, and sees only an unmounted /media/nas_media folder, and fails, before the mount “handshake” completes.
I searched quite a bit and found a post (which I’ve mispladed, lol) referring me to “autofs”. And another somewhat related link.