FOG Images Storage Location



  • Hi,

    I’d like to store some of my images on one drive, and other images on another drive. Is this possible? It seems FOG wants the images to be in /images.

    I’ve read the following bits on how to change it, but am having trouble.

    [url]http://fogproject.org/wiki/index.php?title=Change_NFS_location[/url]
    [url]http://fogproject.org/wiki/index.php/Moving_your_images_directory/Adding_Storage_to_the_Images_directory[/url]
    [url]http://fogproject.org/forum/threads/how-to-change-default-image-store-location.391/[/url]
    [url]http://www.topgearit.net/index.php?title=Change_FOG_Image_Storage_Location[/url]

    One of the issues I’m having is that the file: [FONT=sans-serif][COLOR=#000000]/var/www/fog/commons/config.php does not exist in my Debian 7 install.[/COLOR][/FONT]
    [FONT=sans-serif][COLOR=#000000]Even if it had existed, it seems that one can only change [/COLOR][/FONT][COLOR=#000000]“SPACE_DEFAULT_STORAGE” and not add an additional location. So even if I could move the storage location, I cannot add one. [/COLOR]

    [COLOR=#000000]Ideally I’d like to add another local StorageNode in the web interface. Such that I have:[/COLOR]

    [COLOR=#000000]DefaultMember1 --> /images/drive1[/COLOR]
    [COLOR=#000000]DefaultMember2 --> /images/drive2[/COLOR]

    [COLOR=#000000]Now one could assign the respective images to a respective StorageNode.[/COLOR]

    [COLOR=#000000]Is this a possible scenario?[/COLOR]

    [COLOR=#000000]If I try this I get a message saying “Permission denied cannot mount /images/drive1 on /images”. However, both drives do have the .mntcheck file and are chmod -777 with owner root. I essentially copied the contents of /images to /images/drive1|2 keeping the permissions. I’ve altered the /etc/export as recommended, but cannot locate the config.php “SPACE_DEFAULT_STORAGE”.[/COLOR]

    [COLOR=#000000]FOG Ver. 1.2.0[/COLOR]
    [COLOR=#000000]Debian 7[/COLOR]

    [COLOR=#000000]Thanks,[/COLOR]

    [COLOR=#000000]MrsPotter.[/COLOR]



  • Cool got it working! Sorry for the trouble, indeed I forgot to: [FONT=Consolas]service nfs-kernel-server restart[/FONT]

    [COLOR=#000000]But, after I read the above links I thought there might be more to it. This was not the case. I can now assign images to any of the two locations without trouble.[/COLOR]


  • Senior Developer

    It’s what I do.


  • Moderator

    Damn that was fast, Tom.


  • Senior Developer

    I have not tackled this.


  • Moderator

    [quote=“Tom Elliott, post: 44086, member: 7271”]

    Again, as Berend states, this is a not a hardcoded thing in at least 1.1.2 and higher and is a database setting that you can edit (with the exception of the /etc/exports file) from the FOG Web GUI.[/quote]

    What’s the issue with the Web GUI not changing the /etc/exports file?

    Are there complications, or have you just not tackled this yet?



  • OK, I think I get it, you want to use two storage nodes, both basically the same in all respects, except the image path. Try duplicating your default one exactly, except the image path.

    /etc/exports isn’t updated, so yes, you would have to change that. Probably you would need two entries per image path I think, the dev subpath for uploads, and the other read-only for downloads. So simply copy the existing entries and adapt for your new path. Make sure your /images/drive1 has a dev subdirectory.

    After editing exports reload the daemon: exportfs -ra

    Hopefully this gets you going somewhere.


  • Senior Developer

    In 1.1.2 we moved the config.php to ${webroot}/fog/lib/fog/Config.class.php. This, as Berend states, doesn’t matter though. The setting that is called was used only for the freespace (dashboard) and even that wasn’t necessarily correct.

    ${webroot} is typically /var/www for debian based systems and /var/www/html for redhat based systems.

    The NFS needs to be updated to reflect your real storage location.

    This file is usually located at: /etc/exports

    Once you make the edits you need, you can reload the exports with:
    [code]exportfs -a[/code]

    OR

    For Debian/Ubuntu based systems
    [code]service nfs-kernel-server restart[/code]

    For Redhat Based systems
    [code]service nfs restart[/code]

    Again, as Berend states, this is a not a hardcoded thing in at least 1.1.2 and higher and is a database setting that you can edit (with the exception of the /etc/exports file) from the FOG Web GUI.



  • I’m not sure I can see your problem though, why can’t you add a new storage node or change an existing storage node? The /images path is not hard-coded, simply a setting of the default storage node.



  • The first link is severely outdated, have marked it as such.


Log in to reply
 

353
Online

39.3k
Users

11.0k
Topics

104.4k
Posts

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.