Moving the Default Image Storage
I’ve been working on moving the default storage location of the newest version of Fog. I followed [URL=‘http://topgearit.net/index.php?title=Change_FOG_Image_Storage_Location’]this guide[/URL] to the letter, and everything is working with the exception of the storage reporting done by the web interface. It looks like the SPACE_DEFAULT_STORAGE variable was moved from the freespace.php file to a different location. Has anyone looked into this? I think I found something similar in one of the files under commons, but I’m not positive it’s the same thing. It should also be noted that the commons directory is now under the /var/www/html/fog directory.
First and foremost, system.php is the file that always defined SPACE_DEFAULT_STORAGE, and at least with 0.32 and higher, has always been defined and located in commons/system.php.
Second, the SPACE_DEFAULT_STORAGE variable always returned based on that particular setting. This meant, if you had a storage node located at /data/somedir/images rather than /images, the only way to get the data to return was to either change this variable to the proper location on the fog server or create a symbolic link as /images on the system.
This same applied to other storage nodes. I fixed this issue by just performing a df on the systems proper directory thus limiting the reporting of the SPACE_DEFAULT_STORAGE unless it could not find information on the other nodes.
It didn’t moved, it never moved, just the means of obtaining the information changed.