|
|
### Install FreeBSD
|
|
|
## Install FreeBSD
|
|
|
|
|
|
**NOTE:** Before proceeding, ensure that the machine you will use as your ops server is properly connected to your network and that all of the required software is available either through the network or some other media.
|
|
|
|
|
|
Boot the FreeBSD installation CD on the machine you will use as your `ops` server. You will want to do an "Install" and then select your keymap and hostname. When it asks about optional components, only select "lib32" and "src", you do not want "ports" since you will be loading pre-built packages from Emulab.
|
|
|
|
|
|
Next it will ask you about disk partitioning. There are a variety of ways to partition disk space depending on how many disks the server has and whether you might want to enforce space quotas. For now, just create a single partition in which to install the base system, other partitions will be created as needed later.
|
|
|
Next it will ask you about disk partitioning. There are a variety of ways to partition disk space depending on how many disks the server has and whether you might want to enforce disk space quotas. For now we just create a single partition in which to install the base system; other partitions will be created as needed later.
|
|
|
|
|
|
From the menu choose "Auto (UFS)", and then "Entire Disk", confirm erasing the disk and then choose either MBR or GPT. If your disk is over 2TB and the server BIOS supports UEFI boot, select GPT. Otherwise it is probably easiest to stick with MBR and a "legacy boot" BIOS setting. At this point it will want you to review the partitioning. If you are dedicating the entire disk to the OS, then just select "Finish". If you are using a single disk for everything, then you will need to manually modify the partition layout. Unfortunately, doing this requires you "Delete" the existing "freebsd-ufs" and "freebsd-swap" partitions and "Create" new ones. The "freebsd-ufs" partition should be at least 50GB and should have a mountpoint of "/". The swap partition you can make 16GB or smaller. Once this is done select "Finish".
|
|
|
From the menu choose "Auto (UFS)", and then "Entire Disk", confirm erasing the disk and then choose either MBR or GPT. If your disk is over 2TB and the server BIOS supports UEFI boot, select GPT. Otherwise it is probably easiest to stick with MBR and a "legacy boot" BIOS setting. At this point it will want you to review the partitioning. If you are dedicating the entire disk to the OS, then just select "Finish". If you are using a single disk for everything, then you will need to shrink the FreeBSD partition to leave for Emulab. Unfortunately, doing this requires you "Delete" the existing "freebsd-ufs" and "freebsd-swap" partitions and "Create" new ones. The "freebsd-ufs" partition should be 50-100GB and should have a mountpoint of "/". The swap partition you can make 16GB or smaller. Once you have recreated these partitions select "Finish".
|
|
|
|
|
|
Now it will prompt you to "Commit" the changes. After doing so, it will begin the install.
|
|
|
Near the end of the installation, you will be asked if you wish to install or configure several optional items. Apart from setting the root password, configuring your network devices, configuring DNS, setting your time and time zone, and enabling SSH logins (if desired), you should skip additional configuration.
|
... | ... | @@ -18,20 +18,22 @@ After exiting the sysinstall tool and rebooting, you should login as root and ru |
|
|
freebsd-update fetch
|
|
|
freebsd-update install
|
|
|
```
|
|
|
**NOTE:** When installing FreeBSD 11.3 it will tell you that it has reached end-of-life and
|
|
|
do nothing. This step will be needed when we transition to FreeBSD 12.2.
|
|
|
|
|
|
### Create Emulab Filesystems
|
|
|
## Create Emulab Partitions
|
|
|
|
|
|
Now you need to create the Emulab-required directory hierarchies, which are:
|
|
|
Now you need to create the needed partitions and filesystem for the Emulab-required directory hierarchies listed below. Note that the example sizes in square brackets are for a 1TB single disk.
|
|
|
|
|
|
* **/usr/testbed/** Space for testbed software and logs. 10-50GB should be enough.
|
|
|
* **/usr/testbed/** Space for testbed software and logs, at least 10GB. [50GB]
|
|
|
|
|
|
* **/share/** Exported read-only to all nodes. We use it for providing experimenters with the source for the FreeBSD and Linux versions we run as well as common packages. This could require anything from 1GB to 20GB+ depending on what you want to make available. This directory must exist as a distinct filesystem, but most sites don't use it and you can likely keep it small.
|
|
|
* **/share/** Exported read-only to all nodes. We use it for providing experimenters with the source for the FreeBSD and Linux versions we run as well as common packages. This could require anything from 1GB to 100s of GBs depending on what you want to make available. This directory must exist as a distinct filesystem, but most sites don't use it and you can likely keep it small. [10GB]
|
|
|
|
|
|
* **/users/** Needs space for user home directories. The amount of space required depends on how many users you expect to have. Generally, though, we suggest that users store large files related to their projects in the `/proj` directory. You could make this as little as 10GB.
|
|
|
* **/users/** Needs space for user home directories. The amount of space required depends on how many users you expect to have. Generally, though, we suggest that users store large files related to their projects in the `/proj` directory. This could range from 10GB to 100s of GB. [200GB]
|
|
|
|
|
|
* **/proj/** Needs space for project files. We recommend that this be larger than `/users`, to encourage people to store files here, which aids per-project accountability. The bulk of your remaining space should go here.
|
|
|
* **/proj/** Needs space for project files. We recommend that this be larger than `/users`, to encourage people to store files here, which aids per-project accountability. The bulk of your available space should go here. [500GB]
|
|
|
|
|
|
* **/groups/** Needs enough space for files shared by the sub-groups of projects. Subgroups allow for private storage within a project and are primarily used for group projects in classes. Thus not much space, maybe 1GB, is needed unless you plan to support such subgroups.
|
|
|
* **/groups/** Needs enough space for files shared by the sub-groups of projects. Subgroups allow for private storage within a project and are primarily used for group projects in classes. Thus not much space, maybe 1GB, is needed unless you plan to support such subgroups. [100GB]
|
|
|
|
|
|
Often `/users`, `/proj`, and `/groups` are just subdirectories on the same filesystem. This allows you to avoid decisions about how much space to put where. Just put all remaining space in one filesystem and use it for all three.
|
|
|
|
... | ... | @@ -39,12 +41,16 @@ In fact, the only reasons you might want to make them separate filesystems would |
|
|
|
|
|
Note that since `/share` is exported read-only, FreeBSD requires that it be on a separate filesystem from anything that is exported read-write. So while `/users, /proj` and `/groups` can be on the same filesystem, `/share` cannot.
|
|
|
|
|
|
#### Using UFS
|
|
|
### Using UFS
|
|
|
|
|
|
The traditional UFS filesystem is best used with a single redundant underlying volume, either
|
|
|
a hardware RAID provided volume, or a virtual disk provided by the VM host. While you can use `gvinum` or `graid` to implement RAID or interact with a software RAID controller, it is recommended that you use ZFS instead (below) if you need to build a multi-disk redundant configuration.
|
|
|
|
|
|
Here is an example of configuring separate partitions and filesystems for `/usr/testbed`, `/share`, and a `/z` for the remaining directory hierarchies:
|
|
|
Here are two examples of configuring partitions and filesystems for a system with a large single disk, or with a second disk dedicated to Emulab bits.
|
|
|
|
|
|
#### Single Disk
|
|
|
|
|
|
This example creates separate filesystems for `/usr/testbed` and `/share`, and a `/z` filesystem for the remaining directory hierarchies. It assumes you have modified the FreeBSD install and swap partitions during installation to leave space for these filesystems.
|
|
|
```
|
|
|
# 50G for /usr/testbed
|
|
|
gpart add -t freebsd-ufs -s 50G ada0s1
|
... | ... | @@ -77,7 +83,13 @@ ln -s /z/groups /groups |
|
|
```
|
|
|
If you wanted distinct filesystems for each of `/users`, `/proj`, and `/groups`, then instead of the commands to create `/z`, you would have analogous commands for those three filesystems. You would obviously not need to create the symlinks as shown in the last command group.
|
|
|
|
|
|
#### Using ZFS
|
|
|
#### Second Disk
|
|
|
|
|
|
If you have a second disk (/dev/ada1) available for just Emulab, then the process is similar, but the disk first has to be prepared. We use GPT partitioning in this case to avoid the need for extended-DOS or FreeBSD partition tables inside of MBR tables (MBR supports only four primary partitions).
|
|
|
```
|
|
|
gpart create -s GPT /dev/ada1
|
|
|
```
|
|
|
### Using ZFS
|
|
|
|
|
|
TBD.
|
|
|
|
... | ... | |