how to get mounted IP address into text file
I am sharing directories using NFS.so one machine mounted those locations (Server). so i need to get what are the machine which successfully mounted (IP address of mounted locations).
At the boot time server mount the remote location.but i want to get what are the successfully mounted location into text file. thanks, |
Usually, you can see it on /etc/mtab
i hope thats what you meant |
Quote:
Code:
showmount -a > textfile Code:
netstat -a | grep nfs > textfile |
What is a mean about this error
when type a command
showmount -a it will give a error message mount clntudp_create:RPC:Program not registered how can i solve this problem thanks, |
u are not configured the NFS on ur machine.
check the machine NFS is running and configured then try showmount -e <server ip/name> Regds KVK India |
still i'm having same problem mates.
I'm unable to get machines IP's which were successfully mounted into NFS Client. Actually my NFS client work as distributor. he will store the data files among his NFS servers. NFS server only export his location to NFS client.(one NFS client and many NFS servers) to store data files NFS client need to know what are the successfully mounted remote locations(NFS Servers).Because some NFS server machine can be in power off state. therefore i need to get success fully mounted NFS servers IP's Please Help Me Friends, thanks. |
Quote:
I restart nfs service like this service nfs start chkconfig nfs on now it'sworking still i'm unable to get IP's of successfully mounted machines Thanks, |
How to run script just before shutdown/restart the LInux machine
Hey Guys,
I need to know how to run script just befor shutdown /restart the linux machine. actually what i want is pass the message to another machine saying I'm shutting down. Please give sample script (specially mention how to set runlevels) Thanks, |
Quote:
The mount is initiated by the client, so if you have only one client, that is where you need to look, namely in the client. As pointed out before by the_bigbalu, you just need to look at /etc/mtab, which will tell you what is currently mounted at the moment by the server. You could also just run mount, which will tell you what file systems the client has mounted. In order to run a script during shutdown, just place the script in /etc/rc.d/rc0.d (/etc/rc.d/rc6.d for reboot) and prepend Knn to the name of the script, where nn is a number that indicates the running order of the script if memory serves right. To check whether a server is up, you could ping the host once ping <ip> -c 1 and parse the output to check whether it responds. Hope this helps, but I'm not sure this is what you want. |
i when i type
vi /etc/ftab | grep nfs it shows all mounted point and location (by nfs) it is ok, but suddenly one machine can be down (power failure or any reasons).Then i'm unable to access that location. again i typed same command and shows a same result. but actually one location is physically down. hw can i solve this problem. PS: Are there any methods to restart mount location without restarting machine.(My server can't reboot it work as 24/7 ) hw to re-mount nfs location without restarting machine thanks, |
Code:
/etc/fstab If you Code:
cat /etc/mtab Code:
df -h |
Dear Chris,
Thank you for your kind assistant. df -h list down all actually mounted location. in a situation mounted location can be unavailable (power failure). still df -h provide same result. how can i get that unexpected failure to know up and running mounted locations. PS:- What i want is to get actually mounted location repeatedly. (it can be kind of script which runs given interval) Thanks |
mount -a -t nfs
mount all nfs type remote location accordingly /etc/fstab eachn nfs server will run this command at each reboot time exportfs -r ( try to add this into init.d ) |
All times are GMT -5. The time now is 11:14 PM. |