unix:freebsd:system_builds:nfsserver
Differences
This shows you the differences between two versions of the page.
Next revision | |||
— | unix:freebsd:system_builds:nfsserver [2019/07/11 02:11] – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Build NFS Server ====== | ||
+ | |||
+ | This is a total rewrite since FreeBSD and ZFS have the ability to export nfs directly. You can always not use the sharenfs function in zfs (ie, sharenfs=off) and use the standard way of exporting. ZFS running nfs actually is not as pretty as the old way, but it is very efficient for maintenance. | ||
+ | |||
+ | The following assumes you have a zpool named //storage// and you will create a tree of nfs exportable directories under that. | ||
+ | |||
+ | For our needs, we want some exports that will go to our Linux Xen machines, which will have common data between them. For example, our xen configuration files should be available across all of our DOM0' | ||
+ | |||
+ | We also want to export to a couple of running virtuals to store large amounts of data. Since they have public interfaces, we need to set up our nfs server to only allow limited access to our nfs server, both by limiting through nfs and also with firewalls. | ||
+ | |||
+ | <code bash> | ||
+ | zfs create -o atime=off -o dedup=off -o mountpoint=/ | ||
+ | |||
+ | zfs create -o sharenfs=' | ||
+ | mkdir / | ||
+ | mkdir / | ||
+ | mkdir / | ||
+ | chmod 777 / | ||
+ | |||
+ | zfs create -o sharenfs=' | ||
+ | zfs create -o sharenfs=' | ||
+ | </ | ||
+ | |||
+ | Note that we created storage/ | ||
+ | |||
+ | We then created storage/ | ||
+ | |||
+ | Finally, we create two stores for some servers to put their stuff in, and we limit access to them to only the server itself. | ||
+ | |||
+ | |||
+ | ===== Links ===== | ||
+ | * https:// | ||
+ | * https:// | ||
+ | * http:// | ||
+ | * [https:// | ||
+ | * https:// | ||
+ | * https:// | ||
+ | * https:// | ||
+ | * https:// | ||
+ | |||
unix/freebsd/system_builds/nfsserver.txt · Last modified: 2023/01/17 20:40 by rodolico