Difference between revisions of "Troubleshoot NFS"

From FOG Project
Jump to: navigation, search
m (Testing NFS)
(Fedora 20/21)
Line 19: Line 19:
 
=== Fedora 20/21 ===
 
=== Fedora 20/21 ===
  
 
+
*Check the status of NFS with <pre>systemctl status nfs-server</pre> (should be on and green, no errors, and enabled)
 +
*stop, start, disable and enable NFS service
 +
<pre>systemctl stop nfs-server</pre>
 +
<pre>systemctl start nfs-server</pre>
 +
<pre>systemctl enable nfs-server</pre>
 +
<pre>systemctl disable nfs-server</pre>
  
 
=== Ubuntu ===
 
=== Ubuntu ===

Revision as of 02:00, 25 May 2015

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

NFS Service

Fedora 20/21

  • Check the status of NFS with
    systemctl status nfs-server
    (should be on and green, no errors, and enabled)
  • stop, start, disable and enable NFS service
systemctl stop nfs-server
systemctl start nfs-server
systemctl enable nfs-server
systemctl disable nfs-server

Ubuntu

NFS status:

sudo service nfs-kernel-server status

NFS Restart:

sudo service nfs-kernel-server restart

NFS Settings File

Fedora 20/21

Ubuntu

Creating & verifying .mntcheck files

.mntcheck is a hidden and empty file that a FOG client uses during image upload/capture and image download/deployment to verify an 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

My problem isn't in the WiKi!

If you have a problem with FOG, or have a solution to a problem with FOG, please visit the forums for help or to report your solution. We try to keep the WiKi updated with things found in the forum. You can visit the forum here: FOG Forums



Image Upload: Error Checking Mount

Please see Image Capture: Error Checking Mount


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