• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Changing the directory where Fog images are stored question

    Scheduled Pinned Locked Moved
    FOG Problems
    7
    28
    17.0k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      PageTown
      last edited by

      Hello! I am doing a fresh install of Fog 1.2.0 on Ubuntu 12.04. I have two drives, an SSD on which I have installed Ubuntu and Fog, and a HDD where I plan to store my Fog images.

      So far, I have changed the image storage file path in Storage Management web interface. My question is, is there any place else I need to change the path? There are several different articles online about doing this and some of the files they mention I cannot find on my machine.

      Thank you!

      1 Reply Last reply Reply Quote 0
      • JJ FullmerJ
        JJ Fullmer Testers
        last edited by

        The easiest thing to do is probably just leave it as default /images but then either mount the HDD to the path /images in your /etc/fstab nano /etc/fstab or make a symlink with sudo ln -s /path/to/hdd/images /images I personally use the symlink method. In my case I just wasn’t paying attention when I partition my drive and made a /home data partition of 400 GB and a / partition of 80 GB. I realized too late that this meant that I only had 80 GB for images… Since I didn’t feel like editing the partition table or starting over, I just moved the /images folder to a folder in /home/fogRootSystem and made a symlink to point /images to that folder and it worked like a charm.

        Otherwise you also would want to edit your /etc/exports and make sure that it is pointing the nfs directory to your /images (Fog might do this for you if you specified it during install or in the gui)
        You also would want to consider moving the snapins directory as it would normally be in /opt/fog/snapins and if you have a lot of scripts and large installers, than that directory can get pretty big too. Granted any of these would run faster on an ssd.

        Hope that helps.

        Have you tried the FogApi powershell module? It's pretty cool IMHO
        https://github.com/darksidemilk/FogApi
        https://fogapi.readthedocs.io/en/latest/
        https://www.powershellgallery.com/packages/FogApi
        https://forums.fogproject.org/topic/12026/powershell-api-module

        1 Reply Last reply Reply Quote 1
        • JJ FullmerJ
          JJ Fullmer Testers
          last edited by

          Also, if you choose to change the snapin directory and then have problems with the client, here’s a fix

          https://forums.fogproject.org/topic/6582/ca-fog-service-error-failed-to-decrypt-when-snapins-in-non-default-directory

          Have you tried the FogApi powershell module? It's pretty cool IMHO
          https://github.com/darksidemilk/FogApi
          https://fogapi.readthedocs.io/en/latest/
          https://www.powershellgallery.com/packages/FogApi
          https://forums.fogproject.org/topic/12026/powershell-api-module

          1 Reply Last reply Reply Quote 0
          • Wayne WorkmanW
            Wayne Workman
            last edited by

            The way @Arrowhead-IT posted looks legit.

            I’d probably name the path something along the lines of /disk2 personally, and then mount the hdd to that directory (using /etc/fstab) and then modifying /etc/exports to export that directory. You’d of course create the dev sub directory, and create .mntcheck files both in the new directory and the dev directory. Then finally create your storage management entries.

            Note the IDs inside the /etc/exports must each be unique, and you’d need (at least at first) 777 permissions recursively on the directory once everything is built.

            Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
            Daily Clean Installation Results:
            https://fogtesting.fogproject.us/
            FOG Reporting:
            https://fog-external-reporting-results.fogproject.us/

            1 Reply Last reply Reply Quote 1
            • H
              Hanz
              last edited by

              I just had to do this and can verify that changing parameters for /images directory in .fogsettings and rerunning installer…then changing it in gui worked like a charm with no export modifcation necessary as fog did it for me. Mounted of course in /etc/fstab as UUID.

              P 1 Reply Last reply Reply Quote 2
              • P
                PageTown @Hanz
                last edited by

                @Hanz

                I am a not very experienced with Linux, so I am going to try your suggestion first. Quick question, where can I find the .fogsettings file? I have been unable to locate it. Also, what does “Mounted of course in /etc/fstab as UUID” mean? Thanks!

                H 1 Reply Last reply Reply Quote 0
                • H
                  Hanz @PageTown
                  last edited by

                  @PageTown /opt/fog/.fogsettings —the file is hidden under that directory, but with nano (which I prefer and will need installed) or vi, it can be edited and resaved.

                  If you google mounting in linux it will give you an idea of how I mounted the volume with /etc/fstab, there’s a lot out there on the subject

                  P 1 Reply Last reply Reply Quote 0
                  • P
                    PageTown @Hanz
                    last edited by

                    @Hanz

                    Here are the contents of my fogsettings folder. I’m not sure which parameter I need to change to redirect where my images are stored:

                    Created by the FOG Installer

                    Version: 1.2.0

                    Install time: Mon 01 Feb 2016 08:57:55 AM CST

                    ipaddress=“10.1.8.10”;
                    interface=“eth0”;
                    routeraddress=“# option routers x.x.x.x;”;
                    plainrouter=“”;
                    dnsaddress=“# option domain-name-servers x.x.x.x; “;
                    dnsbootimage=””;
                    password=“0cac54”;
                    osid=“2”;
                    osname=“Debian”;
                    dodhcp=“n”;
                    bldhcp=“0”;
                    installtype=“N”;
                    snmysqluser=“”
                    snmysqlpass=“password”;
                    snmysqlhost=“”;
                    installlang=“0”;
                    donate=“0”;
                    fogupdateloaded=“1”

                    Wayne WorkmanW 1 Reply Last reply Reply Quote 0
                    • Wayne WorkmanW
                      Wayne Workman @PageTown
                      last edited by

                      @PageTown It appears that 1.2.0 doesn’t have the settings that @Hanz was talking about.

                      You’ll have to do it manually.

                      You’ll need to edit /etc/exports
                      and you’ll need to change the web interface in storage management to reflect the new location
                      You’ll need to configure permissions on the new location, and you’ll need to create the subdirectory dev and the (hidden and empty) .mntcheck files.

                      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                      Daily Clean Installation Results:
                      https://fogtesting.fogproject.us/
                      FOG Reporting:
                      https://fog-external-reporting-results.fogproject.us/

                      P 2 Replies Last reply Reply Quote 0
                      • P
                        PageTown @Wayne Workman
                        last edited by PageTown

                        @Wayne-Workman

                        How do I create the .mntcheck files? Can I copy them from the default images/dev locations that was created when I did the original Fog install?

                        Wayne WorkmanW 1 Reply Last reply Reply Quote 0
                        • Wayne WorkmanW
                          Wayne Workman @PageTown
                          last edited by Wayne Workman

                          @PageTown You can create them like this, but substitute your new path for /images

                          touch /images/.mntcheck
                          touch /images/dev/.mntcheck

                          that’s it. They are literally just blank files. You don’t need to do any copying.

                          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                          Daily Clean Installation Results:
                          https://fogtesting.fogproject.us/
                          FOG Reporting:
                          https://fog-external-reporting-results.fogproject.us/

                          1 Reply Last reply Reply Quote 1
                          • P
                            PageTown @Wayne Workman
                            last edited by

                            @Wayne-Workman

                            I think I did everything correctly, but I am receiving this error when I try to upload an image:
                            0_1454359590702_IMG001.jpg

                            Wayne WorkmanW 1 Reply Last reply Reply Quote 0
                            • Wayne WorkmanW
                              Wayne Workman @PageTown
                              last edited by

                              @PageTown Check your firewall, and set 777 permissions recursively on /media/bfd/images

                              chmod -R 777 /media/BFD/images

                              Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                              Daily Clean Installation Results:
                              https://fogtesting.fogproject.us/
                              FOG Reporting:
                              https://fog-external-reporting-results.fogproject.us/

                              P 1 Reply Last reply Reply Quote 0
                              • P
                                PageTown @Wayne Workman
                                last edited by

                                @Wayne-Workman

                                The chmod command didn’t work.

                                If it was a firewall issue, wouldn’t that block my being able to register the host?

                                I Wayne WorkmanW 2 Replies Last reply Reply Quote 0
                                • I
                                  ITSolutions Testers @PageTown
                                  last edited by

                                  @PageTown d you run chmod as sudo?

                                  sudo chmod -R 777 /media/BFD/images
                                  
                                  
                                  P 1 Reply Last reply Reply Quote 1
                                  • Wayne WorkmanW
                                    Wayne Workman @PageTown
                                    last edited by

                                    @PageTown said:

                                    The chmod command didn’t work.

                                    It might not have solved the issue, but I promise it’s a necessary step.

                                    You’re /etc/exports should look like this:

                                    /media/BFD/images *(ro,sync,no_wdelay,no_subtree_check,insecure_locks,no_root_squash,insecure,fsid=0)
                                    /media/BFD/images/dev *(rw,async,no_wdelay,no_subtree_check,no_root_squash,insecure,fsid=1)
                                    

                                    You’re .mntcheck file creation would be:

                                    touch /media/BFD/images/.mntcheck
                                    touch /media/BFD/images/dev/.mntcheck
                                    

                                    Then to recursively set that directory and the mntcheck files permissions:
                                    chmod -R 777 /media/BFD/images

                                    You’d need to reset the nfs and rpc service next (or just reboot).

                                    sudo service nfs-kernel-server restart
                                    sudo service rpcbind restart
                                    

                                    Seeing how you have an NFS related issue with uploading, you might want to look through this wiki and try some of these things manually:
                                    https://wiki.fogproject.org/wiki/index.php?title=Troubleshoot_NFS

                                    Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                                    Daily Clean Installation Results:
                                    https://fogtesting.fogproject.us/
                                    FOG Reporting:
                                    https://fog-external-reporting-results.fogproject.us/

                                    P 1 Reply Last reply Reply Quote 0
                                    • P
                                      PageTown @ITSolutions
                                      last edited by

                                      @ITSolutions

                                      Yes.

                                      1 Reply Last reply Reply Quote 0
                                      • S
                                        Sebastian Roth Moderator
                                        last edited by

                                        @PageTown So what error did you see when trying to chmod?? We need information to be able to help!

                                        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                                        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                                        P 1 Reply Last reply Reply Quote 1
                                        • P
                                          PageTown @Sebastian Roth
                                          last edited by

                                          @Sebastian-Roth

                                          There was no message when I ran the chmod command. It looked to me like it took it, but I am still getting the same error that is in the screen shot I posted when I try to pull an image.

                                          Wayne WorkmanW 1 Reply Last reply Reply Quote 0
                                          • Wayne WorkmanW
                                            Wayne Workman @PageTown
                                            last edited by

                                            @PageTown There has to be something wrong somewhere. Can you take more pictures of the upload process? A lot of information is displayed during the upload and that would help us solve this. Also, can you give us a screen shot of your storage node settings area? What is your FOG Server’s IP address?

                                            Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                                            Daily Clean Installation Results:
                                            https://fogtesting.fogproject.us/
                                            FOG Reporting:
                                            https://fog-external-reporting-results.fogproject.us/

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • First post
                                              Last post

                                            215

                                            Online

                                            12.0k

                                            Users

                                            17.3k

                                            Topics

                                            155.2k

                                            Posts
                                            Copyright © 2012-2024 FOG Project