unix:freebsd:system_builds:xenstoragebackend
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
Previous revisionNext revision | |||
— | unix:freebsd:system_builds:xenstoragebackend [2019/09/15 07:23] – rodolico | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Build Storage Backend ====== | ||
+ | I am moving our iSCSI target over to FreeBSD. Our iSCSI servers are generally used as the "disk drives" | ||
+ | |||
+ | We also export nfs for use by the Xen Hypervisor and, in a few cases, for the virtual machines themselves. | ||
+ | |||
+ | This document will describe how it is built. | ||
+ | |||
+ | ===== Basic Requirements ===== | ||
+ | * NFS service used for common files | ||
+ | * xen-configs stores the Xen configuration files shared by all DOM0' | ||
+ | * xen-store stores common files for all DOM0' | ||
+ | * xen-images stores FBD's, allowing quick and dirty testing where necessary. | ||
+ | * NFS service used for some virtual storage backends also. In some cases, the storage requirements are large but the accesses are low enough nfs is quite capable of handling it. | ||
+ | * message store for mail servers | ||
+ | * file storage for NextCloud/ | ||
+ | * file storage for some web servers | ||
+ | * iSCSI exports for the virtual images. Each virtual may have one or two images exported by the iSCSI target. | ||
+ | |||
+ | In many cases, I use a small image for the operating system, then a larger image for the data. The second image for Linux is may be a simple partition, or set up as a Physical Volume for LVM2 during installation. For FreeBSD, it would be ZFS. For Windows, we generally use only one image. However, for larger storage requirements, | ||
+ | |||
+ | ===== The Setup ===== | ||
+ | |||
+ | - Do a basic install with any utilities you might commonly need. My personal choices are in the article [[unix: | ||
+ | - Install hast and carp. See [[unix: | ||
+ | - Create the zfs pool | ||
+ | - Install NFS | ||
+ | - Create a directory tree under /media/nfs | ||
+ | - Populate NFS directory tree | ||
+ | - Install iSCSI | ||
+ | - Create some ZFS volumes to store the images and configure iSCSI to export them | ||
+ | - Start the iSCSI service | ||
+ | |||
+ | ===== Details ===== | ||
+ | |||
+ | ==== Networking ==== | ||
+ | |||
+ | In our case, we will use four network ports. Two will be used set up as a Link Aggregation and used to sync changes to the master server to the slave. We will also use this for the control interface, thus we will have two vlan's on it. The control interface is on vlan 30, and the sync interface on vlan 60. | ||
+ | |||
+ | The other pair will be used strictly for iscsi and nfs communications to the clients. This will be done over vlan 50. | ||
+ | |||
+ | <code bash rc.conf> | ||
+ | # .. there is more code above defining the server | ||
+ | |||
+ | # set up the networks | ||
+ | # bring all NIC's up | ||
+ | ifconfig_bge0=" | ||
+ | ifconfig_bge1=" | ||
+ | ifconfig_bge2=" | ||
+ | ifconfig_bge3=" | ||
+ | |||
+ | # define the lagg' | ||
+ | cloned_interfaces=" | ||
+ | |||
+ | # now, set up the lagg's | ||
+ | ifconfig_lagg0=" | ||
+ | ifconfig_lagg1=" | ||
+ | |||
+ | # define the vlans | ||
+ | vlans_lagg0=" | ||
+ | vlans_lagg1=" | ||
+ | |||
+ | # and set up the vlans | ||
+ | ifconfig_lagg0_50=" | ||
+ | ifconfig_lagg1_60=" | ||
+ | ifconfig_lagg1_30=" | ||
+ | # NOTE: must use SYNCDHCP so dhcp will complete before something modifies | ||
+ | # the network | ||
+ | |||
+ | # set up the shared interface for HAST | ||
+ | ifconfig_lagg0_50_alias=" | ||
+ | </ | ||
+ | |||
+ | ==== NFS ==== | ||
+ | |||
+ | As mentioned earlier, we use nfs to store some files common to all of the virtuals. Thus, we can store Xen configuration files, installer and utility ISO's, etc... via nfs so they are usable by all machines. We can even store FBD (File Backed Devices) here. Basically, anything that does not get a lot of data access. | ||
+ | |||
+ | See [[unix: | ||
+ | |||
+ | ==== Set up iSCSI server ==== | ||
+ | ==== Create iSCSI volumes and export them ==== |
unix/freebsd/system_builds/xenstoragebackend.txt · Last modified: 2019/09/17 01:46 by rodolico