我将一个外部硬盘连接到运行 Raspbian 的 Raspberry Pi。它显示在 /dev/sda2 和 /dev/sda3(两个分区)下。我遵循了许多教程,但似乎没有一个能解决我的问题。也就是说,我想通过 NFS 共享我的 USB 连接硬盘(我知道有 SMB 等,但我很固执)并能够将其安装在我的 Macbook 上。此外,我想将我的 Macbook 上的备份备份到同一个硬盘上。在我将 USB 硬盘连接到 Pi 之前,当它连接到我的 Airport Extreme 时,这是可能的。我尝试了以下方法:
pi@raspbmc:/media$ rpcinfo -p | grep nfs
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
pi@raspbmc:/media$ cat /proc/filesystems | grep nfs
nodev nfs
nodev nfs4
nodev nfsd
pi@raspbmc:/media$ rpcinfo -p | grep portmap
100000 4 tcp 111 portmapper
100000 3 tcp 111 portmapper
100000 2 tcp 111 portmapper
100000 4 udp 111 portmapper
100000 3 udp 111 portmapper
100000 2 udp 111 portmapper
pi@raspbmc:/media$ cat /etc/exports
/media/Data *(rw,sync,subtree_check)
/media/Backups *(rw,sync,subtree_check)
pi@raspbmc:/media$ sudo /etc/init.d/nfs-kernel-server restart
[ ok ] Stopping NFS kernel daemon: mountd nfsd.
[ ok ] Unexporting directories for NFS kernel daemon....
[....] Exporting directories for NFS kernel daemon...exportfs: /media/Backups does not support NFS export
exportfs: /media/Data does not support NFS export
. ok
[ ok ] Starting NFS kernel daemon: nfsd mountd.
pi@raspbmc:/media$ sudo exportfs -ra
exportfs: /media/Backups does not support NFS export
exportfs: /media/Data does not support NFS export
根据以下链接:
运行以下命令应该可以修复它(我已经这样做了,所以输出日志略有不同):
pi@raspbmc:/media$ sudo fsck.hfsplus /dev/sda2
** /dev/sda2
** Checking HFS Plus volume.
** Checking Extents Overflow file.
** Checking Catalog file.
** Checking Catalog hierarchy.
** Checking volume bitmap.
** Checking volume information.
** The volume SPARE appears to be OK.
pi@raspbmc:/media$ sudo fsck.hfsplus /dev/sda3
** /dev/sda3
** Checking HFS Plus volume.
** Checking Extents Overflow file.
** Checking Catalog file.
** Checking Catalog hierarchy.
** Checking volume bitmap.
** Checking volume information.
** The volume SPARE appears to be OK
有人有建议可以帮助我转发吗?