Skip to content. | Skip to navigation

Personal tools

Navigation

You are here: Home / Wiki / Install / Fs-Freebsd.Html

Fs-Freebsd.Html

Installing the Emulab File Server

Installing FreeBSD on fs

In the past we have combined the filesystem function with the operations/users functions. However, we recognize that people may have a pre-existing, dedicated (and usually very expensive) file server machine that they would like to take advantage of. Or for performance reasons, you may want to separate the filesystem service from the user activities on the operations node.

We have made a start toward separating the two. The general guiding principle is to keep modifications to the fileserver box to a minimum, since the ability to control the box may be greatly reduced. For example, the file server might be a NetApp box, or running MacOS X or Windows. At a bare minimum, however, we still require that you be able to manipulate the access control lists (e.g., the BSD "exports" file) from the boss server. Optionally, you may need to be able to monitor and manipulate disk quotas.

But that is all theory right now. In the current state of affairs, the file server machine still has to run FreeBSD and is assumed to be dedicated to Emulab use (e.g., the Emulab boss server assigns uid/gids itself, with no attempt to synchronize with pre-existing uid/gids on the file server).

With that caveat in mind, we can begin.

Note:

Most sites will choose to combine the file and operations server onto one machine (ops). If you have chosen to do this, you can skip this chapter and begin with Installing FreeBSD on Ops.

Before proceeding, ensure that the machine you will use as your fs 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 fs server. When it asks for the desired installation mode, select Standard. Use the standard bootloader unless you have special requirements.

Before partitioning, note that the following directories will need to exist on partitions that have enough space to hold them:

/usr

Needs space for the ports tree and a system object tree. At least 10GB. Be sure to build with plenty of inodes (the ports tree itself uses about 200000, so be safe and build with at least a million).

/usr/testbed

Needs space for testbed software and logs. For a dedicated file server machine, this won't be very much. 200MB should be plenty.

/users

Needs space for user home directories. The amount of space required depends on how many users you expect to have and how much space you are willing to give them. Generally, though, we suggest that users store large files related to their projects in the /proj directory.

/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. Each project should be allowed several GB as a minimum, as files such as disk images can fill up space quickly.

/groups

Needs enough space for files shared by the sub-groups of projects. These are primarily used by classes, if any.

/scratch

Optional, large filesystem of "scratch" space. The intent is that this filesystem provides per-project space that is not "guaranteed" (for the Utah Emulab this means we do not back it up to tape). If used, you would either set no quotas, or higher quotas than for /proj.

/share

Exported read-only to all nodes. We use it for providing to experimenters the source for the FreeBSD and Linux versions we run as well as common packages and RPMs. This could require anything from 1GB to 20GB+ depending on what you want to make available.

You may want to enforce quotas on the user-writable filesystems. This is the main reason you'd want to keep them in separate filesystems (i.e., so people can have different /users and /proj quotas). If you do not think you will ever use quotas, then you could make /users and /proj part of the same filesystem.

As mentioned, /scratch is optional. If you are not providing "guarantees" such as filesaved or RAIDed disk space and you are not using quotas, you might as well just put all of your space in /proj and not define FSDIR_SCRATCH in the definitions file.

Also 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.

Make sure that no matter how you decide to partition things up, you make symbolic links to the appropriate places. For example, if you make one big filesystem called /z that has /users, /proj, and /groups in it, make sure you:

ln -s /z/users /users
ln -s /z/proj /proj
ln -s /z/groups /groups
...

In other words, we assume the existence of /users, proj, and /share (but not /scratch).

When prompted, continue by selecting the 'Developer' distribution set - this will install full sources. When it asks if you want to install the ports collection, answer no. Do not install any packages at this time. You will get a chance to do so later.

Near the end of the installation, you will be asked if you wish to install or configure several optional items. Apart from setting the hostname, configuring your network devices, enabling SSH logins (if desired), and setting your time zone and root password, you should skip additional configuration.

Do not create any user accounts yet, and just log in as root for the time being. Our software will create user accounts later, once you get boss set up correctly. If you already created any users, delete them with the "pw" command and make sure their home directories are removed as well!

This would be a good time to reiterate that Emulab currently assumes that it has complete control of the uid/gid namespace. However, it starts assigning uids at 10000 and gids at 6000, so pre-existing accounts with values lower than those should be ok. Other accounts will have to be removed or manually synchronized with Emulab later.

After exiting the sysinstall tool and rebooting, you should login as root and run freebsd-update to pick up security patches:

freebsd-update fetch
freebsd-update install