merged mounts


Wob76

Recommended Posts

Hi,

 

I am playing around with acd_cli and encfs, at the moment I have both acd_cli and encfs working on my unraid OS, still early stages, I am still waiting to see how the reliable it is and I still need to look at making a plugin or script so that it will stay after a reboot.

 

One guide I found online suggested using unionfs-FUSE to make a fused folder with cloud and local data shown, the cloud layer would be read only and the local mount point a write part, since the unraid filesystem works in a similar fashion I thought I might be able to do this without without the need to install unionfs-FUSE, can anyone tell me of there are some mount options I can use with unraid to complete the same setup?

 

My Goal is to maintain my data local, but have a ACD bucket that I can move older (say 5+ years) data into. I am aware of the encryption limitations of encfs, but for my purposes they really shouldn't be an issue.

 

Regards,

Wob

Link to comment

OK,

 

So I have ended up using mount -t overlay, still to test it, but can anyone comment on if the following should be ok, for now I have just done a read only mount.

 

mount -t overlay overlay -olowerdir=/mnt/user/Media/:/mnt/user/cloud/acd/ /mnt/user/cloud/media/

 

So;

/mnt/user/Media is my local content.

/mnt/user/cloud/acd is my content stored on Amazon Cloud Drive.

 

/cloud/ is a cache only share, although no local data is in this folder the acd_cli tool does seem to buffer where ever the mount point is, I had it on the flash drive (/mnt/) at one point and saw speed issues, on my SSD (cache drive) it seems to work fine.

 

So I am hoping if I point at /mnt/user/cloud/media/ I will get a local file if it exists, if not it will pull from ACD.

 

Link to comment

Can anyone help as to why my overlay mount will not pass into my docker container?

 

I have a encfs and a acd_cli as well as the overlayfs mount all passed into the docker, all work except the overlayfs. I was thinking permission, the other mounts are fuse and I am using allow_other to grant access, overlayfs doesn't appear to have a similar option.

 

Thanks in advanced.

Link to comment

Thanks for reply squid, I did try that after I found a post of yours about volume mapping, but it didn't help.

 

This is what my mounts look like in unraid.

encfs on /mnt/cache/cloud/.local type fuse.encfs (rw,nosuid,nodev,allow_other,default_permissions)
ACDFuse on /mnt/cache/cloud/.acd type fuse.ACDFuse (rw,nosuid,nodev,allow_other)
encfs on /mnt/cache/cloud/acd type fuse.encfs (ro,nosuid,nodev,allow_other,default_permissions)
overlay on /mnt/user/cloud/media type overlay (ro,lowerdir=/mnt/user/Media/:/mnt/user/cloud/acd/)

 

This is what I get inside the docker.

/dev/sde1 on /cloud type btrfs (rw,noatime,nodiratime,ssd,space_cache,subvolid=5,subvol=/cloud)
encfs on /cloud/.local type fuse.encfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other)
ACDFuse on /cloud/.acd type fuse.ACDFuse (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
encfs on /cloud/acd type fuse.encfs (ro,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other)

 

For the actual docker settings I am just mapping /mnt/user/cloud to /cloud/ and I have tried it set as RW or RW/Slave.

If I look at the available file with cat /proc/filesystems both inside and outside the container I see overlay.

 

Any other ideas?

Link to comment

Ok,

 

If I add the :z option to the end of my volume mapping appears to resolve my issue, something to do with SELinux permission, I don't fully understand it, but hey it worked.

 

Relative link (http://www.projectatomic.io/blog/2015/06/using-volumes-with-docker-can-cause-problems-with-selinux/)

 

My next question, is it possible to add the z or Z option to volume mapping via the GUI?

 

Thanks,

Wob

 

Update: So further reading and testing and it appears the SELinux is not part of unraid, so anyone know what a :z option on the volume mapping works here?

Link to comment

User error...

 

The :z option had nothing to do with it.

 

I had my mount point as /mnt/user/cloud/media/

 

But I had my volume on the docker mapped to /mnt/cache/cloud/

 

Changed to docker to point to /mnt/user/cloud and it is working. interesting note, my encfs and acd_cli mounts are all pointing to /mnt/cache but show up fine in the docker, I put this down to them being fused mounts.

 

mounts in the docker now look like this.

shfs on /cloud type fuse.shfs (rw,nosuid,nodev,noatime,user_id=0,group_id=0,allow_other)
overlay on /cloud/media type overlay (ro,relatime,lowerdir=/mnt/user/Media/:/mnt/user/cloud/acd/)

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.