Fog 1.2.0, How to change images location?
I have searched and found nothing helpful. I followed the directions that apparently worked for version 0.32, but they do not work now (at least not for me).
We have two fog servers that are sharing the same storage and we want to keep them separated. We can’t very well do that if both Fog servers have to store their images in the ‘/images’ directory.
What am I missing?
Here is what I tried:
These are the places that you need to alter for the new storage location:
define( “STORAGE_DATADIR”, “/images/” );
define( “STORAGE_DATADIR_UPLOAD”, “/images/dev/” );
after editing the exports:
Log in to fog via web and go to:
Storage Management > All Storage Nodes > DefaultMember
and edit the entry of the “Image Location:” to <whatever you changed this to>
Hi Jimmyboy, regarding the docker container you mentioned: Could you please have a look at http://fogproject.org/forum/threads/create-a-docker-container.12747?
Well, I forgot about this and worked on some other things, and rather than try to get this right, I just took the easy way out…
On the host machine running the first Fog server, symlink ‘/images’ pointing to ‘/mnt/nas/images-lab’, and on the LXC container, symlink ‘/images’ pointing to ‘/mnt/nas/images-tr’.
But one day, I would like to get this right and change the images path in the Fog configuration.
Hi Wolfbane, yes you have the right idea. Actually, I am doing something that I have not seen anyone talk about on the internet… I have the first Fog server running on a CentOS host. On that same host I created a Docker container (that was fun) and I am running a Fog server in that container with it’s own static IP.
With containers you can have native access to storage at near-native speed. That is exactly what we wanted, because we didn’t want use NFS, which would force us to deal with the performance hit of sending all disk transactions through the network stack. We get great performance (roughly 500 MB/s with a 2GB file) when the container pulls a file.
So we just about have this worked out, but we don’t want the images from one subnet to be in the same directory as the other subnet. We are not really concerned with overwriting due to identical names, we are more concerned about not having any segregation inside the ‘/images’ directory. Ideally, we would rather have it something like this: /images-lab, /images-training.
Thanks for the response.
Storage 1 (same harddrive on a vm)
So you are saying that [Server 1] and [Server 2] both share /images on [Storage 1].
This will work without issues as long as you do not call the images the same name. so [Server 1] can have /images/image_dell] and [Server 2] can have /images/image_Dell. (yes they are different!).
If you do use the same name the last to upload will overwrite the original.
Odd some of the devs discussed this same issue earlier last week.