Warning: THE VOID WIKI IS DEPRECATED. It is no longer being maintained, contains outdated and incorrect information, and will eventually be shut down. Please refer to the Void Handbook, https://docs.voidlinux.org/, for the official documentation. If you can't find the information you're seeking, please raise an issue at https://github.com/void-linux/void-docs/issues

Runit

From Void Linux Wiki
Revision as of 02:04, 2 November 2015 by Gregf (talk | contribs) (Created page with "=== Setting up a client (NFSv4, kerberos disabled) === To mount NFS shares (aka ''client'') a few simple steps must be done: 1- Install the '''nfs-utils''' package: <pre>#...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Setting up a client (NFSv4, kerberos disabled)

To mount NFS shares (aka client) a few simple steps must be done:

1- Install the nfs-utils package:

# xbps-install -S nfs-utils

2- Start and enable the rpcbind service:

# ln -s /etc/sv/rpcbind /var/service

3- Mount the share:

# mount -t nfs4 <host:/path/to/dir> /mnt/nfs/share

You can find out what shares is exporting a server with showmount -e <host>.

For NFSv2 or NFSv3 don't forget to also start/enable /etc/sv/statd.

Setting up a server (NFSv4 - kerberos disabled)

1- Install the nfs-utils package:

# xbps-install -S nfs-utils

2- Edit the /etc/exports file:

# /etc/exports
#
# See exports(5) for more information.
#
# Use exportfs -r to reread
# /export       192.168.1.10(rw,no_root_squash)
/storage/foo    *.local(rw,no_subtree_check,no_root_squash)

With that file we are exporting to any host in the local domain the /storage/foo directory as read/write (plus two other options, refer to exports(5) for information).

3- Start and enable required services:

# ln -s /etc/sv/rpcbind /var/service
# ln -s /etc/sv/statd /var/service
# ln -s /etc/sv/nfs-server /var/service

The shares should now be working, if that's not the case please check /var/log/messages (if using a syslog daemon). Use the showmount(8) utility to verify:

# showmount -e localhost