... | ... | @@ -120,20 +120,54 @@ ln -s /z/users /users |
|
|
ln -s /z/proj /proj
|
|
|
ln -s /z/groups /groups
|
|
|
```
|
|
|
#### Enabling Quotas
|
|
|
|
|
|
The Emulab software will set and manage user-based disk quotas for UFS filesystems.
|
|
|
To enable quotas, you will need to set some variables in your defs-* configuration file.
|
|
|
### Using ZFS
|
|
|
|
|
|
If you have multiple physical disks available for Emulab storage and they are not combined using hardware RAID, then you can use ZFS to create RAID1, RAID10, RAID5, RAID50, RAID6 or RAID60 style configurations. For example, if you have two extra disks, /dev/ada1 and /dev/ada2, you can create a mirrored zpool with:
|
|
|
```
|
|
|
zpool create -m none z mirror /dev/ada1 /dev/ada2
|
|
|
```
|
|
|
or with four extra disks, /dev/ada[1-4], you could create a RAID5:
|
|
|
```
|
|
|
zpool create -m none z raidz /dev/ada1 /dev/ada2 /dev/ada3 /dev/ada4
|
|
|
```
|
|
|
or a RAID10 striped mirror:
|
|
|
```
|
|
|
zpool create -m none z mirror /dev/ada1 /dev/ada2 mirror /dev/ada3 /dev/ada4
|
|
|
```
|
|
|
|
|
|
Using ZFS permits a number of nice features, Most notably highly reliable, large scale filesystems and the ability to create per-filesystem snapshots. Emulab can leverage ZFS to implement per-user and per-project filesystems. This enables fine grained disk quotas and avoids one of the biggest problems with UFS quotas--the inability to place a quota on the "root" user.
|
|
|
|
|
|
|
|
|
## Updating the Definitions file
|
|
|
|
|
|
If you have combined any of `/users`, `/proj`, or `/groups` into one filesystem, you will need to update your definitions file to reflect that. The `FSDIR_` variables should reflect the actual "real path" to the corresponding directory. For example, if you combined all three on the /z filesystem as in the above examples, you would need to set:
|
|
|
```
|
|
|
FSDIR_GROUPS=/z/groups
|
|
|
FSDIR_PROJ=/z/proj
|
|
|
FSDIR_USERS=/z/users
|
|
|
```
|
|
|
If you have enabled quotas on one or more of those directories and they are [based in UFS](#using-ufs), then you need to set the `FS_WITH_QUOTA` variable to reflect the filesystem(s) that are affected:
|
|
|
```
|
|
|
# If /users, /proj, and /groups are all on one filesystem (/z)
|
|
|
FS_WITH_QUOTA="/z"
|
|
|
|
|
|
# If they are all distinct filesystems
|
|
|
FS_WITH_QUOTA="/users /proj /groups"
|
|
|
```
|
|
|
|
|
|
### Using ZFS
|
|
|
|
|
|
TBD.
|
|
|
If you are using ZFS to manage the filesystems you will need:
|
|
|
```
|
|
|
WITHZFS=1
|
|
|
ZFS_ROOT=z
|
|
|
ZFS_NOEXPORT=1
|
|
|
```
|
|
|
where ZFS_ROOT should be set to the name of the zpool you created in [using ZFS](#using-zfs). If you are enforcing quotas with ZFS, add:
|
|
|
```
|
|
|
ZFS_QUOTA_USER="1G"
|
|
|
ZFS_QUOTA_PROJECT="100G"
|
|
|
ZFS_QUOTA_GROUP="5G"
|
|
|
```
|
|
|
recalling that these limits are not per-user/project/group and not for the entire hierarchy of users, projects, or groups.
|
|
|
|
|
|
* [Prev](install/Creating the Definitions File)
|
|
|
* [Next](install/Installing Emulab on ops)
|
... | ... | |