1. emerged nfs-utils net-fs/nfs-utils-1.3.2-r6::gentoo USE="ipv6 libmount nfsidmap nfsv4 tcpd uuid -caps -kerberos -nfsdcld -nfsv41 (-selinux)" 2. added nfs share to /etc/exports 3. tried to start nfs-service view systemd/systemctl: [snip] $ systemctl start nfs-server Job for nfs-server.service failed because the control process exited with error code. See "systemctl status nfs-server.service" and "journalctl -xe" for details. $ systemctl status nfs-server ● nfs-server.service - NFS server and services Loaded: loaded (/usr/lib64/systemd/system/nfs-server.service; disabled; vendor preset: enabled) Active: failed (Result: exit-code) since Fri 2015-07-31 11:09:45 EEST; 5s ago Process: 1183 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS (code=exited, status=1/FAILURE) Process: 1180 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS) Main PID: 1183 (code=exited, status=1/FAILURE) Jul 31 11:09:45 t431s systemd[1]: Starting NFS server and services... Jul 31 11:09:45 t431s rpc.nfsd[1183]: rpc.nfsd: writing fd to kernel failed: errno 111 (Connection refused) Jul 31 11:09:45 t431s rpc.nfsd[1183]: rpc.nfsd: unable to set any sockets for nfsd Jul 31 11:09:45 t431s systemd[1]: nfs-server.service: Main process exited, code=exited, status=1/FAILURE Jul 31 11:09:45 t431s systemd[1]: Failed to start NFS server and services. Jul 31 11:09:45 t431s systemd[1]: nfs-server.service: Unit entered failed state. Jul 31 11:09:45 t431s systemd[1]: nfs-server.service: Failed with result 'exit-code'. Hint: Some lines were ellipsized, use -l to show in full. [/snip] Eventually figured out that missing part in the puzzle was to start rpcbind service: $ systemctl start rpcbind Then everything went smooth: $ systemctl start nfs-server $ systemctl status nfs-server ● nfs-server.service - NFS server and services Loaded: loaded (/usr/lib64/systemd/system/nfs-server.service; disabled; vendor preset: enabled) Active: active (exited) since Fri 2015-07-31 11:12:29 EEST; 4s ago Process: 1227 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS (code=exited, status=0/SUCCESS) Process: 1224 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS) Main PID: 1227 (code=exited, status=0/SUCCESS) CGroup: /system.slice/nfs-server.service Jul 31 11:12:29 t431s systemd[1]: Starting NFS server and services... Jul 31 11:12:29 t431s systemd[1]: Started NFS server and services. Hint: Some lines were ellipsized, use -l to show in full.
$ emerge --info Portage 2.2.20 (python 2.7.10-final-0, default/linux/amd64/13.0/desktop, gcc-4.9.3, glibc-2.21-r1, 4.2.0-rc4+ x86_64) ================================================================= System uname: Linux-4.2.0-rc4+-x86_64-Intel-R-_Core-TM-_i5-3337U_CPU_@_1.80GHz-with-gentoo-2.2 KiB Mem: 12039924 total, 9960900 free KiB Swap: 2097148 total, 2097148 free Timestamp of repository gentoo: Fri, 31 Jul 2015 04:30:01 +0000 sh bash 4.3_p39 ld GNU ld (Gentoo 2.25.1 p1.0) 2.25.1 app-shells/bash: 4.3_p39::gentoo dev-java/java-config: 2.2.0::gentoo dev-lang/perl: 5.22.0::gentoo dev-lang/python: 2.7.10::gentoo, 3.3.5-r1::gentoo, 3.4.3::gentoo dev-util/cmake: 3.3.0::gentoo dev-util/pkgconfig: 0.28-r3::gentoo sys-apps/baselayout: 2.2::gentoo sys-apps/openrc: 0.17::gentoo sys-apps/sandbox: 2.6-r1::gentoo sys-devel/autoconf: 2.13::gentoo, 2.69-r1::gentoo sys-devel/automake: 1.11.6-r1::gentoo, 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo sys-devel/binutils: 2.25.1::gentoo sys-devel/gcc: 4.9.3::gentoo sys-devel/gcc-config: 1.8::gentoo sys-devel/libtool: 2.4.6-r1::gentoo sys-devel/make: 4.1-r1::gentoo sys-kernel/linux-headers: 4.1::gentoo (virtual/os-headers) sys-libs/glibc: 2.21-r1::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 crossdev location: /home/plaes/code/gentoo/crossdev masters: gentoo gnome priority: 0 gnome location: /home/plaes/code/gentoo/gnome masters: gentoo priority: 1 plaes-local location: /home/plaes/code/gentoo/local masters: gentoo priority: 2 esteid location: /home/plaes/code/gentoo/gentoo-esteid masters: gentoo priority: 3 games-overlay location: /var/lib/layman/games-overlay masters: gentoo priority: 50 science location: /var/lib/layman/science masters: gentoo priority: 50 steam-overlay location: /var/lib/layman/steam-overlay masters: gentoo priority: 50 ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=core-avx-i -g" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-O2 -pipe -march=core-avx-i -g" DISTDIR="/usr/portage/distfiles" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j5" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" USE="X a52 aac acl acpi alsa amd64 avahi berkdb blas bluetooth branding bzip2 cairo cdda cdr clang cli cracklib crypt cups cxx daap dbus djvu dri dts dvd dvdr emboss encode exif fam firefox flac fortran fuse gcj gdbm gif glamor glpk gphoto2 hdf5 iconv icu idn introspection ipv6 jpeg lapack lcms libnotify libsecret mad mmx mmxext mng modules mp3 mp4 mpeg multilib ncurses nls nptl offensive ogg openexr opengl openmp pam pango pch pcre pdf playlist png policykit ppds pulseaudio qt3support qt5 readline rtmp sdl session smartcard sparse spell sse sse2 sse4_1 sse4_2 ssl ssse3 startup-notification svg systemd tcpd tiff truetype udev udisks unicode upnp-av upower usb v4l vaapi vdpau vorbis vpx wayland x264 xcb xml xmp xv xvid xvmc zeroconf zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="synaptics evdev mouse keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3 python3_4" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="arm" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="intel i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" USE_PYTHON="2.7 3.3 3.4" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
rpcbind isn't a dependency of NFSv4 server. On OpenRC script it isn't list as a dependency either. It is only needed of NFSv2 and NFSv3. I think it's not a but. I am running myself an NFSv4 server without rpcbind (I am also using systemd).
JFYI: rpc-statd.service from nfs-utils-1.3.4 depends on rpcbind.socket.
(In reply to Alexander Tsoy from comment #3) > JFYI: rpc-statd.service from nfs-utils-1.3.4 depends on rpcbind.socket. Ooops.. I meant nfs-server.service. And it has a weak dependency on rpcbind.socket (Wants=rpcbind.socket): http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=commitdiff;h=91da135f243d6f87fcea8b8a3ce28a589917b0e4;hp=85c5c16d29d50c1f798d60e57641cd21cec2e905