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

    Move path /images

    Scheduled Pinned Locked Moved Unsolved
    Linux Problems
    3
    16
    1.6k
    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.
    • I
      ITRecords
      last edited by

      Hi,

      OS : Debian
      Fog Version : 1.5.10

      I need to change the location of my images on my second disk.

      Thanks for your help.

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

        @ITRecords You need to be a bit more descriptive of the problem you have.

        Also provide the output of these commands.
        lsblk
        df -h
        cat /etc/exports

        Is this a physical server or virtual?

        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
        • I
          ITRecords
          last edited by

          Hi @george1421

          Thanks for the response.

          you are right it is better to have the right information 🙂

          1. I installed fog on a vm
          2. here is the result

          I want my images to be on the sdb1 disk

          fog.png

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

            @ITRecords OK very good. That gives me enough of a picture to help out.

            Are you linux familiar or no?

            I thought I had a tutorial on it but I didn’t add the part if FOG was already installed. https://forums.fogproject.org/topic/11048/moving-fog-s-images-files-off-the-root-partition-2017-edition

            The workflow here will be (You might want to make a snapshot/backup of your fog server. There is a potential ~5% you could lose your images if these steps are not followed correctly)

            1. Add your new VMDK file (you have it already with /dev/sdb1)
            2. Now make a temp mount point to connect your /dev/sdb1 to
              mkdir -P /tmp/img2
            3. Lets just make a flag file so we can know a future step works
              touch /tmp/img2/fog.txt
              Prove that we can see the flag file ls -la /tmp/img2
            4. Create a partition on the disk. You have already done this since you have /dev/sdb1
            5. Now you need to format the partition with a linux disk format. (I can’t tell from the screen shot if its done or not)
              mkfs.ext4 /dev/sdb1
            6. Mount this new parttion onto the mount point we created before.
              mount /dev/sdb1 /tmp/img2
            7. Now that the mount is complete (and because the /dev/sdb1 partition is blank we should not see the flag file when we list that directory.
              ls -la /tmp/img2 (you should not see the flag file since the new disk is mounted over the top of /tmp/img2
            8. If everything is good here, again run the df -h command. Note the utilization of /dev/sda1 in GB. When we run that command you should see the value will be lower in /dev/sda1 and appear in /dev/sdb1
            9. Lets move your current images to the new drive
              mv -vf /images/* /tmp/img2 (you should see a verbose output as all of your images and associated files are moved over to your new disk.
            10. Once the move is done confirm that the files are in the new path /tmp/img2
              ls -la /tmp/img2 (You should now see files in this directory, confirm you can see files that start with a period)
              df -h (this should now show that /dev/sda1 size should have decreased by the size of /dev/sdb1)
              ls -la /images (this directory should now be empty)
            11. If everything is good lets unmount /dev/sdb1
              umount /tmp/img2
            12. Now of a small monetary ($$) contribution I’ll tell you how to get your images back.
            13. Just kidding, The last step is to mount your /dev/sdb1 to the /images directory (just like we did in the beginning). Lets edit /etc/fstab. Add the following line to the fstab file
              /dev/sdb1 /images ext4 defaults 0 1
              Now save and exit the fstab file.
            14. Last step is to tell linux to mount /dev/sdb1 onto /images.
              mount -a
            15. If everything worked you should be able to list /images and see all of your files again.
              ls -la /images
            16. Running df -h will now show that your root directory ( / ) is mounted on /dev/sda1 and ( /images ) is mounted on /dev/sdb1
            17. If you took a snapshot of the VM in the beginning go ahead and commit the changes.
            18. You are done.

            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!

            I 1 Reply Last reply Reply Quote 1
            • I
              ITRecords @george1421
              last edited by ITRecords

              @george1421 Great. thank you for these very detailed steps

              1. I’m doing pretty well on linux.

              when I prepared my vm I added this disk without the mounted and in without formatted

              Now you need to format the partition with a linux disk format. (I can’t tell from the screen shot if its done or not)
              mkfs.ext4 /dev/sdb1
              

              I will test this today. I’ll keep you informed

              1 Reply Last reply Reply Quote 0
              • I
                ITRecords
                last edited by

                @george1421

                I just did the procedure

                terminal.png Screenshot.png

                in interface of Fog

                interface.png

                1 Reply Last reply Reply Quote 0
                • I
                  ITRecords
                  last edited by

                  @george1421 I would have no permission problem to bring with chmod to write my images. I will take my test tomorrow morning

                  1 Reply Last reply Reply Quote 0
                  • I
                    ITRecords
                    last edited by

                    Hi @george1421,

                    here is my return. I made my capture this afternoon.

                    towards the end of my capture I got this message

                    fog.jpg

                    if you have an idea

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

                      @ITRecords That’s a permission issue.

                      So in /images/dev do you see a directory name that looks like a mac 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!

                      I 2 Replies Last reply Reply Quote 0
                      • I
                        ITRecords @george1421
                        last edited by

                        @george1421 i test this morning. Thanks

                        1 Reply Last reply Reply Quote 0
                        • I
                          ITRecords @george1421
                          last edited by

                          @george1421 I gave the rights to the frogproject user again and it worked, however I encountered this error during my clone

                          error.jpg

                          L george1421G 2 Replies Last reply Reply Quote 0
                          • L
                            luilly23 @ITRecords
                            last edited by

                            @ITRecords
                            At least in previous versions, it was necessary to create a hidden file in /images and /images/dev called .mntcheck

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

                            In my server it shows up (ls -la) as :
                            -rwxwrwxrwx fogproject root 0 jan 8 2019 .mntcheck

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

                              @ITRecords for right now lets execute these two commands.

                              Pause that for one second: Lets make sure the /images is still mounted on /dev/sdb1. Check the df -h command if /dev/sdb1 is still mounted over /images then continue on.

                              Rerun the fog installer, that should fix the permissions on the directory. I would rather have the fog installer script fix things than brute force a permission on everything.

                              IF that doesn’t work then run these commands:

                              lets make sure the files are owned by fogproject.

                              chown -R fogproject.fogproject /images
                              chmod -R 775 /images

                              That should reset the permissions…

                              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!

                              I 2 Replies Last reply Reply Quote 0
                              • I
                                ITRecords @george1421
                                last edited by ITRecords

                                @george1421 i test a new tomorrow.

                                Thank you so much. It’s very nice to be able to count on you.

                                Screenshot.png

                                Thank for information @luilly23

                                1 Reply Last reply Reply Quote 0
                                • I
                                  ITRecords @george1421
                                  last edited by ITRecords

                                  This post is deleted!
                                  1 Reply Last reply Reply Quote 0
                                  • I
                                    ITRecords
                                    last edited by

                                    @george1421

                                    I disabled the function in the power options the fast startup

                                    during my deployment I added a set username and set password in the fog.deployimage.

                                    Thanks

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

                                    152

                                    Online

                                    12.0k

                                    Users

                                    17.3k

                                    Topics

                                    155.2k

                                    Posts
                                    Copyright © 2012-2024 FOG Project