Difference between revisions of "Troubleshoot NFS"
(→Testing NFS) |
|||
Line 13: | Line 13: | ||
== Testing NFS == | == Testing NFS == | ||
+ | |||
+ | === Mounting the remote directories === | ||
Linux must have an existing directory to mount remote directories to. Below, we create two directories and mount to each. On a separate Linux machine (not your FOG server), you can edit the /etc/exports file to mount a remote directory. | Linux must have an existing directory to mount remote directories to. Below, we create two directories and mount to each. On a separate Linux machine (not your FOG server), you can edit the /etc/exports file to mount a remote directory. | ||
Line 24: | Line 26: | ||
Instructions on using Vi: [[Vi]] | Instructions on using Vi: [[Vi]] | ||
− | You can mount both the /images and the /images/dev directories of your FOG server by adding these lines | + | You can mount both the /images and the /images/dev directories of your FOG server by '''adding''' these lines to the end of /etc/exports: |
− | + | ||
− | + | <pre> line for mounting /images ??? | |
− | <pre> line for mounting /images ??? | + | line for mounting /images/dev ??? </pre> |
− | |||
− | |||
− | |||
Line 37: | Line 36: | ||
mount FOGimages</pre> | mount FOGimages</pre> | ||
+ | |||
+ | === Testing Uploading === | ||
Line 51: | Line 52: | ||
+ | === Testing Downloading === | ||
You may test downloading from the /images directory like this: | You may test downloading from the /images directory like this: | ||
Line 95: | Line 97: | ||
− | Enable on boot???? | + | Enable on boot ??? |
+ | <pre>Code to enable on boot here ??? </pre> | ||
== NFS Settings File == | == NFS Settings File == | ||
Line 143: | Line 146: | ||
+ | Permissions go here ??? | ||
Revision as of 02:41, 25 May 2015
Article under construction. Last modified on May 24th, 2015
Contents
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>
Please note that FTP is used to move images from /images/dev to /images.
Testing NFS
Mounting the remote directories
Linux must have an existing directory to mount remote directories to. Below, we create two directories and mount to each. On a separate Linux machine (not your FOG server), you can edit the /etc/exports file to mount a remote directory.
At the CLI of the separate Linux machine, follow these commands:
mkdir /FOGdev mkdir /FOGimages vi /etc/exports
Instructions on using Vi: Vi
You can mount both the /images and the /images/dev directories of your FOG server by adding these lines to the end of /etc/exports:
line for mounting /images ??? line for mounting /images/dev ???
After editing the /etc/exports file, the remote directories need to be mounted:
mount FOGdev mount FOGimages
Testing Uploading
You may test UPLOADING to the /images/dev with this:
echo 'This is the text that I will upload' > /uploadtest.txt cp /uploadtest.txt /FOGdev/uploadtest.txt
You may confirm that the file transfered by viewing it on your FOG server using:
cat /images/dev/uploadtest.txt
Remove the test file from your FOG Server like this:
rm /images/dev/uploadtest.txt
Testing Downloading
You may test downloading from the /images directory like this:
On your FOG SERVER, execute this:
echo 'This is the text that I will download' > /images/downloadtest.txt On your '''SEPERATE Linux machine''', execute this: <pre>cp /FOGimages/downlaodtest.txt /downloadtest.txt You may view the file on your '''separate Linux machine''' like this: <pre>cat /FOGimages/downloadtest.txt
Remove the test file from your FOG Server like this:
rm /images/downloadtest.txt
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, restart NFS service
systemctl stop nfs-server
systemctl start nfs-server
The restart command is most useful, if any errors are encountered during manual start/restart, they are displayed.
systemctl restart nfs-server
Enable NFS on boot:
systemctl enable nfs-server
Ubuntu
NFS status:
sudo service nfs-kernel-server status
The restart command is most useful, if any errors are encountered during manual start/restart, they are displayed.
sudo service nfs-kernel-server restart
Enable on boot ???
Code to enable on boot here ???
NFS Settings File
Fedora 20/21
The primary NFS settings file for Fedora 20/21 is located here:
/etc/exports
On a standard FOG install where everything is self-contained on one system, it should look like this:
sample config file here
Ubuntu
The primary NFS settings file for Ubuntu is located here:
/etc/exports
On a standard FOG install where everything is self-contained on one system, it should look like this:
sample config file here
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
Permissions go here ???
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)
- testing
- mounting
- /etc/exports
- permissions
- writing/uploading
- reading/downloading