NFS network file system
To mount and unmount NFS network file systems, you need to set up a NFS server.
Install the NFS client package:
# yum install -y nfs-utils
Let’s assume that the /home/tools directory is exported by the nfsserver server.
If no working DNS, add an entry in the /etc/hosts file with the nfsserver name and its IP address.
Edit the /etc/fstab file and add the following line:
nfsserver:/home/tools /mnt nfs4 defaults 0 0
Execute the /etc/fstab file configuration:
# mount -a
To check the current configuration, type:
# mount | grep nfsserver
To unmount the NFS mounted directory, remove the previous line from the /etc/fstab file and type:
# umount /mnt
Note: If you get a message like “/mnt: device is busy”, check that you are not in the mounted directory and no process is using it. To do that, type:
# fuser /mnt
CIFS network file system
To mount and unmount CIFS network file systems, you need to set up a CIFS file server.
Install the Samba client packages:
# yum install -y cifs-utils # yum install -y samba-client
Let’s assume that the /shared directory is exported by the smbserver server.
If no working DNS, add an entry in the /etc/hosts file with the smbserver name and its IP address.
Edit the /etc/fstab file and add the following line:
//smbserver/shared /mnt cifs rw,username=user01,password=pass 0 0
Execute the /etc/fstab file configuration:
# mount -a
To check the current configuration, type:
# mount | grep smbserver
?I used to be very pleased to find this web-site.I needed to thanks in your time for this glorious learn!! I definitely having fun with each little little bit of it and I’ve you bookmarked to take a look at new stuff you weblog post.
Thank you very much.
“smbserver:/shared /mnt cifs rw,username=user01,password=user01 0 0”
also you can do the following .. instead of typing username and password in a word readable file like fstab you can use the following options
credentials=/path/to/credentials/file
like so
/root/.credentials
where .credentials contains the following
username=username
password=password
and set the following permission on it
chmod 0600 ..
make sure it’s owned by root
chown root.root /root/.credentials
and that’s it 😀 thanks to M.Jang’s book