Troubleshoot NFS

From FOG Project
Jump to: navigation, search

Article under construction. 5-1-2015


NFS's roles in FOG

NFS is used to transfer images to and from clients in FOG, and is used on both the client and server. The server's setting file controls what files & directories are exported, and their options. NFS allows writing to the /images/dev directory and allows reading from the /images directory. During imaging, the client mounts either /images/dev (for uploading or capturing an image) or /images (for downloading or deploying an image).

During upload/capture, NFS uploads images into a folder in /images/dev/<MAC Address Of Client> During download/deployment, NFS downloads images from /images/<Image Path>


Testing NFS

Linux

Windows

NFS Service

Fedora 20/21

Ubuntu

NFS Settings File

Fedora 20/21

Ubuntu

Creating & verifying .mntcheck files

.mntcheck is a hidden and empty file that FOG uses to verify a NFS share is mounted correctly.


To create these files, on the FOG server:

touch /images/.mntcheck
touch /images/dev/.mntcheck

Verify these files with:

ls -laR /images | grep .mntcheck

This should return two results. One for /images and one for /images/dev


Disable & Verify Firewall

Fedora 20/21/22/23

Disable/stop Firewall

systemctl disable firewalld.service
systemctl stop firewalld.service

Can be undone with "start" and "enable".

Check Firewall in Fedora 20/21/22/23

systemctl status firewalld.service

Fedora 16

Add /bin/bash to /etc/shells as the vsftpd yum install does not do it correctly causing tftp timeout message


Debian/Ubuntu

sudo iptables -L

If disabled, the output should look like this:

Chain INPUT (policy ACCEPT)
target prot opt source destination 

Chain FORWARD (policy ACCEPT)
target prot opt source destination 

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Disable Ubuntu Firewall

sudo ufw disable

Disable Debian Firewall

iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT

Other debian settings:

/etc/hosts.deny

This setting in the above file will deny traffic from any source except locally:

ALL:ALL EXCEPT 127.0.0.1:DENY

Comment out this line like so:

#ALL:ALL EXCEPT 127.0.0.1:DENY

Windows 7

Start -> Control Panel -> View by "Small icons" -> Windows Firewall -> Turn Windows Firewall On or Off -> Turn off all three.

Configuring firewall on Linux

To set the firewall for Linux to only allow what is necessary, please see the FOG security article.


Permissions

Common problems and fixes







Gibberish / notes (temporary work space till article completion)

Fog uses NFS in the inits as a temporary place to mount the servers images directory during upload and download When an upload is happening it mounts through NFS to servers /images/dev When a download occurs it mounts through NFS to servers /images /images is mounted read only and /images/dev is mounted read write FTP during the imaging process is only used for uploads after the image upload is complete FTP moves /images/dev/<macOfRelevantHost> to /image/<imagePath> FTP is also used to replicate images to other nodes in the same group and to replicate to other groups master node that is assigned to the image Tom • 3:22 AM

/etc/exports  ??? Wayne Workman 1 min

Tom Elliott that's what configures the NFS Tom • 1 min


  • testing
  • mounting
  • /etc/exports
  • permissions
  • writing/uploading
  • reading/downloading