GEFS(8)GEFS(8)
NAME
gefs – file server maintenance
SYNOPSIS
unhandled troff command .sp
DESCRIPTION
SNAPSHOTS
Snapshots are views of a filesystem hierarchy within a branching timeline. The branch may have a single mutable snapshot which will update the branch when written to. All other snapshots are immutable and frozen in time. Each branch evolves independently of all other branches, and is referred to by the label of its head snapshot. All branches are forked from an empty snapshot.
Any snapshot is mountable by label via mount(1)’s attach spec.
When the attach spec starts with the
There are several attach names that are reserved for the file system’s internal use.
All except
This is the name used to mount a list of all snapshots. Each snapshot in the file system will be listed in a directory.
This is an empty snapshot. It contains no files or directories. All other snapshots are forked off of it.
This is the snapshot where special adminstrative files live.
It contains the
This branch is mounted by default if a mount spec is not provided. It may be deleted, created, and freely modified.
All snapshots are allocated from the same storage pool, and therefore share space.
ADM
Gefs supports independent snapshots in the same file system.
As a result, global configuration needs to be separated from snapshots.
The global configuration resides in a well known snapshot called
The adm snapshot would conventionally be mounted in
The
-1:adm:adm: 0:none:: 1:$user:$user:
Where
The control file, located at
Check filesystem for consistency, sending results to stdout.
Toggle debug output.
Delete a snapshot, reclaiming whatever space is not shared with other snapshots.
Sync all IO to disk and exit the file system.
When the storage is full, it may be impossible to delete snapshots. With an argument of 1, temporarily allow the file system to use a small reserve space to recover from this scenario.
Set a schedule for snapshot retention of the given label.
If the label passed is
The timespec is a sequence of counts and intervals,
in the form of
Two special timespec values are possible.
Specifying
Create a new snap of
Create a new fork from
Write dirty blocks in memory to the disk. The write will not return until all data that was in flight when the sync was issued has been written to disk.
Attempt to reload the user ids from
CONSOLE
The console at
Performs the same checks as the
Sync all IO to disk and exits the file system. While the syncing occurs, the file system does not allow new writes.
Print a summary of the available commands. This table includes additional debug commands that are subject to change, and are intentionally undocumented.
EXAMPLES
To show current disk usage:
grep '^usage' /adm/status
To create a new snapshot:
echo 'snap main myimmutable' > /adm/ctl
To create a new mutable snapshot that does not take automatic checkpoints:
echo 'fork main mymutable' > /adm/ctl echo 'retain mymutable none > /adm/ctl
To delete a snapshot:
echo 'delsnap mysnap' > /adm/ctl
To set the snapshot retention on the main snapshot to 12 snapshots taken every five minutes, along with 48 snapshots taken every 2 hours, and a daily snapshot with no trimming:
echo retain main 12@5m 48@2h @d > /adm/ctl
To set the default snapshot retention to daily, with no minute or hour snapshots:
echo retain - @d > /adm/ctl
To create a new user:
# Mount the adm namespace (as a user in adm group):
# and add the user to the user file
% mount /srv/gefs /adm adm
% sam /adm/users
# Reload the user table. If there are syntax errors
# in the file, they will be shown here and the reload
# will be aborted; fix them and try again.
% echo 'users' > /adm/ctl
# Mount the file system in permissive mode to allow
# changing file ownership, then create the user dir
% mount /srv/gefs /n/u %main
% mkdir /n/u/usr/$newuser
% chgrp -u $newuser /n/u/usr/$newuser
% chgrp $newuser /n/u/usr/$newuser
# Create a tmp dir in the unsnapshotted 'other'
# dataset. If it's present, the default namespace
# will use it.
% mount -c /srv/gefs /n/o %other
% mkdir -p /n/o/usr/$newuser/tmp
% chgrp $newuser /n/o/usr/$newuser^('' /tmp)
% chmod 700 /n/o/usr/$newuser^('' /tmp)
BUGS
Currently, it’s not possible to change the mutability of a snapshot. Instead, a new label needs to be created.