Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have 2 servers that uses 2 different protocols to access the same set of folders.
Server 1 = NFS protocol
Server 2 = CIFS protocol
for example folder is "folder1" which is available by mounting from any of this server using NFS or CIFS.
However, the question is, i would not know what is available on the client-side, some might have NFS and some might have CIFS and some might even have BOTH or even may not have any at all.
Is there a way to identify which protocol can i use to mount, or some commands to check which protocol is available or some command to know which mounting should i do NFS or CIFS, and if both are available, is there a way to know if all NFS mounts worked before switching to CIFS ?
Hoping to discuss this with the community on a effective way of doing this.
Depends on the distribution but avahi is a zeroconf network discovery service using the mDNS/DNS-SD protocol. If running the avahi-browse utility should be able to find which server is running which service.
A little more crude but nmap (a port scanning utility) should be able to detect what ports are open which corresponds to what service is running.
Depends on the distribution but avahi is a zeroconf network discovery service using the mDNS/DNS-SD protocol. If running the avahi-browse utility should be able to find which server is running which service.
A little more crude but nmap (a port scanning utility) should be able to detect what ports are open which corresponds to what service is running.
I think you might have gotten me in wrong context. I setup the server myself and therefore I know which server is what protocol. But what I am asking here is, how do I know of my clients consists of what capability NFS/CIFS in order for me to direct them via scripting to use the correct protocol and commandline with the right protocol.
For example, as I mention SERVER 1 and SERVER 2, NFS and CIFS individually.
Now I have a client, of which I do not know what the client capabilities are whether to mount using NFS or CIFS,
1- how can I identify that?
2- if they happen to have both capabilities, how can I know NFS was successful completely and therefore I can skip trying CIFS, and if NFS failed, I would try with CIFS?
Sorry, you did post client side. I agree with wpeckham there isn't a definitive method to determine client capabilities.
Depends on distribution/version but typically mount.cifs is not installed by default and would indicate if SMB/CIFS is available. With nfs it depends on version. NFS V3 requires rpcbind to be installed and running. In addition, if the client does not have to mount the share from the command line then mount.cifs is not required and access can be accomplished from the file browser. I don't know of a file browser that has a built in nfs client.
On the other hand pick one and make all clients use the same protocol then it does not matter.
Sorry, you did post client side. I agree with wpeckham there isn't a definitive method to determine client capabilities.
Depends on distribution/version but typically mount.cifs is not installed by default and would indicate if SMB/CIFS is available. With nfs it depends on version. NFS V3 requires rpcbind to be installed and running. In addition, if the client does not have to mount the share from the command line then mount.cifs is not required and access can be accomplished from the file browser. I don't know of a file browser that has a built in nfs client.
On the other hand pick one and make all clients use the same protocol then it does not matter.
Since Windows can have a problem with NFS, but both can handle CIFS properly, I would standardize on CIFS for your network share standard. Make sure you are using the latest SAMBA packages available on the LINUX clients.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.