Mounting /images/dev Permission Denied
-
@vkenny There is no need to edit the pict if you are using private IP addresses since there is no way for me to hack your network if you are using a private range like 192.168.1.x/24. Having actually IP addresses help with the debugging. The mac addresses I don’t care about.
-
@vkenny Your images directory looks good. I do have to ask you did you change the password or generall mess with the linux
fog
account? This is an internal account used by fog and people like to use it for local system admin for some reason. Understand this is the linuxfog
account and not the web guifog
admin account.Also could you post the output of this command
showmount -e 127.0.0.1
? This command shows us what NFS has shared on your fog server. -
@george1421 Well, I’m not quite sure what account you are asking about, if you could be a bit more specific. I did not edit any accounts…
here is a pic of the error I receive from the laptop I am trying to create an image of.
-
$ showmount -e 127.0.0.1 Export list for 127.0.0.1: /images/dev * /images *
-
@vkenny
Will you post the output of this commandshowmount -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
? -
@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. -
$ 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!!
-
@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. -
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.” -
@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.
-
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…
-
@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”).
-
@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?
-
@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.
-
@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?
- Setup your windows server as a FOG storage node like I first posted with the link.
- 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.
- 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.
-
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.
-
@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 0then complete the necessary steps to change the storage node, this should work?
Or if not what should I do? -
@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. -
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!
-
@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.