NFS 不起作用。mount:错误的 fs 类型、错误的选项、错误的超级块

Man*_*d3r 18 ubuntu nfs

这是我在服务器上得到的:

manuel@server ~ $ cat /etc/exports
  /var/share    192.168.178.20(rw, sync)
manuel@server ~ $ cat /etc/hosts.allow 
  portmap: 192.168.178.20
manuel@server /etc $ cat /proc/filesystems | grep nfs
  nodev nfs
  nodev nfs4
Run Code Online (Sandbox Code Playgroud)

这是我在我的机器上得到的:

manuel@Timeline:~$ sudo mount -t nfs 192.168.178.2:/var/share /media/share/
   mount: wrong fs type, bad option, bad superblock on 192.168.178.2:/exports/var/share,
       missing codepage or helper program, or other error
       (for several filesystems (e.g. nfs, cifs) you might
       need a /sbin/mount.<type> helper program)
       Manchmal liefert das Syslog wertvolle Informationen – versuchen
       Sie  dmesg | tail  oder so
Run Code Online (Sandbox Code Playgroud)

服务器是 Raspbian (Debian Wheezy) 时间线是 Ubuntu 12.04

mdp*_*dpc 10

exportfs -aserver机器上运行。

两台机器都有所有需要的 NFS 支持包并且有 nfs 支持?您可以通过检查cat /proc/filesystems.

是的,导出文件的文件名需要是 /etc/exports

最后,检查您是否在启动期间启用了 NFS 守护程序。


小智 7

确保 mount.cifs、mount.nfs 列在 /sbin 中:

ls -l /sbin/mount.cifs
ls -l /sbin/mount.nfs
Run Code Online (Sandbox Code Playgroud)

检查软件包 nfs-common, cifs-utils 是否已安装:

dpkg -l cifs-utils
dpkg -l nfs-common
Run Code Online (Sandbox Code Playgroud)

如果/sbin/mount.nfs还没有:

sudo apt-get install nfs-common
Run Code Online (Sandbox Code Playgroud)

如果/sbin/mount.cifs还没有:

sudo apt-get install cifs-utils
Run Code Online (Sandbox Code Playgroud)