Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Register

[CentOS] Mount Storage Server with NFS

JustinJustin Member
edited August 2017 in Various Tutorials
Please follow instructions below in order to successfully mount Storage Server on other VPS.

1. Actions on the Storage Server side

1.1. Install NFS packages:

yum install nfs-utils nfs-utils-lib

1.2. Edit configuration:

nano /etc/sysconfig/nfs

Uncomment and edit following lines:


1.3. Start services:

chkconfig nfs on
service rpcbind start
service nfs start

1.4. Now edit exported directories:

nano /etc/exports

For example we add /home directory (change VPS_IP):

/home          VPS_IP(rw,sync,no_root_squash,no_subtree_check)

And export these settings:

exportfs -a

2. Actions on the VPS side

2.1. Install packages:

yum install nfs-utils nfs-utils-lib

2.2. Create mount point:

mkdir -p /mnt/nfs/home

2.3. Mount (change STORAGE_SERVER_IP):

mount STORAGE_SERVER_IP:/home /mnt/nfs/home -o nolock

That's it. Now check:

df -h

Results should be like this:

Filesystem          Size  Used Avail Use% Mounted on
/dev/simfs           40G  1.4G   39G   4% /
none                2.0G  4.0K  2.0G   1% /dev
none                512M     0  512M   0% /tmp
STORAGE_SERVER_IP:/home   40G  828M   40G   3% /mnt/nfs/home

In order to unmount execute command:

umount /mnt/nfs/home

Sign In or Register to comment.

Learn how to install a web and database server, email, FTP client or other applications. Discover and share information on server security or optimization recommendations.
Feel free to join our constantly expanding community, participate in discussions, strengthen your knowledge on Linux and Windows server management!
© 2013 - 2021 Time4VPS. All rights reserved.

Get In Touch