Skip to content

Mounting a Network Shared Folder (RedHat)

September 10, 2012

Purpose

This will explain how to set up a shared directory between two linux machines.

Mounting

  1. Start NFS Application
    $ sudo /etc/rc.d/init.d/nfs start
    • Note:
      #Getting Help
      $ sudo /etc/rc.d/init.d/nfs help
      
      #Stopping
      $ sudo /etc/rc.d/init.d/nfs start
      
      #Getting Status
      $ sudo /etc/rc.d/init.d/nfs status
      
  2. Add main directory of the folder you want to share to exports folder
    $ sudo nano /etc/exports
    # Add this line to the file:
    /usr *(rw,sync,no_root_squash)
    
    $ sudo /usr/sbin/exportfs -va
    
  3. Mount the folder
    $ sudo /bin/mount {server-name}:/path/to/shared /path/to/shared/

Unmounting

$ sudo umount -f  /path/to/shared
  • Note: You may get an error saying that the device is busy:
    umount:/path/to/shared: device is busy
    umount:/path/to/shared: device is busy
    
    • To fix this
      1. execute:
        $ sudo /sbin/fuser -km /path/to/shared
      2. Try to unmount again

List all devices including shared directories

$ df
Advertisements

From → Guide

4 Comments
  1. Bosstiger permalink

    Reblogged this on Gigable – Tech Blog.

  2. I think other website proprietors should take this site as an model, very clean and wonderful user friendly style and design, as well as the content. You are an expert in this topic!

  3. Not what I was looking for but wonderful anyway! Well done!

  4. This is exactly the thing I’ve been hunting for! Superb and cheers!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: