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

    .mntcheck file not being created.

    Scheduled Pinned Locked Moved Solved
    Bug Reports
    4
    8
    3.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.
    • Wayne WorkmanW
      Wayne Workman
      last edited by Wayne Workman

      I just installed svn 4405 cloud 5469 on Fedora 23 Server - minimal install.

      The issue is that configureStorage() subroutine has both the code for creating /images/.mntcheck and /images both under the same if statement that checks if /images exists or not.

      And, because I had created a mount point called /images during the OS installation (to give images their own partition), the if statement sees it exists, then doesn’t create /images/.mntcheck.

      Here’s what I did to fix it. It’s quite easy when I have example syntax right in front of me 😉

      svn/trunk/lib/common/functions.sh

      configureStorage() {
          dots "Setting up storage";
          if [ ! -d "$storage" ]; then
              mkdir "$storage" >/dev/null 2>&1
              chmod -R 777 "$storage" >/dev/null 2>&1
          fi
          if [ ! -d "$storage/.mntcheck" ]; then
              touch "$storage/.mntcheck" >/dev/null 2>&1
              chmod -R 777 "$storage" >/dev/null 2>&1
          fi
      

      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/

      ch3iC 1 Reply Last reply Reply Quote 0
      • ch3iC
        ch3i Moderator @Wayne Workman
        last edited by

        @Wayne-Workman You can execute chmod -R 777 "$storage" >/dev/null 2>&1 outside the IFs after them, one ligne of code saved lol

        Wayne WorkmanW 1 Reply Last reply Reply Quote 1
        • Tom ElliottT
          Tom Elliott
          last edited by

          I, too, am using the selinux policy from jbob and noticed a strange problem, though it’s most likely related to my centos being 6.7 vs his setup which is focused at centos 7. My database would not be contacted if selinux was set to enforcing, changing to permissive fixed the connection problem I was seeing. I’m wondering, now, if this same problem is preventing the creation of the .mntcheck files. If it were the case of .mntcheck not being created wouldn’t there be a problem with imaging for everybody who installs fresh?

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

            Rereading a bit, it would make sense that the .mntcheck files aren’t being created if /images exists. This is for good reason. Most will know to create the .mntcheck. I will look into adding this to the inits as it would make greater sense.

            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
            • P
              pmonstad
              last edited by

              It is my experience as well, the .mntcheck filea are not created. I did a fresh install on CentOS 6.7 a couple of weeks ago. My images are stored in /home/images

              I spent some time figure out why an upload did not work. The .mnt files where not created during the install. I had to install them manually.

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

                @ch3i It’s probably wise to only change permissions if the directory / file was just created. Otherwise custom setups will get their permissions changed to 777 every time they run the installer.

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

                  I’ve added this to the installer, so that it will check if the .mntcheck files are present and create them if necessary. For future reference, -d in bash speak means to test if the directory exists, -f would be the proper argument to test if a file is present.

                  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

                  Wayne WorkmanW 1 Reply Last reply Reply Quote 1
                  • Wayne WorkmanW
                    Wayne Workman @Tom Elliott
                    last edited by

                    @Tom-Elliott said:

                    For future reference, -d in bash speak means to test if the directory exists, -f would be the proper argument to test if a file is present.

                    That makes a lot of sense. Prob would explain the error I kept having…

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

                    298

                    Online

                    12.0k

                    Users

                    17.3k

                    Topics

                    155.2k

                    Posts
                    Copyright © 2012-2024 FOG Project