JuliaCloud / JuliaBox

Juliabox continues to run, but this codebase is no longer current.
http://www.juliabox.org/
Other
185 stars 50 forks source link

Loopback volumes #476

Closed barche closed 7 years ago

barche commented 7 years ago

What is the rationale for using loopback volumes for the user home directories? Why not use a "normal" volume as e.g. here: https://docs.docker.com/engine/tutorials/dockervolumes/#/adding-a-data-volume

tanmaykm commented 7 years ago

Primarily to control amount of disk space. It allows the disk to be moved back and forth from an objectstore (S3) backup. JuliaBox can also mount other types of disks (e.g. EBS volumes) using the same scheme.

Docker volumes are also essentially mounted from the host system, though their creation and location is internal to docker.

barche commented 7 years ago

Thanks, I had actually configured docker to use direct-lvm devicemapper storage, in the hopes it would be more efficient. Do you think there would be a noticeable performance gain from using regular docker volumes over the loopback mounts in that case? I assume it should be possible to implement this using a juliabox volume plugin?

nkottary commented 7 years ago

You can use the vol_hostdisk plugin for that.

barche commented 7 years ago

Thanks that works, though I also ended up switching to overlay2 as storage driver, so I could put all JuliaBox-related data on the same partition. This seems faster than devicemapper anyway.

tanmaykm commented 7 years ago

Good to know that ovarlay2 is faster than devicemapper. Have you also compared with aufs? Thanks.

barche commented 7 years ago

I haven't tried aufs, but the docker docs seem to suggest overlay(2) is its successor. I did try the regular overlay, but as documented in several issues it ran out of inodes almost immediately on ext4, overlay2 definitely fixes that.