photonix icon indicating copy to clipboard operation
photonix copied to clipboard

Need some explanations about the mounted columes purpose

Open ovizii opened this issue 2 years ago • 2 comments

Excerpt from my docker-compose.yml

    volumes:
      - ./data/photos:/data/photos
      - ./data/raw-photos-processed:/data/raw-photos-processed
      - ./data/cache:/data/cache
      - ./data/models:/data/models

What is the use of this folder: /data/raw-photos-processed ? What should I mount in there?

https://photonix.org/docs/installing/ says:

You can move some photos into the folder data/photos and they should get detected and imported immediately. Once you have finished trying out the system you can edit the volume in the docker-compose.yml file where it says ./data/photos to mount wherever you usually keep photos.

Is it "ok" to mount i.e. /pics/myphotos into /data/photos if I have raws, processed tiffs, jpegs, etc. in there?

ovizii avatar Sep 23 '21 09:09 ovizii

Hi @ovizii. Putting everything a dir mounted to /data/photos is the intended setup - whether they be raws, tiffs etc. /data/raw-photos-processed is for internal use when the system has to convert a raw to JPEG for convenience. I agree it is confusing and am thinking I should maybe just merge it in with /data/cache.

damianmoore avatar Oct 06 '21 22:10 damianmoore

Something to be aware of is there are big performance benefits to be had in docker if folders are part of the same volume mount.

This is because docker implements separate volume mounts as separate filesystems (regardless of their location on the host) with all the traditional slow downs that come with that e.g a mv is no longer a simple rename in the container even if it may be possible on the host

The downside of a lower number of mounts is that it the less flexible it is for users.

However users can still forge their own path and mount specifics that benefit them specifically underneath higher level mount points.

The risk here is if the container logic blindly assumes it has full control of a subfolder i.e. if first run created ./data/whatever and the logic assumed it was free to modify that path in a destructive manner (since it was specific to the container) a user who then adds a mount for that path that helps their specific setup could see negative results.

There will be a happy medium here but I would suggest the mounts should be split to care more about bulk storage and internal processing than anything else.

nomandera avatar Oct 07 '21 07:10 nomandera