Auto Mount of Windows Shared Folder on Linux
Auto
Mount of Windows Shared Folder on Linux
Applies
to:
Enterprise Linux – Version: any
Description:
I have oracle database 11gR2 on oracle
enterprise Linux 5.7. I want to mount a windows shared folder on linux.
Solution:
To mount a windows shared
folder on linux:
·
Login on linux by root user
·
Check the following rpm’s:
o Fuse-2.7.4-8.el5
o Fuse-ntfs-3g-2010.5.22-1.el5.rf
·
If not, install the above rpm’s on linux
·
Now create a new folder</data> on linux
to mount windows folder
·
Grant read/write permission on windows shared
folder<Data_Backups> to a windows/domain user<datacell>, windows
machine IP <192.168.1.1>
·
Execute the following command on linux by
root user to mount it:
mount -t cifs
-o username=datacell,password=data123,ip=192.168.1.1
‘\\192.168.1.1\Data_Backups’ /data
·
Windows shared folder mounted on /data on linux
·
Check mount points execute command:
df -h
·
/data has been mounted
Now after restart linux machine mount point /data has been disappeared.
To auto mount the /data mount point at startup on linux, you should enter the
mount point entry in /etc/fstab as follow:
vi /etc/fstab
Go to bottom of the file and
enter the following line:
\\192.168.1.1\Data_Backups /data cifs username=datacell,password=data123 0 0
Save and exit from file.
Now after restart the linux machine /data mount point automatically
mount.
Your comments, especially which will help us
improve the functionality, will be greatly appreciated :)
Comments
Post a Comment