 |
|
| |
APPJAIL-FSTAB(1) |
FreeBSD General Commands Manual |
APPJAIL-FSTAB(1) |
appjail-fstab —
Static information about the file systems of a
jail
appjail fstab |
[all
[-e ]|jail
jail] compile |
appjail fstab |
[all
[-e ]|jail
jail] get
[-eHIpt ] -n
nro [keyword ...] |
appjail fstab |
[all
[-e ]|jail
jail] [list ]
[-eHIpt ] [-n
nro] [keyword ...] |
appjail fstab |
[all
[-e ]|jail
jail] mounted |
appjail fstab |
[all
[-e ]|jail
jail] mount
[args ...] |
appjail fstab |
[all
[-e ]|jail
jail] remove
[all |nro
nro] |
appjail fstab |
[all
[-e ]|jail
jail] set
-d device
-m mountpoint
[-E |-e ]
[-p ] [-D
dump] [-N
name] [-n
[auto |nro]]
[-o options]
[-P pass]
[-t type] |
appjail fstab |
[all
[-e ]|jail
jail] umount
args ... |
The appjail fstab utility adds, removes, mounts,
and lists
fstab(5)
entries. This is all done from the command-line rather than from an
fstab(5)
file, such an interface is advantageous for automation.
appjail-makejail's
MOUNT
instruction uses this command, for example.
Other advantages are that appjail fstab can make
changes to device or mountpoint
or treat them with special meaning; the pseudo-filesystems described in
PSEUDO-FILESYSTEMS are an
example. An example of special treatment is that this command allows you to
use spaces in device and
mountpoint, which in most cases is not necessary.
This command relies on
appjail-start(1)
and the template that the jail uses.
appjail-start(1)
is in charge of calling appjail fstab
compile to get an
fstab(5)
file and set mount.fstab to point to that file, but this
is not accomplished when the template has mount.fstab set.
This design allows the user to use whatever they prefer.
Use all to run a command on all jails or
jail to run a command on a single jail. If the
-e parameter of all is
specified, this command exits when an error is detected.
When no command is specified, the default is
list , but of course you must use it explicitly if
you want to use any of its arguments.
The options are as follows:
compile
- Create an internal fstab(5) file with the entries that are enabled.
Depending on type, this subcommand
performs some other tasks while compiling
fstab(5)
entries, but when the file system has no special meaning, it creates a
directory when mountpoint does not exist.
get
[-eHIpt ] -n
nro [keyword ...]
- Get information about an entry, that is, the keyword
that represent the information to be obtained. Multiple keywords can be
specified, which are displayed as a table-like interface in the order in
which they are specified. If no
keyword is specified, the defaults
are nro, enabled,
name, device,
mountpoint, type,
options, dump
and pass.
See KEYWORDS for a list of
available keywords.
-e
- Not required when using
-p . The
\t character is used to delimit columns, so as not
to show strange values, this option shows
<TAB>
instead of \t in the case that a value contains the
latter.
-H
- Shows the name of the columns.
-I
- Include empty values. By default, a minus sign is displayed when a
value is empty.
-p
- Columnate the list.
-t
- Tabulate columns and values.
list
[-eHIpt ] [-n
nro] [keyword ...]
- Similar
to
get but shows
each keyword for each entry
in a nice table.
-e ,
-H , -I ,
-p , -t
- All of
these options perform the opposite task of the options described
in
get .
-n
nro
- Only show
information for nro.
mounted
- Shows the mounted file systems, except those that are ZFS.
It use a right arrow to indicate that
device was mounted on
mountpoint and a left arrow to indicate that
mountpoint was mounted on
device.
mount
[args ...]
- Wrapper for
mount(8)
with the
-F parameter set to the internal
fstab(5)
file.
mount(8)
is run from the host but the working directory is set to the jail
directory.
remove
[all |nro
nro]
- Remove a given entry.
all
- Remove all entries.
nro
nro
- Remove the entry specified by nro.
set
-d device
-m mountpoint
[-E |-e ]
[-p ] [-D
dump] [-N
name] [-n
[auto |nro]]
[-o options]
[-P pass]
[-t type]
- Configure a new or existing entry.
-d
device
- Special device or remote file system to be mounted.
If you are configuring an entry that already has this
value, it becomes optional, so you can ignore it if you wish.
Depending on type, this may have a
special meaning. See
PSEUDO-FILESYSTEMS.
-m
mountpoint
- Mount point for the file system.
If you are configuring an entry that already has this
value, it becomes optional, so you can ignore it if you wish.
Depending on type, this may have a
special meaning. See
PSEUDO-FILESYSTEMS.
- [
-E |-e ]
- Enable (
-E ) or disable
(-e ) this entry.
-p
- Deprecated. Currently this is a no-op parameter.
-D
dump
- Used for these file systems by the
dump(8)
command to determine which file systems need to be dumped. The default
is 0.
-N
name
- Entry description.
-n
[auto |nro]
- Identifier. An identifier is composed of a positive number. Use
auto (default) to get the lowest identifier
value.
-o
options
- Mount options associated with the file system. The default is
rw.
-P
pass
- Used by the
fsck(8)
and
quotacheck(8)
programs to determine the order in which file system and quota checks
are done at reboot time. The default is 0.
-t
type
- Type of file system. The default is nullfs.
See
PSEUDO-FILESYSTEMS.
umount
args ...
- Wrapper for
umount(8)
with the
-F parameter set to the internal
fstab(5)
file.
umount(8)
is run from the host but the working directory is set to the jail
directory.
- enabled
- Shows 1 if the
entry is enabled, 0 if it is not.
- nro
- Identifier.
- name
- Entry description.
- device
- Special device or remote file system to be mounted.
- mountpoint
- Mount point for the file system.
- type
- Type of file system.
- options
- Mount options associated with the file system.
- dump
- Used for these file systems by the
dump(8)
command to determine which file systems need to be dumped.
- pass
- Used by the
fsck(8)
and
quotacheck(8)
programs to determine the order in which file system and quota checks are
done at reboot time.
A pseudo-filesystem, at least in AppJail, is a file system that
does not exist on your system, but performs a specific task. Except for
nullfs(5),
the following are considered pseudo-filesystems.
- nullfs
- As mentioned,
nullfs(5)
is not a pseudo-filesystem since it exists on your system and can be used
via
mount_nullfs(5),
but it treats device and
mountpoint with special
meaning.
If device is a file, an empty file is
created and mountpoint is used as the pathname.
The same thing happens when device is a directory,
but a directory is created instead of a file. An error occurs when
mountpoint exists but is not the same file type as
device.
An error occurs when device does not
exist.
- <pseudofs>
- <pseudofs>
is a pseudo-filesystem that moves files from
mountpoint to device before
mounting device on mountpoint
using
nullfs(5).
The goal is to create the illusion that two directories overlap like
unionfs(5)
does, but we are actually manipulating a single file or directory.
The reason to use this pseudo-filesystem is when we need to
mount a file or directory from the host to the jail, but the file or
directory inside the jail has content, so if we simply use
nullfs, the lower layer will “disappear”
when the upper layer is mounted.
Before this pseudo-filesystem does its job, it also does what
nullfs describes.
- <volumefs>
- <volumefs>
is a pseudo-filesystem that does what <pseudofs>
or nullfs do, plus it can change the
owner,
group
and file mode
of a file or directory. The user creates a volume
using
appjail-volume(1),
sets the file system type to <volumefs>
and sets the mountpoint to the volume name;
appjail fstab will use the volume name to get the
necessary properties such as
uid,
gid,
file mode and
mountpoint.
The purpose of this pseudo-filesystem is to take away the
responsibility of teaching the user what properties a mountpoint should
have, since applications inside a jail may have different requirements,
it is not feasible for the user to do this job. The developer of a
Makejail, commonly through an image, specifies which volumes the
Makejail should use and the user only needs to know which volume names
they should use.
- nullfs:reverse,
<pseudofs>:reverse
- Using the
:reverse
prefix for nullfs and <pseudofs>
file systems, device is
mountpoint and mountpoint is
device.
The appjail fstab utility exits 0
on success, and >0 if an error occurs.
Visit the GSP FreeBSD Man Page Interface. Output converted with ManDoc.
|