uxora-com / xpenology-docker

Docker configured to run a KVM VirtualMachine of Xpenology dsm 6.2.3 ( and 7.0.1 with redpill)
43 stars 12 forks source link

Help with Mounting Docker Host Volumes to Xpenology #3

Closed shaun-blake closed 3 years ago

shaun-blake commented 3 years ago

I'm trying to follow the instructions from the Mounting Docker Host Volumes to Xpenology section, but I'm new the everything except docker so I'm not sure how it's supposed to work.

Here's a summary of where I'm at:

Now I'm just trying to manually step through the script before I try to create a script that runs at startup. By the way, if I'm just using all the defaults, do I need to do anything manually?

Anyways, I've tried this but get an error:

$ sudo insmod /volume1/homes/admin/9pnet.ko
insmod: ERROR: could not load module /volume1/homes/admin/9pnet.ko: No such file or directory

So I guess those instructions were for if you had those .ko files stored there?

I do see them in /usr/lib/modules/update:

$ ll /usr/lib/modules/update/9p*
-rwxrwxrwx 1 root root 72752 Oct  8 15:12 /usr/lib/modules/update/9p.ko
-rwxrwxrwx 1 root root 73640 Oct  8 15:12 /usr/lib/modules/update/9pnet.ko
-rwxrwxrwx 1 root root 15528 Oct  8 15:12 /usr/lib/modules/update/9pnet_virtio.ko

If I try this, I get an error:

$ sudo insmod /usr/lib/modules/update/9pnet.ko
insmod: ERROR: could not insert module /usr/lib/modules/update/9pnet.ko: File exists

So I think that must mean they're already loaded and I can skip that section?

Then I do this:

$ ll /volume1/datashare
total 0
drwxrwxrwx+ 1 root root  12 Dec 31 11:39 .
drwxr-xr-x  1 root root 104 Dec 31 09:52 ..
drwxrwxrwx+ 1 root root   8 Dec 31 11:39 @eaDir
$ sudo mount -t 9p -o trans=virtio,version=9p2000.L,msize=262144 hostdata /volume1/datashare
$ ll /volume1/datashare
total 4
drwxr-xr-x 1 root root 4096 Dec 31 02:33 .
drwxr-xr-x 1 root root  104 Dec 31 09:52 ..
$ sudo touch /volume1/datashare/newfile-from-synology.txt

But that /volume/datashare directory doesn't seem to be tied to my docker bind mount because that file doesn't get created in my host directory and if I create one on the bind-mount host directory, I don't see it inside the synology vm.

It seems like I'm close. Could anyone give me a little guidance?

shaun-blake commented 3 years ago

I'm not sure what I was doing wrong before, but I was able to get everything set up correctly. I just bind-mounted my host folder to /datashare in the image, created the datashare shared directory in volume1, then ran the mount command from the README and everything connected up as expected.