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

    Mounting /images/dev Permission Denied

    Scheduled Pinned Locked Moved Unsolved
    FOG Problems
    6
    67
    24.8k
    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 @vkenny
      last edited by george1421

      @vkenny Will you post the output of this command showmount -e 127.0.0.1 This will show is what has been shared via nfs.

      You posted the answer when I was posting the question. The output of that command look normal.

      OK can you post the output of this command cat /etc/exports ?

      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 In addition to the exports as I asked in the previous post can you post the results of this? cat /etc/fstab There will be a lot of text in there.

        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
        • V
          vkenny
          last edited by george1421

          $ cat /etc/exports
          /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)
          
          $ cat /etc/fstab
          UUID=ca0220ba-82d7-434f-9231-74ba18706ac1 /                       ext4    defaults        1 1
          UUID=20a99d10-8d99-429c-82b7-4c8655a22d22 swap                    swap    defaults        0 0
          169.254.91.1:/FOG-Share /images                                   nfs _netdev,defaults,user,auto,noatime,intr   0 0
          169.254.91.1:/FOG-Share /images                                   nfs _netdev,defaults,user,auto,noatime,intr   0 0
          

          I deleted the uncommented lines since it seemed to convert these lines into larger bold text. I can add them back in if you wish. hank you for the support!!

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

            @george1421 said in Mounting /images/dev Permission Denied:

            If I understand correctly, you have a nfs share, shared on your windows box and then its mounted on your fog server. Then on your fog server you have them shared out again. This is now allowed in NFS land, but it is the same with windows. You can reshare a mounted share.

            I am requoting this from my initial post because I feel I identified the issue in the first sentence.

            In fstab you are connecting /images to an external nfs server 169.254.91.1:/FOG-Share Then using NFS you are sharing /images to everyone in your exports file. You are trying to nfs share an nfs mounted share (reshare a share). This has historically never worked with NFS (I actually don’t think this works with MS Windows either). Ignoring the fact about an nfs mounted share some nfs servers won’t let you mount a subdirectory of a share directly. So you would technically need a second line in your fstab for the /dev share like this:

            169.254.91.1:/FOG-Share/dev /images/dev                                   nfs _netdev,defaults,user,auto,noatime,intr   0 0
            

            To confirm my point (assuming you have enough space on the fog server for 1 image) key in umount /images on the linux server console and then recapture the image again.

            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
            • V
              vkenny
              last edited by

              If I umount /images and try to create an image from a workstation, I get
              “Could not mount images folder (/bin/fog.upload)
              Args Passed:
              Reason: mount: mounting 10.2.20.6:/images/dev on /images failed: No such file or directory.”

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

                @vkenny If you run this command ls -la /images I’m going to suspect you are missing files since the nfs share was probably in place when you installed FOG.

                This is what the output of the command should look like

                pi@pi01:~ $ ls -la /images
                total 20
                drwxrwxrwx  5 fog  root 4096 Apr  4 06:37 .
                drwxr-xr-x 25 root root 4096 May 10 15:41 ..
                drwxrwxrwx  2 fog  root 4096 Apr  4 06:37 Base_XP
                drwxrwxrwx  3 fog  root 4096 Apr  4 06:37 dev
                -rwxrwxrwx  1 fog  root    0 Sep 24  2016 .mntcheck
                drwxrwxrwx  2 fog  root 4096 Sep 24  2016 postdownloadscripts
                

                and the output of /images/dev

                pi@pi01:~ $ ls -la /images/dev
                total 12
                drwxrwxrwx 3 fog root 4096 Apr  4 06:37 .
                drwxrwxrwx 5 fog root 4096 Apr  4 06:37 ..
                -rwxrwxrwx 1 fog root    0 Sep 24  2016 .mntcheck
                drwxrwxrwx 2 fog root 4096 Apr  3 19:06 postinitscripts
                

                If you rerun the installer now without making any changes it will rebuild the /images directory with the necessary bits.

                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
                • V
                  vkenny
                  last edited by

                  right, It will work if I re-run the installer now and will create /images on local storage instead of the NFS Share.

                  Please explain in a bit more detail how I’m re-sharing an NFS Share. Its simply an NFS share from my Windows server to the FOG server. Does FOG somehow create a share? If so how would I use an NFS share as the primary repo for the images?

                  I’m am not connecting what I’ve done with your response that I’m re-sharing an NFS share…

                  Tom ElliottT george1421G 3 Replies Last reply Reply Quote 0
                  • Tom ElliottT
                    Tom Elliott @vkenny
                    last edited by

                    @vkenny Your FSTAB is mounting an NFS share from your windows server to /images on your fogserver.

                    Then the FOG Server is trying to mount /images itself as an NFS Share when the client machines try to do anything.

                    This is not allowed (as stated many times, and confirmed with the “permission denied”).

                    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

                      @vkenny said in Mounting /images/dev Permission Denied:
                      In Particular, your lines:

                      169.254.91.1:/FOG-Share /images                                   nfs _netdev,defaults,user,auto,noatime,intr   0 0
                      169.254.91.1:/FOG-Share /images                                   nfs _netdev,defaults,user,auto,noatime,intr   0 0
                      

                      I don’t know why you have two identical lines, but either way, you see the part that says “nfs”? That means is mounting it to the /images point as an NFS filesystem.

                      Then your exports are setup to NFS share the /images folder:

                      /FOG-Share -> /images -> /images

                      Does this make 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
                      • george1421G
                        george1421 Moderator @vkenny
                        last edited by

                        @vkenny If you consider what you are doing in the windows realm is this.

                        You have 2 servers. On the first server you have a share, lets call it \server02\somefiiles You connect that share to server01 as the w: drive. Now you are trying to reshare the w: drive on server01. In windows this is not allowed same with linux.

                        For the fog server’s proper operation there is a customized linux operating system that runs on the target computer. It connects to the fog server using NFS. It actually mounts /images/dev to upload the image. This share information is visible when you cat’d /etc/exports. These are the nfs exports from the FOG server.

                        If you look at your 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)
                        

                        You are sharing /images and /images/dev. The /images share is configured for read-only at a share level permission. Where /images/dev is shared as read-write.

                        This is perfect, what fog expects and what is required.

                        Now what you have done below this is you are using the /images directory as a mount point (not a directory) for an external nfs share (from your windows box). i.e. creating the reshare of an nfs mounted external share.

                        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 @vkenny
                          last edited by george1421

                          @vkenny said in Mounting /images/dev Permission Denied:

                          Its simply an NFS share from my Windows server to the FOG server.

                          Right but the FOS engine (customized linux that runs on the target computer) mounts the NFS share on the FOG server to upload the disk image.

                          So to the question how can I do what I want?

                          1. Setup your windows server as a FOG storage node like I first posted with the link.
                          2. Install an iSCSI software to share out a iSCSI block device and mount that on your fog server. I think starwinds has a free iscsi target software (up to 1TB) that you can install on your windows server.
                          3. While I don’t really like this idea at all, I have heard of some people attaching a usb hard drive to their esxi server and passing that usb hard drive through to the FOG server for storage.

                          Understand what we are talking about is not a FOG issue, but rather a NFS issue. You would have the same issue if you had a nfs file server setup. Its not FOG that placed these requirements on the nfs file shares.

                          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

                            Similarly,

                            It doesn’t matter where the share is coming from.

                            You can share an mount point no matter how it’s being requested.

                            For example:

                            If you only have the windows share, (this is the first share), and you mount it directly on the client, you will have success. You can have other systems mount this share as many number of times as needed.

                            Now let’s place this in the realm of FOG server.

                            You have mounted the windows share to /images. This is perfectly fine.

                            Now you’re sharing the same already mounted share to another system.

                            /FOG-Share is mounted to /images. The client machine loads and tries to mount the /images mount to the client. This is the double share. You’re using a proxy trying to mount the system as it’s already been mounted.

                            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
                            • V
                              vkenny
                              last edited by vkenny

                              @vkenny said in Mounting /images/dev Permission Denied:

                              So if I make my /etc/fstab look like this:
                              $ cat /etc/fstab
                              UUID=ca0220ba-82d7-434f-9231-74ba18706ac1 / ext4 defaults 1 1
                              UUID=20a99d10-8d99-429c-82b7-4c8655a22d22 swap swap defaults 0 0
                              169.254.91.1:/FOG-Share /FOG-Share nfs _netdev,defaults,user,auto,noatime,intr 0 0
                              169.254.91.1:/FOG-Share /images nfs _netdev,defaults,user,auto,noatime,intr 0 0

                              then complete the necessary steps to change the storage node, this should work?
                              Or if not what should I do?

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

                                @vkenny No.

                                You cannot reshare an nfs share.
                                What we’re trying to tell you, no amount of “sharing” is going to fix this for you. You could try another mounting option. Maybe CIFS/Samba from the windows share. Mounted via CIFS then the nfs side should work, but this is still fragile.

                                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
                                • V
                                  vkenny
                                  last edited by

                                  ok, so I’m sorry this is confusing me, I’m just not grasping the direction you are providing. Sometimes I need to be told like I’m 5 yrs old… What it sounds like to me that you are saying is that I cannot use an NFS Share as a repository for images which I know is not the case…

                                  If you could give me a few directions to follow I would be very grateful.

                                  I also have to say the almost instant turn around in responses is exceptional. Thank you very much for such a solid support system. You guys rock!

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

                                    @vkenny You cannot use an nfs share to mount and then re-export it as an nfs share.

                                    This is what you’re currently doing.

                                    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
                                    • V
                                      vkenny
                                      last edited by

                                      Right. After 50 times of telling me I understand what you are saying. Problem is I’m now at a stand still because I don’t know a solution. Is there something else I can do to use this NFS Share as an image repo?

                                      Tom ElliottT george1421G 2 Replies Last reply Reply Quote 0
                                      • Tom ElliottT
                                        Tom Elliott @vkenny
                                        last edited by

                                        @vkenny I just told you how.

                                        Share the volume, not as NFS, but as a windows “Share”

                                        Mount that share via fstab using cifs or samba (whatever it’s called).

                                        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
                                        • george1421G
                                          george1421 Moderator @vkenny
                                          last edited by george1421

                                          @vkenny Well lets start in the beginning…

                                          The target computer must connect to the FOG server over NFS. That must happen.

                                          The fog server in YOUR setup is connecting to an external NFS share. So this is resharing an nfs mounted share.

                                          As Tom said, you could install SAMBA on your FOG server and then connect to your windows server over CIFS (windows share technology). Then it might work ( I say might because I have not personally done this. ).

                                          As I posted before you could use iSCSI and connect your fog server to an iscsi target software running on your windows server.

                                          -OR- you can setup your windows server as a FOG storage node. Then the FOS engine will connect to your windows server over NFS (that you already setup) and not have to talk to the fog server at all.

                                          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 1
                                          • george1421G
                                            george1421 Moderator @george1421
                                            last edited by

                                            @george1421 said in Mounting /images/dev Permission Denied:

                                            I did write a proof of concept tutorial for turning a windows server into what fog calls a storage node. ref: https://forums.fogproject.org/topic/6941/windows-server-as-fog-storage-node-proof-of-concept-blog

                                            Without intending to sound self righteous, my first post outlined what you “could” do to use your windows server as a fog storage node.

                                            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!

                                            V 1 Reply Last reply Reply Quote 1
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 2 / 4
                                            • First post
                                              Last post

                                            161

                                            Online

                                            12.0k

                                            Users

                                            17.3k

                                            Topics

                                            155.2k

                                            Posts
                                            Copyright © 2012-2024 FOG Project