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

    Change the default /images location

    Scheduled Pinned Locked Moved Solved
    FOG Problems
    2
    6
    7.8k
    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.
    • B
      Baessens
      last edited by

      Hi people

      I installed my FOG server in a VM on a 60GB SSD disk, that i made.
      Now i would like to add a secondary Disk of about 300-500GB HDD to that same ubuntu instance to store the images.

      Is there a way i can change the /image folder to that second disk?

      Or should i not bother and install a second FOG server just as a storage node?

      Thanks in advance

      1 Reply Last reply Reply Quote 0
      • george1421G
        george1421 Moderator
        last edited by george1421

        The following steps should take over from the tutorial.

        1. Mount the new disk partition over (temporarily) over /mnt to copy the current files
          sudo mount -t ext4 /dev/sdb1 /mnt
        2. Move all of the files
          sudo mv /images/* /mnt
        3. Unmount the new disk
          sudo umount /mnt
        4. If you view the /images directory it should now be blank
          ls -la /images
        5. Edit the /etc/fstab file so that the fog server always mounts the new disk over /images. This command will tell your linux OS to mount /dev/sdb1 on the /images directory upon each reboot.
        /dev/sdb1 /images ext4 defaults 0 1
        
        1. Save and exit the /etc/fstab file.
        2. With the fstab file updated, lets tell the OS to mount all, to test to ensure that our new drive is mounted on each reboot.
          sudo mount -a
        3. Issue the df -h command to show you the mounted devices. You should see a line in the df output that looks similar to this:
          /dev/sdb1 99G 0G 99G 99% /images
        4. Now view the /images directory, all of your files should be back in place.

        Issues you might have:

        1. Make sure you have the proper directory permission on the new /images to match /images before you started with the disk mounting.
        2. Make sure the hidden check files are copied over using the move command ls -la should show you the two hidden check files. There will be one in /images and one in /images/dev directory.

        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!

        B 1 Reply Last reply Reply Quote 0
        • george1421G
          george1421 Moderator
          last edited by george1421

          The approach on adding this space depends on how you have your FOG server setup. Since you have a ssd and then a traditional hdd its probably easier to just mount over that 500GB hard drive over the /images directory. I have a tutorial that should get you pretty close. Let me see if I can find it.

          Follow this tutorial up to step #7: https://forums.fogproject.org/topic/11048/moving-fog-s-images-files-off-the-root-partition-2017-edition

          Then what you will want to temporarily mount /dev/sdb1 over to /mnt to copy the current content of /images to the new disk. Let me think about step 8 and so on.

          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!

          1 Reply Last reply Reply Quote 0
          • george1421G
            george1421 Moderator
            last edited by george1421

            The following steps should take over from the tutorial.

            1. Mount the new disk partition over (temporarily) over /mnt to copy the current files
              sudo mount -t ext4 /dev/sdb1 /mnt
            2. Move all of the files
              sudo mv /images/* /mnt
            3. Unmount the new disk
              sudo umount /mnt
            4. If you view the /images directory it should now be blank
              ls -la /images
            5. Edit the /etc/fstab file so that the fog server always mounts the new disk over /images. This command will tell your linux OS to mount /dev/sdb1 on the /images directory upon each reboot.
            /dev/sdb1 /images ext4 defaults 0 1
            
            1. Save and exit the /etc/fstab file.
            2. With the fstab file updated, lets tell the OS to mount all, to test to ensure that our new drive is mounted on each reboot.
              sudo mount -a
            3. Issue the df -h command to show you the mounted devices. You should see a line in the df output that looks similar to this:
              /dev/sdb1 99G 0G 99G 99% /images
            4. Now view the /images directory, all of your files should be back in place.

            Issues you might have:

            1. Make sure you have the proper directory permission on the new /images to match /images before you started with the disk mounting.
            2. Make sure the hidden check files are copied over using the move command ls -la should show you the two hidden check files. There will be one in /images and one in /images/dev directory.

            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!

            B 1 Reply Last reply Reply Quote 0
            • B
              Baessens @george1421
              last edited by

              @george1421 Thanks for the quick reply. This helped me out, thank you !
              So you wouldn’t recommend me setting up a Fog storage node?

              george1421G 1 Reply Last reply Reply Quote 0
              • george1421G
                george1421 Moderator @Baessens
                last edited by

                @Baessens Well you could setup a storage node for that 500GB disk, but I would say since you only have a 60GB ssd you should save that 60GB for the fog server linux OS and snapins. There is not a lot of value in saving it for images, plus you run the risk of filling up the root partition on linux if you happen to capture a big image.

                Depending on the number of client computers in your network, it would not be bad to add a storage node, BUT storage nodes are deploy only. You can only capture to a master node, so you are still stuck with the 60GB limitation. Adding the second drive to the fog server is an easier path to go with less negative impact.

                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!

                B 1 Reply Last reply Reply Quote 0
                • B
                  Baessens @george1421
                  last edited by

                  @george1421 I didn’t know that storage nodes were deploy only. Thank for the info.

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

                  307

                  Online

                  12.0k

                  Users

                  17.3k

                  Topics

                  155.2k

                  Posts
                  Copyright © 2012-2024 FOG Project