Moving storage to different location
-
I have currently 4 images in a storage (default) at location /images. I have added a new SSD disk and mounted (ext4) it to /images-fog. I then copied everything: cp -rp /images/* /images-fog. Then I changed the storage (default) path in the FOG web fronted to /images-fog. However, even after restarting the system, I was not able to download any image anymore. Am I missing something? I have followed the guide https://wiki.fogproject.org/wiki/index.php/Moving_your_images_directory/Adding_Storage_to_the_Images_directory. The only difference is that all permissions of /images-fog are 777 and root:root, because this was already the case of /images.
I would be greateful for any help.
-
@jetint As you don’t need the old /images directory anymore it would be a lot easier to just mount your new disk into that path without messing around in the settings. Move the images to your new disk (mounted somewhere), then unmount it, empty /images (hope you have a backup) and mount the new disk to /images, done.
-
This post is deleted! -
@Sebastian-Roth Yes, this is actually much easier. However, I have tried this before, but this did not work too.
-
What exactly did you do and which errors did you see??
As a temporary solution to not kill your images you can just move /images for the moment.
mv /images /images-old mkdir /images umount /images-fog mount /dev/sd<xy> /images touch /images/.mntcheck touch /images/dev/.mntcheck chmod -R 777 /images
Depending on having copied the images to the new disk already you are now ready to go. But make sure you add the disk to your fstab to have it automounted on reboot!
-
it seems that when you modify images path on the web frontend, the export file (nfs) is not modified. You have to modify it and relaunch nfs
-
@plegrand said:
it seems that when you modify images path on the web frontend, the export file (nfs) is not modified. You have to modify it and relaunch nfs
This I would expect. Since the process that runs the web service is not/should not have root level access (which is required to modify the nfs share). I think this should be the function of the install script to update the nfs share AND the database. Where you would just update the .fogsettings file and then rerun the installer and the rights bits should be put into place. We would need the @developers to look at this to update the install script.
-
@george1421 I can prob do that.
-
@Wayne-Workman The thing I noticed with the installer script is that it will skip over the database updates if there are already settings. That installer needs to replace the settings in the database as well as update the exports file.