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

    How to create subfolders in a storage node

    Scheduled Pinned Locked Moved Solved
    General
    5
    36
    9.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.
    • H
      Hongyun
      last edited by

      In the old version, I can create new storage nodes by creating a subfolder in /images folder, so I can separate my FOG images for different computer labs. But ever since I upgraded FOG to the latest 1.3.4 version, it no longer works with the subfolder setting, I can only upload the images to the root /images folder.

      Here is my /etc/exports file:
      /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)
      /images/CLAB *(ro,sync,no_wdelay,no_subtree_check,insecure_locks,no_root_squash,insecure,fsid=0)
      /images/CLAB/dev *(rw,async,no_wdelay,no_subtree_check,no_root_squash,insecure,fsid=1)

      And I have .mntcheck file under /images/CLAB/dev folder, but at the end of the upload process, it will say it couldn’t find the uploaded file, and I noticed that the uploaded file is actually saved under /images/dev instead of /images/CLAB/dev

      I hope this problem can be resolved since I have 60+ image files, it will be more organized if I can put them in different subfolders. And this used to work with the old version…

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

        While I don’t have an answer for you, could you also include what version is considered the “old version” of fog?

        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
        • Tom ElliottT
          Tom Elliott
          last edited by

          When you are giving us information, please give us as much as possible.

          In particular, “old version” is not very useful as old is relative. To me, 1.3.3 is “old” since 1.3.4 was released.

          Please also provide OS you’re running on and version of the OS if/as/where/when possible.

          From the sounds of things, you have two “storage” nodes on your setup?

          Is there a reason you’re using CLAB? Is this a mount from somewhere else.

          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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

          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

          1 Reply Last reply Reply Quote 0
          • H
            Hongyun
            last edited by

            The old version I mean 1.2.0.
            The server OS is Red Hat Enterprise 6.8, kernel 2.6.32

            CLAB is just a sub folder of /images, I used to create multiple mount points so when I upload images, it will be saved in the sub folders instead of the /images folder.

            If you have better solution instead of using multiple storage nodes, it should be fine for me too. Otherwise, I guess I will have to live with it.

            Tom ElliottT 1 Reply Last reply Reply Quote 0
            • Tom ElliottT
              Tom Elliott @Hongyun
              last edited by

              @Hongyun I don’t think you need the NFS mount to handle “sub” directories.

              It would mean updating your images to use the proper path.

              For example, you have CLAB directory right? It’s already created.

              In the image path field, you would set it to:
              CLAB/<rest of path as you’d like it>

              No need to add the CLAB to the NFS mounts.

              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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

              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

              H 1 Reply Last reply Reply Quote 0
              • H
                Hongyun
                last edited by

                But whenever I add CLAB/ in front of the image name, it will automatically remove /, for example, if my image name is ubuntu16, if I enter CLAB/ubuntu16 in the image name, it will automatically changed to CLABubuntu16.

                1 Reply Last reply Reply Quote 0
                • H
                  Hongyun @Tom Elliott
                  last edited by

                  @Tom-Elliott Any update on this?
                  Thanks,
                  Hongyun

                  Tom ElliottT 1 Reply Last reply Reply Quote 0
                  • Tom ElliottT
                    Tom Elliott @Hongyun
                    last edited by

                    @Hongyun Yes, update please. I fixed the stripping of forward slashes, and I think backslashes too.

                    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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                    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

                    H 1 Reply Last reply Reply Quote 0
                    • H
                      Hongyun @Tom Elliott
                      last edited by

                      @Tom-Elliott Can you let me know where to download 1.3.5? I got a version by using git clone command, but the version I downloaded still have the same problem.

                      git clone https://github.com/fogproject/fogproject.git

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

                        @Hongyun FWIW: 1.3.5 has not been released just yet.

                        If you would like to update to the latest release candidate 1.3.5-RC7 (that will most likely become 1.3.5 stable) you can follow these steps:

                        git clone https://github.com/fogproject/fogproject.git
                        cd fogproject
                        git checkout dev-branch
                        cd bin
                        ./installfog.sh -y
                        

                        Understand that will tell git to only look at the dev-branch. So once 1.3.5 stable is released you will want to run these commands to reset git back to the main feed:

                        cd fogproject
                        git checkout master
                        cd bin
                        ./installfog.sh -y
                        

                        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!

                        H 1 Reply Last reply Reply Quote 1
                        • H
                          Hongyun @george1421
                          last edited by

                          @george1421 Thanks! I will wait for the stable release then, it’s not super urgent 🙂

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

                            @Hongyun There is no harm in doing this now or waiting for the stable release. The choice is yours.

                            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!

                            H 1 Reply Last reply Reply Quote 0
                            • H
                              Hongyun @george1421
                              last edited by

                              @george1421 Thanks! I just upgraded FOG, and it works perfectly 🙂

                              1 Reply Last reply Reply Quote 1
                              • S
                                sdm42doc
                                last edited by

                                Has anyone had any luck with directories under /images.

                                I mounted another volume (for more storage) under /images to try to force it and no luck.

                                I thought you could have multiple storage nodes on the same server with additional hard drives at one point. I have been a “fog user” since the beginning, and thought for sure i had this setup before.

                                I am on Ubuntu 16.04.02 with current version of FOG 1.4.0.

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

                                  @sdm42doc No joy for you, subfolders are still not supported.

                                  Now you do have some options.

                                  1. If your server uses LVM, just add the additional space to the LVM volume where the /images are.
                                  2. Temp mount the new volume over another directory, move the contents of /images to the new volume via the mount point, disconnect the mount point and mount it over /images

                                  There are some other ways to extend it but it then gets a bit messy.

                                  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

                                    Just circling back on this after I talked with the developers. That sub directory functionality WAS added to FOG 1.4.0. I was wrong before. You can create subfolders in the /images directory something (as seen below). Once you set your image name you can alter the image path field. Understand there is ONE caveat here, as in my example the /images/myfolder directory MUST exist before you create this image definition. If not your capture will fail.

                                    In your case the /images/myfolder (or what ever you call it) will be a mount point for your new disk volume.

                                    0_1495653475052_fog_subfolders.png

                                    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!

                                    S 1 Reply Last reply Reply Quote 0
                                    • S
                                      sdm42doc @george1421
                                      last edited by

                                      @george1421 Thank you. I actually got the subfolders to work. I had to manually create the folder, set rights, and it works inside /images. However, my latest thoughts, I want to add hard drive space outside of LVM to /images. So I set a mount point with the proper rights to /images/vol1, vol1 being the new mount point of a hard drive. The image looks like it goes up no issues, until the end, the system won’t copy the images from /dev over to /vol1. I tried creating this as a storage group /images/vol1, and a fake directory if you will concept and I have no luck. In the past, couldn’t you have more HD in the server for storage nodes, or am I dreaming about this. I have spent two days, trying to figure this out, its now a challenge to see if it works. Take care, thank you for the response.

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

                                        @sdm42doc Just for clarity what I posted below didn’t work for your setup?

                                        If not can you provide the output of these commands

                                        1. df -h
                                        2. showmount -e 127.0.0.1

                                        I talked with the developers for quite a while and they were positive it would work as I outlined.

                                        If you setup a storage node route, you need to duplicate the /images base structure below on the new volume. I won’t probably have time tonight to test this in my dev environment but I will get to it tomorrow night.

                                        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!

                                        S 1 Reply Last reply Reply Quote 0
                                        • S
                                          sdm42doc @george1421
                                          last edited by

                                          @george1421 attached is the screen shot from the fog box.

                                          0_1495664599577_Screen Shot 2017-05-24 at 6.21.05 PM.png

                                          I also replicated all of the interiors of the files as outlined, copying the /dev/ files to the vol1/ ect.

                                          On upload, it looks like all is well, the image is going to /images/dev/(mac address of machine) then on the final write, it fails, as attached.

                                          I am going to try to recreate this issue in my home lab tonight.

                                          0_1495665048302_IMG_1599.JPG

                                          0_1495665060371_IMG_1600.JPG

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

                                            @sdm42doc This looks like you might have a storage node configuration still in place. If you look at your last image its using the /image as the root, but the error messages in the next from the bottom its trying to move the file from /images/vol1/dev (but the image is in /images/dev).

                                            The first picture shows that you have the right shares in place for the secondary nodes.

                                            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
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • First post
                                              Last post

                                            183

                                            Online

                                            12.0k

                                            Users

                                            17.3k

                                            Topics

                                            155.2k

                                            Posts
                                            Copyright © 2012-2024 FOG Project