我们既然是要把Windows 的硬盘给Linux使用 就需要在Windows上安装NFS网络文件系统 操作如下
1.添加角色-----文件服务---勾选网络文件服务




2.安装完成后 我们需要把这30G空间给Linux用

创建一个文件夹 然后点击管理NFS共享 共享使用默认

添加IP


为客户端IP

然后登录Linux挂载
首先创建一个挂载点

挂载

设置开机挂载
vi /etc/fatab

[root@htuidc /]# vi /etc/rc.local

设置完之后重启就可以了
Linux mount挂载常见问题
mount: wrong fs type, bad option, bad superblock on 125.64.41.244:/data/img,
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount.<type> helper program)
In some cases useful info is found in syslog - try
dmesg | tail or so
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount.<type> helper program)
In some cases useful info is found in syslog - try
dmesg | tail or so
解决办法:
Linux没有安装nfs-utils
[root@htuidc /]# yum -y install nfs-untils
2.遇到这个问题是没开启rpcbind服务
# mount 42.51.153.157:/nfs /mnt
mount.nfs: rpc.statd is not running but is required for remote locking.
mount.nfs: Either use '-o nolock' to keep locks local, or start statd.
mount.nfs: an incorrect mount option was specified
解决办法:client:
# /etc/init.d/rpcbind start
mount.nfs: rpc.statd is not running but is required for remote locking.
mount.nfs: Either use '-o nolock' to keep locks local, or start statd.
mount.nfs: an incorrect mount option was specified
解决办法:client:
# /etc/init.d/rpcbind start