/etc/fstab
conversion
The native mechanism for this system is the service bundle.
Mounting and unmounting filesystems is done with service bundles, as is checking those file systems.
A fully native system doesn't need /etc/fstab
at all, and service bundles to mount and check filesystems can be arranged however and whereever one likes.
(Although it is good practice to stick with the local-fs
target convention.)
Most systems will not be fully native.
On such systems, /etc/fstab
will have the same status as the BSD /etc/master.passwd
and /etc/termcap
files:
They aren't the actual files that are read in order to operate the system.
Rather, they are "source" files that have to be "compiled" (with pwd_mkdb
and cap_mkdb
respectively) into the file databases that the system really uses.
This compilation is not done on the fly, but only needs to be done every time that the source file is actually changed.
Likewise, /etc/fstab
undergoes a "compile" step that only has to happen every time that the file is changed.
The "compiler" tool is the convert-fstab-services
command.
It is used to generate a suite of service bundles from the contents of /etc/fstab
.
It generates:
a mount@
bundle to mount and unmount each listed filesystem;
if /etc/fstab
specifies, a fsck@
bundle to check each filesystem ahead of mounting it;
on the BSDs only, a dump@
bundle to turn crash dumping on and off for each dump device;
for *.bde
devices, a gbde@
bundle to handle GEOM-Based Disc Encryption for that device;
for *.eli
devices, a geli@
bundle to handle GEOM-ELI for that device;
a swap@
bundle to turn swap on and off for each swap device.