Results 1 to 6 of 6
Can you help me in some thing, I have mounted nearly 3 of my Systems to 1 of my Server. I'm using Cent OS 5, if I restart the server ...
- 11-19-2007 #1Just Joined!
- Join Date
- Nov 2007
- Location
- I Live at chennai
- Posts
- 9
Losing mounts on CentOS 5
Can you help me in some thing, I have mounted nearly 3 of my Systems to 1 of my Server. I'm using Cent OS 5, if I restart the server I loose the Mounts, so I've to manually mount them each time I restart.
is there a shell script to check for all 3 Mounts and automatically start them if Any one of the Mounts are down. how to do this please help me ..
Thanks if you would help
- 11-20-2007 #2
Did you declare the NFS mounts in /etc/fstab so that they're automatically mounted at boot time?
If the other machines are down when the server starts, you do know that the mount process will fail, don't you?
You can also use the 'mount' command and 'grep' to find if particualar partitions or disks are mounted, try:
Code:# mount |grep 'sda1'
Linux user #126863 - see http://linuxcounter.net/
- 11-20-2007 #3Just Joined!
- Join Date
- Nov 2007
- Location
- I Live at chennai
- Posts
- 9
Thank you very much for your reply, I've already mounted my NFS at /etc/fstab , but it dint work I'm not sure why..
(example) <server>:/home/data /home/softwares/lists nfs rw,hard,intr,rsize=8192,wsize=8192 0 0
And since I have mounted nearly 3 to 4 NFS mounts, I thought of writing a script which would check each mounts to dirrerent machines every time individually via a crontab, and restart a particular mount if it is down..
Any ideas how to do it ?
suggestions ?
- 11-20-2007 #4Just Joined!
- Join Date
- Nov 2007
- Location
- I Live at chennai
- Posts
- 9
Hi any suggestions Please ?
- 11-20-2007 #5
To check if a partition in fstab is mounted, use the mount command. If you grep for it's mountpoint, then it'll either report the mount or not. Try 'mount |grep <mountpoint>'.
As an alternative, you can still call 'mount -a' and it'll fail to mount anything that is already mounted.Linux user #126863 - see http://linuxcounter.net/
- 11-21-2007 #6Just Joined!
- Join Date
- Nov 2007
- Location
- I Live at chennai
- Posts
- 9
Hi,
Thank you very, I tried the following command
mount -f nfs | grep 'mount point' its worked well.
Thanks again



Reply With Quote
