[SOLVED] Fatal Error: Failed to mount NFS Volume
-
@arnaudrigole said:
Hello,
Thanks for ur help, effectively the /etc/exports file was default; i changed it but now the PXE “Mounting File System” step say
"mouting 10.1.11.64:/srv/cifs/SRVADM/images/dev on /images failed: Connection refused
Which credentials should i use ? i tried with domain account created for fog “adminfog”, with encrypted password, tried with “contoso\adminfog” also, tried with “fog” default storage nod + its password … i dont understand ?
The client mount the NFS share without authentication, your problem is not here. I’ve never export a CIFS share via NFS.
The simple way is to enable NFS on your storage instead cifs. -
@arnaudrigole You can’t reexport a directory you’ve mounted with NFS. You need to mount it directly.
-
Thanks for your help. So, on fog storage node, instead of setup the “/srv/cifs/SRVADM/images” directory, mounted on a distant server; i setup directly the distant server with shared storage, with contoso credentials?
@ch3i
Désolé mais ça me paraît un peu compliqué, je connais pas vraiment la différence entre les deux. Je pensais que le cifs était utilisé pour monter des partage windows -
@arnaudrigole If NFS is enabled on that server for those directories then yes. If not, you’ll need to set that up.
-
@Quazz
But its not what i want to … FOG can’t write on a local directory and i dont understand why … i defined the storage node on /srv/cifs/SRVADM/image which is a directory on FOG server, BUT, i did a “mount -t cifs” on SRVADM distant server which looks OK.
for example, on fog server i create a test.txt file on this /images folder, and i see it on my windows server SRVADM, in D:/DATA_FOG/Images 's shared folder… -
@arnaudrigole FOG needs NFS access, it won’t use CIFS/SAMBA. I believe there is a tutorial on how to switch over to CIFS/SAMBA but it’s not officially supported.
https://forums.fogproject.org/topic/5145/script-to-install-samba-with-settings-for-fog
-
@Quazz
OK! But my data server SRVADM is a Windows Server 2008R2… i will look on it to enable NFS. Never did it before -
@arnaudrigole This might be helpful to you: https://wiki.fogproject.org/wiki/index.php/Windows_Storage_Node
-
@Sebastian-Roth While researching how to enable a Synology NAS for a storage node, it appears that current versions of FOG require a web server on the storage node too (as far as I can tell). While I haven’t had too much time to investigate, I’m thinking that it wants something in fog/services/ipxe folder
-
@Sebastian-Roth
Thank you, i think too !
But the described procedure seems to be not secured! (grant RW access for “all”, “all machines”, “everyone” on shared folders…the cryptowall “locky” ransomware that we had last week ravaged our datas and infected all folders which was shared with “everyone” rw right…
-
@arnaudrigole I’m guessing your CIFS/SAMBA shares are mounted as network drives on other computers, yes?
The NFS shares should only be mounted on computers that are going get their image captured or where an image will be deployed and only for the duration of those actions.
I’ve yet to see a virus sniff out possible NFS connections and then be able to somehow use the correct credentials to then infect the shares, but I guess I could be wrong
-
@Quazz
Hi!
Yeah thats it.
Ok, so its why when i type \SRVADM on a Windows computer i don’t see the NFS “FOG” directory i just shared ?I’ll mount as described in the Sebastian’s procedure, and i’ll come back here so say whats up
-
@arnaudrigole said:
@Sebastian-Roth
Thank you, i think too !
But the described procedure seems to be not secured! (grant RW access for “all”, “all machines”, “everyone” on shared folders…the cryptowall “locky” ransomware that we had last week ravaged our datas and infected all folders which was shared with “everyone” rw right…
Au besoin PM moi sur le forum, je pourrais surement te venir en aide.
-
@arnaudrigole That and also because Windows doesn’t support NFS by default.
-
@Quazz said:
@arnaudrigole That and also because Windows doesn’t support NFS by default.
Windows support NFS… look at Server 2008/2012 (2008 > NFS V3 et 2012 > NFS V4.1)
-
@ch3i Server yes, clients not.
-
I’ve another problem…
haven’t the time yet to mount my NFS storage so i keep using /images default directory of FOG; but when i try to download an image on a computer it said …**FATAL ERROR: Failed to mount NFS volume
*if you believe the filesystem is mounted, make sure you have a file called .mntcheck in the directory you are mouting on the server.
**i don’t see any “.mntcheck” file in /images and /images/dev…
So i created it with “touch /images/.mntcheck” and “touch /images/dev/.mntcheck” but it still dont work…
Can’t deploy anything now … -
@arnaudrigole Did you edit the /etc/exports so it’s looking at the proper directory? If the CIFS share is still mounted on the server at /srv/cifs/SRVADM/images and your Exports file is still looking at /images and /images doesn’t exist on the FOG Server, it would still have a problem.
If /srv/cifs/SRVADM/images is mounted to the folder /images AND, before the share is mounted, and you create the /images/.mntcheck /images/dev/.mntcheck files, then mount the samba over the TOP of the folder, the mounted folder needs these files so you’d have to run the same touch commands to ensure those files are present on the share as well.
I think there’s almost too much going on to properly assist.
What is going on? Are you still mounting the /srv/cifs/SRVADM/images folder?
What’s in your /etc/exports file?
What version are you running?
Where are you defining the mount?
I could also be chasing a rabbit down a hole as I’m still not sure you can NFS Export a CIFS Share either.
If you’re that worried about security, why are you using a common system that OTHER users are accessing and writing data to as your mount point for where FOG stores its images?
-
@Tom-Elliott
Thanks for your reply, mine are in your message below:Did you edit the /etc/exports so it’s looking at the proper directory? If the CIFS share is still mounted on the server at /srv/cifs/SRVADM/images and your Exports file is still looking at /images and /images doesn’t exist on the FOG Server, it would still have a problem. > As you said before, i re-edited it so its look like default now /images and /images/dev
If /srv/cifs/SRVADM/images is mounted to the folder /images AND, before the share is mounted, and you create the /images/.mntcheck /images/dev/.mntcheck files, then mount the samba over the TOP of the folder, the mounted folder needs these files so you’d have to run the same touch commands to ensure those files are present on the share as well. > I’m afraid but i think i don’t understand… After i re-modified the /etc/exports file , i did touch commands on /images and /images/dev. I did not succeed the externalization of image storage, so i just want to go back on default configuration
I think there’s almost too much going on to properly assist. > Yes
What is going on? Are you still mounting the /srv/cifs/SRVADM/images folder? > it appears to be hard for me, i’m actually blocked by NFS and access rights… but i’ll continue to work on it but not now (FOG is currently used for production in my company)
What’s in your /etc/exports file? >** /images (ro,sync,no…default string)
/images/dev (rw,sync, … default string too)What version are you running? > Fog 1.2.0
Where are you defining the mount? > When i did my tests for storage externalization, i wanna mount //SRVADM/FOG/Images (Windows 2008R2) on /srv/cifs/SRVADM/Images (Fog Server)
I could also be chasing a rabbit down a hole as I’m still not sure you can NFS Export a CIFS Share either. > i think i don’t understand … but i recreated a shared directory by NFS services on my Win 2008R2, and when i try to mount it as : “mount -t nfs //SRVADM:FOG/Images /srv/cifs/SRVADM/images it return me :” mount.nfs : Failed to resolve server //SRVADM: name or service not known" , tried with IP -> same.
If you’re that worried about security, why are you using a common system that OTHER users are accessing and writing data to as your mount point for where FOG stores its images? -> SRVADM is a server dedicated to IT service, we have no common data on it, but i told this only for crypto virus who infect “Everybody” shared directories
Have a good sunny day
-
@arnaudrigole " i think i don’t understand … but i recreated a shared directory by NFS services on my Win 2008R2, and when i try to mount it as : “mount -t nfs //SRVADM:FOG/Images /srv/cifs/SRVADM/images it return me :” mount.nfs : Failed to resolve server //SRVADM: name or service not known" , tried with IP -> same."
Your syntax is incorrect, it should be something like mount -t nfs SRVADM(or ip):/FOG/Images destinationpathhere (eg mount/images after doing mkdir mount/images)
// is only used for SAMBA/CIFS paths and won’t work for other methods of connecting.
Also, as a note, NFS needs full path to the destination when you try to mount it, not just to the shared folder. Not sure if that’s the case on your end!