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

    Adding secondary storage to FOG server

    Scheduled Pinned Locked Moved Unsolved
    FOG Problems
    4
    20
    4.4k
    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.
    • george1421G
      george1421 Moderator @chris178
      last edited by

      @chris178 I did create a tutorial for solving this situation. Its centos centric but the commands are very similar for other versions of linux.
      https://forums.fogproject.org/topic/6642/moving-fog-s-images-files-off-the-root-partition

      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!

      C 2 Replies Last reply Reply Quote 0
      • C
        chris178 @george1421
        last edited by

        @george1421 Ok, change in scenario. I’m starting from scratch. I would like to build a FOG server and put it on a separate drive from CentOS if possible. /sda is my main hard drive (1TB) and /sdc is my secondary 8TB drive. I’ve tried piecing multiple pages of information together to make this work, but nothing seems to be working. I apologize but I can’t have you remote in. Is there a step by step process to make this work? or do I have to install FOG and the OS one one physical drive regardless?

        1 Reply Last reply Reply Quote 0
        • C
          chris178 @george1421
          last edited by

          @george1421 Here’s what my drives look like:

          NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
          sda 8:0 0 931.5G 0 disk
          ├─sda1 8:1 0 953M 0 part /boot/efi
          ├─sda2 8:2 0 953M 0 part /boot
          ├─sda3 8:3 0 827.2G 0 part /images
          ├─sda4 8:4 0 51.2G 0 part /
          ├─sda5 8:5 0 32.6G 0 part [SWAP]
          └─sda6 8:6 0 18.6G 0 part /home
          sdc 8:32 0 7.3T 0 disk
          └─sdc1 8:33 0 7.3T 0 part
          sr0 11:0 1 1024M 0 rom

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

            @chris178 Ok at this point you need to ask your self this, do you sacrifice the 830GB partition [/dev/sda3] and just mount /dev/sdc1 over /images to minimize complexity or do you want to use both storage locations but add a layer of management by adding an additional storage node reference?

            The path is pretty simple either way.

            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!

            C 1 Reply Last reply Reply Quote 0
            • C
              chris178 @george1421
              last edited by

              @george1421 Yes I want to sacrifice the 830gb partition and just mount the /images on the 7.3tb drive.

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

                @chris178

                Then you need to:

                1. You must execute these commands as root, or use sudo
                2. Since /dev/sdc already has a partition on it that step is done.
                3. If you haven’t formatted it you will need to issue, mkfs.ext4 /dev/sdc1
                4. Mount /dev/sdc1 to a temp location mount -t ext4 /dev/sdc1 /mnt
                5. Copy all of the files from your current images to /dev/sdc1 cp -R /images/* /mnt and cp -R /images/.* /mnt
                6. Ensure the file permissions and file ownership are correct in the /mnt dir.
                7. Move out of the /mnt directory path. cd \
                8. Unmount both /images and /mnt umount /images and umount /mnt
                9. (while you said sacrifice, lets do this just in case later you need the space) mkdir /images2
                10. Edit /etc/fstab
                11. Locate the line that currently mounts /dev/sda3 and duplicate it. It should look something like this.
                /dev/sda3     /images     ext4 defaults 0 1
                

                when you duplicate it, it will look like this

                /dev/sda3     /images     ext4 defaults 0 1
                /dev/sda3     /images     ext4 defaults 0 1
                
                1. Change the first row to mount /dev/sda3 to /images2 and the second row to mount /dev/sdc1 to /images. It should look like this:
                /dev/sda3     /images2     ext4 defaults 0 1
                /dev/sdc1     /images      ext4 defaults 0 1
                
                1. Save and exit your editor.
                2. Mount the volumes with this command mount -a
                3. Confirm that they are mounted correctly with lsblk
                4. Edit /etc/exports
                5. Duplicate the 2 lines in there and modify the contents to look like this:
                /images *(ro,sync,no_wdelay,no_subtree_check,insecure_locks,no_root_squash,insecure,fsid=0)
                /images/dev *(rw,async,no_wdelay,no_subtree_check,no_root_squash,insecure,fsid=1)
                
                /images2 *(ro,sync,no_wdelay,no_subtree_check,insecure_locks,no_root_squash,insecure,fsid=0)
                /images2/dev *(rw,async,no_wdelay,no_subtree_check,no_root_squash,insecure,fsid=1)
                
                1. Refresh your exports with exportfs -ra
                2. Confirm all of your shares are available showmount -e 127.0.0.1
                3. Done.

                Don’t let the number of steps put you discourage you. Adding back in that second yet smaller disk was something you may need some time. We won’t go into the FOG configuration for using that second (original) partition (/dev/sda3). Its there if you need it or to reference it in case something was missed during the migration.

                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!

                C 1 Reply Last reply Reply Quote 1
                • C
                  chris178
                  last edited by

                  I guess I wasn’t too clear. I apologize. I have installed CentOS and the drives are how I showed you previously. However, FOG is not installed at this time. That’s what I meant by start from scratch.

                  1 Reply Last reply Reply Quote 0
                  • C
                    chris178 @george1421
                    last edited by

                    @george1421 No images are in the /images folder at this time. I just would like to install FOG on a separate drive and start fresh, by re-uploading all of my images.

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

                      @chris178 Then if fog isn’t installed, just skip the bits about copying the files over and permissions. So skip step 5 and 6 and delay 16, 17, 18 and 19 until after FOG is installed.

                      Once the system is setup install fog normally there is noting special you need to do once the block level devices are in place.

                      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!

                      C 1 Reply Last reply Reply Quote 0
                      • C
                        chris178 @george1421
                        last edited by george1421

                        @george1421 I’m stuck on editing the /etc/fstab. Here is a copy of what I’m looking at. Can you help? Thanks.

                        /etc/fstab

                        # Created by anaconda on Thu Jun 29 11:50:55 2017
                        #
                        # Accessible filesystems, by reference, are maintained under '/dev/disk'
                        # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
                        #
                        UUID=576c1402-3f95-4897-86cd-45a085d0f771 /                       xfs     defaults        0 0
                        UUID=02756a47-0f80-4ba2-939b-9345b05bcacf /boot                   xfs     defaults        0 0
                        UUID=1D02-E2D7          /boot/efi               vfat    umask=0077,shortname=winnt 0 0
                        UUID=ebcbc443-67c3-4ba9-b2e7-3e6f1742a40d /home                   xfs     defaults        0 0
                        UUID=0b14f21a-8817-46e5-966b-8a813ee5fc0f /images                 xfs     defaults        0 0
                        UUID=5b1c943d-bbe6-470c-b720-42e0553e42ee swap                    swap    defaults        0 0
                        
                        george1421G 1 Reply Last reply Reply Quote 0
                        • george1421G
                          george1421 Moderator @chris178
                          last edited by

                          @chris178 I fixed your post so it was in a code block.

                          I see your system used the UUID instead of the partitions. No problem.

                          Change this line

                          UUID=0b14f21a-8817-46e5-966b-8a813ee5fc0f /images                 xfs     defaults        0 0
                          

                          to

                          UUID=0b14f21a-8817-46e5-966b-8a813ee5fc0f /images2                 xfs     defaults        0 0
                          

                          and insert a new line

                          /dev/sdc1      /images                 ext4     defaults        0 0
                          

                          And then save the file.

                          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!

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

                            @george1421 I see you used xfs for all of the existing partitions. If you want to reformat your /dev/sdc1 to use xfs instead of ext4 you can just use the mk.xfs /dev/sdc1 command and then adjust the settings to reference xfs instead of ext4.

                            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
                            • C
                              chris178
                              last edited by

                              So I got the FOG server installed, but I had issues with getting my first image. The PXE function seems to work fine but I tried setting the PC for capture under the management console and it said something about the PC wasn’t set for imaging? Does this make sense? So I rebooted, and now I can’t even get into the management console. Any suggestions? Thanks.

                              Q 1 Reply Last reply Reply Quote 0
                              • Q
                                Quazz Moderator @chris178
                                last edited by

                                @chris178 What do you visually see when you try to access the management page?

                                C 1 Reply Last reply Reply Quote 0
                                • C
                                  chris178 @Quazz
                                  last edited by

                                  @Quazz The standard stuff. The page could not be reached. I also was wondering if I need to uninstall and reinstall FOG anyways, because we have DHCP servers setup on our network, and I skipped all of that through the initial config. Do you think this is maybe why I’m having issues now? I tried to setup the startup script in the CentOS 7 manual, but it seemed not to work. Thanks for any input.

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

                                  155

                                  Online

                                  12.0k

                                  Users

                                  17.3k

                                  Topics

                                  155.2k

                                  Posts
                                  Copyright © 2012-2024 FOG Project