KFS(3)                                                     KFS(3)

     NAME
          kfs - disk file system

     SYNOPSIS
          bind -b '#Kcons' /dev

          /dev/kfscons
          /dev/kfsctl

          bind '#Kfsname' dir

     DESCRIPTION
          Kfs implements a hierarchical Inferno file system within an
          existing file, including disk partitions or flash memory.
          It uses the same file system format as the kfs command of
          Plan 9.  The kfsctl file accepts two requests:

          ream fsname file
               Create the file system fsname by writing an empty file
               system image to file. The amount of available space in
               the file system is limited by the size of file.

          filsys fsname file [option ...]
               Access an existing file system image residing in file
               and make its contents available as file system fsname.
               The valid options are: ro, which makes the file system
               readonly, and flash, which suppresses updates to file
               and directory access times to reduce the number of
               writes to flash.

          The file kfscons accepts `console' commands to control kfs's
          operation; see kfscmd(8).

     EXAMPLES
          Create an empty file system named fs in the file kfs.file.
          Because the file system will be no larger than the existing
          file's size, and the file is assumed not to be a device
          file, use zeros(1) to prepare a file with 2048 blocks of
          1024 bytes each:

               zeros 1024 2048 >kfs.file
               echo ream fs kfs.file > '#Kcons/kfsctl'

          Once a file system image has been created by ream, subse-
          quent initialisation requests should use filsys:

               echo filsys fs kfs.file >'#Kcons/kfsctl'

          In either case, the new filesystem can be bound into the
          namespace with bind(1):

     Page 1                       Plan 9             (printed 4/25/24)

     KFS(3)                                                     KFS(3)

               bind -c '#Kfs’ /n/local

          The contents of the file system can be provided by using
          commands such as mkdir(1), cp(1) and rm(1) in /n/local, or
          built from a description using mkfs(8).

          The file system must be shut down cleanly using halt:

               echo cfs fs >'#Kcons/kfscons'
               echo halt >'#Kcons/kfscons'

     SEE ALSO
          zeros(1), dd(1), kfscmd(8), mkfs(8)

     BUGS
          It would probably be better to implement it in Limbo.

     Page 2                       Plan 9             (printed 4/25/24)