Posts Tagged ‘RHEL’

Setting up NFS on RHEL

What I’ve recently learned is how to use NFS to share folders between two Red Hat Enterprise Linux 5 machines. They are both on the same network and for simplicity have had firewall disabled (firewall settings were not required in my setup). Below are some tips I used on each of the respective machines in no particular order. Additionally, all steps were performed using the root login.

Machine A (contains file to share)

  1. Make sure NFS service is running. You can do this by typing ps aux | grep nfs in the terminal.
  2. To start the NFS service, type /etc/rc.d/init.d/nfs start or /etc/rc.d/init.d/nfs restart in the terminal.
  3. If you want the NFS service to start automatically at boot up, add /etc/rc.d/init.d/nfs start or /etc/rc.d/init.d/nfs restart to the /etc/rc.d/rc.local file.
  4. Next, we need to specify the share specifics. This involves specifying the folder path, the remote machine (Machine B), and the share permissions. The information goes into /etc/exports. Use the following format: /mnt/shareThisFolder machineBName(ro). After updating the file, make sure to restart the NFS service (#3 above).

Machine B (wants access to remote files)

  1. We need to mount the folder we shared earlier on Machine A. The changes go into /etc/fstab file. We need the remote machine name, remote filepath (should be same as the earlier specified location), local filepath. Use for the following format: machineAName:/mnt/shareThisFolder /mnt/filesFromMachineA nfs rsize=8192, wsize=8192,timeo=14,intr 0 0. After saving the file, type mount -a in the terminal to start the share.

Troubleshooting:

  1. Some issues I kept running into was mount failed XXXXXXXX, reason given by server permission denied. This happened to me because though I had started the NFS service on Machine A, I had failed to specify the folder to share. After adding those details (and restarting the NFS service), I was able to mount from Machine B.
  2. NFS has been working for a few weeks, but has suddenly stopped working. The host computer had been rebooted. The solution is to run the following under the root account in this order:/etc/rc.d/init.d/nfslock restart
    /etc/rc.d/init.d/portmap restart
    /etc/rc.d/init.d/nfs restart

    Make sure none of the operations failed, then try remounting. A more long term solution to this is to insure that nfslock, portmap, and nfs autostart during RHEL bootup. Type /usr/sbin/ntsysv from the terminal and make sure those three are checked!

Red Hat Enterprise Linux 5 Installation Cannot Find Devices

In the process of installing Red Hat Enterprise Linux 5 (RHEL 5) on a brand new Dell Optiplex 755, I came across the following error:

Unable to find any devices of the type needed for this installation type. Would you like to manually select your driver or use a driver disk?

Another symptom to this problem is the installation continuing in Text mode despite the command to install in GUI mode. You know you are in Text mode if you have no mouse control.

A quick workaround to the device request problem is to switch the SATA operation to “AHCI” mode in the BIOS. AHCI (stands for Advanced Host Controller Interface) allows communcation to SATA devices. With this setting, I started the installation without any other parameters. The installation went smoothly and took about six minutes to complete. Boot up to RHEL5 was error free as well.

Note that many sites recommend and alternative solution of switching the BIOS to “legacy” mode. I initially tried this method and found it greatly extended the installation time to over twenty minutes. It seems that switching to legacy mode has a major performance hit. Additionally, after the switch to legacy mode, a post installation problem occurred where the initial boot up resulted in a {}.

If you are still having challenges installing RHEL 5, refer to this great reference: http://www.linuxtopia.org/online_books/rhel5/installation_guide/index.html

Install Package Updates from the Linux Shell

Installing updates from the Linux Shell is very simple in CentOS 4 and RHEL4 (with a valid subscription). Below are two of the most commonly used methods.

The first method can be dangerous, is easier because it is a non-interactive installation. It automatically assumes yes to all prompts.

yum -y update

The second method is safer and is exactly the same as the first method, except it will prompt you at specified parts of the installation process.

yum update