问题
I had a requirement to mount a NFS. After several trial and errors, I could mount a NFS file system from NAS on my Linux system. We were also evaluating if cifs can be used when NFS does not work. man pages were too confusing and could not find any lucid explanation on web. My question is - if NFS is a problem can mount -t cifs be used in place ? Is cifs always available as replacement for nfs.
回答1:
CIFS is not always available (but often is). When it works, NFS works better for unixy clients than CIFS tends to be.
To see if there's CIFS on the server, use the smbclient(1) program, possibly 'smbclient -L servername'.
To use CIFS from unix, you typically need to know a user name and password for the CIFS server, and reference them in the mount command or fstab entry. You can put the password in a file that is protected and use the file for the mount.
If you don't know the CIFS server admin to get a user/pass, you have many problems.
回答2:
It's hard to answer, because it depends on the server.
NFS and CIFS aren't different filesystems - they're different protocols for accessing a server side export.
Generally speaking:
- NFS is what Unix uses, because it aligns neatly with the Unix permissions model.
- CIFS is (generally) what Windows uses. (It uses a different permissions model too).
Key differences between the two are that CIFS operates in a user context - a user accesses a CIFS share. Where NFS operates in a host context - the host mounts an NFS filesystem, and local users permissions are mapped (in a variety of ways, depending on NFS version and authentication modes).
But because - pretty fundamentally - they use different permissioning and authorization mechanisms, you can't reliably just mount an NFS export as CIFS. It relies on the server supporting it, and handling the permission mapping. You would need to ask the person who owns that server for details.
来源:https://stackoverflow.com/questions/25693218/mount-t-nfs-vs-cifs