• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • 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.
  • W
    Wayne Workman
    last edited by Wayne Workman Nov 22, 2015, 7:04 PM Nov 23, 2015, 12:33 AM

    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/

    C 1 Reply Last reply Nov 23, 2015, 8:14 AM Reply Quote 0
    • C
      ch3i Moderator @Wayne Workman
      last edited by Nov 23, 2015, 8:14 AM

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

      W 1 Reply Last reply Nov 23, 2015, 6:13 PM Reply Quote 1
      • T
        Tom Elliott
        last edited by Nov 23, 2015, 10:35 AM

        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
        • T
          Tom Elliott
          last edited by Nov 23, 2015, 10:39 AM

          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 Nov 23, 2015, 6:11 PM

            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
            • W
              Wayne Workman @ch3i
              last edited by Nov 23, 2015, 6:13 PM

              @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
              • T
                Tom Elliott
                last edited by Nov 24, 2015, 12:48 AM

                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

                W 1 Reply Last reply Nov 24, 2015, 3:51 AM Reply Quote 1
                • W
                  Wayne Workman @Tom Elliott
                  last edited by Nov 24, 2015, 3:51 AM

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

                  216

                  Online

                  12.0k

                  Users

                  17.3k

                  Topics

                  155.2k

                  Posts
                  Copyright © 2012-2024 FOG Project