.TH KFS 4
.SH NAME
kfs \- disk file system
.SH SYNOPSIS
.B disk/kfs
[
.B -rc
] [
.B -b
.I n
] [
.B -f
.I file
] [
.B -n
.I name
] [
.B -s
]
.SH DESCRIPTION
.I Kfs
is a local user-level file server for a Plan 9 terminal with a disk.
It maintains a hierarchical Plan 9 file system on the disk
and offers
9P (see
.IR intro (5))
access to it.
.B Kfs
begins by
checking the file system for consistency,
rebuilding the free list, and placing a file descriptor in
.BI /srv/ name\f1,
where
.I name
is the service name (default
.IR kfs ).
If the file system is inconsistent,
the user is asked for permission to ream
.RI ( q.v. )
the disk.
The file system is not checked if it is reamed.
.PP
The options are
.TF "n name"
.TP
.BI "b " n
If the file system is reamed, use
.I n
byte blocks.
Larger blocks make the file system faster
and less space efficient.
.B 1024
and
.B 4096
are good choices.
.I N
must be a multiple of 512.
.TP
.B c
Do not check the file system.
.TP
.BI "f " file
Use
.I file
as the disk.
The default is 
.BR /dev/sd0fs .
.TP
.BI "n " name
Use
.RI kfs. name
as the name of the service.
.TP
.B r
Ream the file system, erasing all of the old data
and adding all blocks to the free list.
.TP
.B s
Post file descriptor zero in
.BI /srv/ service
and read and write protocol messages on file descriptor one.
.PD
.SH EXAMPLES
Create a file system with service name
.I kfs.local
and mount it on
.BR /n/kfs .
.IP
.EX
% kfs -rb4096 -nlocal
% mount -c /srv/kfs.local /n/kfs
.EE
.PP
.SH FILES
.TF /dev/sd0fs
.TP
.B /dev/sd0fs
Default file holding blocks.
.SH SOURCE
.B /sys/src/cmd/disk/kfs
.SH "SEE ALSO"
.IR kfscmd (8),
.IR mkfs (8),
.IR prep (8),
.IR wren (3)
