zfs开启通过nfs共享失败

今天想在pve里边通过zfs来开启nfs的共享 执行了命令 zfs set sharenfs=on zfspan/test 结果一直报错,从错误上一直没看出是什么原因

root@xxxx:~# zfs set sharenfs=on zfspan/test
cannot share 'zfspan/test': share(1M) failed
property may be set but unable to reshare filesystem

最后是发现是因为proxmox ve系统里边并没有安装nfs

安装命令如下:

root@xxxxx:~# apt install nfs-kernel-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  nfs-kernel-server
0 upgraded, 1 newly installed, 0 to remove and 30 not upgraded.
Need to get 124 kB of archives.
After this operation, 353 kB of additional disk space will be used.
Get:1 https://mirrors.tuna.tsinghua.edu.cn/debian buster/main amd64 nfs-kernel-server amd64 1:1.3.4-2.5 [124 kB]
Fetched 124 kB in 1s (135 kB/s)
Selecting previously unselected package nfs-kernel-server.
(Reading database ... 52738 files and directories currently installed.)
Preparing to unpack .../nfs-kernel-server_1%3a1.3.4-2.5_amd64.deb ...
Unpacking nfs-kernel-server (1:1.3.4-2.5) ...
Setting up nfs-kernel-server (1:1.3.4-2.5) ...
Created symlink /etc/systemd/system/multi-user.target.wants/nfs-server.service → /lib/systemd/system/nfs-server.service.
Job for nfs-server.service canceled.

Creating config file /etc/exports with new version

Creating config file /etc/default/nfs-kernel-server with new version
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for systemd (241-7~deb10u1) ...
评论

  • Blocky 218天前

    [root@centos8-1 ~]# mount -t nfs -o 192.168.124.100:/zfspan/test /aaa
    mount: /aaa: bad option; for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount. helper program.

    在客户端连接服务器是,提示上边的错误。说明没安装nfs
    执行命令 yum install nfs-utils 来安装

    回复 举报

    Blocky

    登录过40天

    分享&发布