Mounting /images/dev Permission Denied
-
nope its not shared out again on the FOG server. The Windows NFS Share is simply mounted as a local hard drive in the CentOS VM as /images. It is not shared again from the FOG server.
Everything is working as it shood. I have FOG installed, I can access the /images directory from the terminal, I can login to the fog server.
The only issue I have is that I cannot create an image. When I do I get permission denied to /images/dev.
I’ve tried the usual chown fog:root /images/dev… and chmod 777 /images… but nothing seems to work, no matter what I do I get permission denied /images/dev when I try to create an image.
If I try to change /images/dev to /images/dev1 I get location does not exist so I know its hitting the storage repository.I cant seem to get the correct permissions to apply to /images/dev.
-
@vkenny how is the server mounting the share as a local drive?
-
@vkenny Can you post a clean screen shot of the error taken with a mobile phone? The context of the error is just as important in debugging as the error itself.
Also will you post the output of the following command:
ls -la /images/dev
-
I have given up and started over using the instructions given by @george1421 ref: https://forums.fogproject.org/topic/6941/windows-server-as-fog-storage-node-proof-of-concept-blog
Hopefully it works, i noticed the very last comment states he is at a stand still… Has this been converted into a Wiki yet? Does anyone know if this works?I would love to keep everything *nix but my office and several folks that work with me, don’t agree. They believe the storage node should be managed with Windows so someone with no Linux experience can easily add/remove images which i do tend to agree with.
EDIT
Yes i can, i will post screenshouts and outputs in a few mins. I have yet to start over as i stated above, i was editing the instructions provided to fit my system before i began.
-
@george1421
here is the output. Give me a few mins to edit the pic and ill upload it.$ ls -la /images/dev total 9 drwxrwxrwx. 2 fog root 64 May 4 17:11 . drwxr-xr-x. 2 fog root 4096 May 10 10:02 .. -rwxrwxrwx. 1 fog root 0 May 4 17:11 .mntcheck drwxrwxrwx. 2 fog root 64 May 4 17:11 postinitscripts
-
@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.