root@Ubuntu-mate:~# /etc/init.d/nfs-kernel-server restart
[....] Restarting nfs-kernel-server (via systemctl): nfs-kernel-server.serviceA

dependency job for nfs-server.service failed. See 'journalctl -xe' for details.
 failed!
root@Ubuntu-mate:~#

启动nfs服务失败,请输入“'journalctl -xe”命令查看详细信息

root@Ubuntu-mate:~# journalctl -xe
-- Subject: Unit nfs-mountd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit nfs-mountd.service has failed.
--
-- The result is dependency.
Jul 20 08:52:09 Ubuntu-mate systemd[1]: Job nfs-mountd.service/start failed with
Jul 20 08:52:09 Ubuntu-mate systemd[1]: Dependency failed for NFSv4 ID-name mapp
-- Subject: Unit nfs-idmapd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit nfs-idmapd.service has failed.
--
-- The result is dependency.
Jul 20 08:52:09 Ubuntu-mate systemd[1]: Job nfs-idmapd.service/start failed with
Jul 20 08:52:09 Ubuntu-mate systemd[1]: Job nfs-server.service/start failed with
Jul 20 08:52:09 Ubuntu-mate systemd[1]: Unit proc-fs-nfsd.mount entered failed s
Jul 20 08:52:09 Ubuntu-mate systemd[1]: nfs-idmapd.service: control process exit
Jul 20 08:52:09 Ubuntu-mate systemd[1]: Unit nfs-idmapd.service entered failed s
Jul 20 08:52:09 Ubuntu-mate systemd[1]: nfs-idmapd.service failed.
Jul 20 08:52:09 Ubuntu-mate polkitd(authority=local)[546]: Unregistered Authenti
lines 2583-2605/2605 (END)
-- Subject: Unit auth-rpcgss-module.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit auth-rpcgss-module.service has finished starting up.
--
-- The start-up result is done.
Jul 20 08:52:09 Ubuntu-mate systemd[1]: Started RPC security service for NFS server.
-- Subject: Unit rpc-svcgssd.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit rpc-svcgssd.service has finished starting up.
--
-- The start-up result is done.
Jul 20 08:52:09 Ubuntu-mate systemd[1]: Started RPC security service for NFS client and server.
-- Subject: Unit rpc-gssd.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit rpc-gssd.service has finished starting up.
--
-- The start-up result is done.
Jul 20 08:52:09 Ubuntu-mate mount[1246]: mount: unknown filesystem type 'nfsd'
Jul 20 08:52:09 Ubuntu-mate systemd[1]: proc-fs-nfsd.mount mount process exited, code=exited status=32
Jul 20 08:52:09 Ubuntu-mate rpc.idmapd[1250]: main: fcntl(/run/rpc_pipefs/nfs): Invalid argument
Jul 20 08:52:09 Ubuntu-mate systemd[1]: Failed to mount NFSD configuration filesystem.
-- Subject: Unit proc-fs-nfsd.mount has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit proc-fs-nfsd.mount has failed.
--
-- The result is failed.
Jul 20 08:52:09 Ubuntu-mate systemd[1]: Dependency failed for NFS server and services.
-- Subject: Unit nfs-server.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit nfs-server.service has failed.
--
-- The result is dependency.
Jul 20 08:52:09 Ubuntu-mate systemd[1]: Dependency failed for NFS Mount Daemon.
-- Subject: Unit nfs-mountd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit nfs-mountd.service has failed.
--
-- The result is dependency.
Jul 20 08:52:09 Ubuntu-mate systemd[1]: Job nfs-mountd.service/start failed with result 'dependency'.
Jul 20 08:52:09 Ubuntu-mate systemd[1]: Dependency failed for NFSv4 ID-name mapping service.
-- Subject: Unit nfs-idmapd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit nfs-idmapd.service has failed.
--
-- The result is dependency.
Jul 20 08:52:09 Ubuntu-mate systemd[1]: Job nfs-idmapd.service/start failed with result 'dependency'.
Jul 20 08:52:09 Ubuntu-mate systemd[1]: Job nfs-server.service/start failed with result 'dependency'.
Jul 20 08:52:09 Ubuntu-mate systemd[1]: Unit proc-fs-nfsd.mount entered failed state.
Jul 20 08:52:09 Ubuntu-mate systemd[1]: nfs-idmapd.service: control process exited, code=exited status=1
Jul 20 08:52:09 Ubuntu-mate systemd[1]: Unit nfs-idmapd.service entered failed state.
Jul 20 08:52:09 Ubuntu-mate systemd[1]: nfs-idmapd.service failed.
Jul 20 08:52:09 Ubuntu-mate polkitd(authority=local)[546]: Unregistered Authentication Agent for unix-process:1241:10771 (system bus name :1.27, object path /org/freede
lines 2563-2605/2605 (END)

从上面的信息中,可以看出,无法挂载NFS网络文件系统,且这个网络文件系统是由linux内核启动时自动挂载。所以只有重新下载内核,重新把NFS网络文件系统加入内核中,内核配置信息如下,并附上图,重新编译内核。

.config - Linux/arm 3.4.39 Kernel Configuration
 ──────────────────────────────────────────────────────────────────────────────
  ┌───────────────────────── Network File Systems ──────────────────────────┐
  │  Arrow keys navigate the menu. selects submenus --->.          │ 
  │  Highlighted letters are hotkeys.  Pressingincludes,excludes, │ 
  │ modularizes features.  Pressto exit, for Help, </> │ 
  │  for Search.  Legend: [*] built-in  [ ] excluded module  < >       │ 
  │ ┌─────────────────────────────────────────────────────────────────────┐ │ 
  │ │    --- Network File Systems                                         │ │ 
  │ │      NFS client support                                         │ │ 
  │ │    [ ]     NFS client support for NFS version 3                     │ │ 
  │ │    [ ]     NFS client support for NFS version 4                     │ │ 
  │ │    [*]   Provide NFS client caching support                         │ │ 
  │ │      NFS server support                                         │ │ 
  │ │    [*]     NFS server support for NFS version 3                     │ │ 
  │ │    [*]       NFS server support for the NFSv3 ACL protocol extension│ │ 
  │ │      Secure RPC: Kerberos V mechanism                           │ │ 
  │ │    [*]   RPC: Enable dprintk debugging                              │ │ 
  │ └────┴(+)─────────────────────────────────────────────────────────────┘ │ 
  ├─────────────────────────────────────────────────────────────────────────┤ 
  │                   


注意:本文归作者所有,未经作者允许,不得转载