Charles.Forsyth20060303-partialeea662d19 years agoHistory
175 lines · 3.4 KB · Text
RawDownload
.TH KFS 4.SH NAMEkfs \- disk file system.SH SYNOPSIS.BI "mount {disk/kfs".RB [ -r[.BI -b " bsize"] ].RB [ -c ].RB [ -A ].RB [ -P ].RB [ -R ].RB [ -W ][.BI -n " name"].IB " file" "} " dir.SH DESCRIPTION.I Kfsimplements a hierarchical Inferno file system within an existing.IR file ,which is typically a disk or flash memory partition.It gives access to it through the Styx protocol on its standard input,and the contents can be mounted directly on a given.I diras shown above.The file system format is the same as that used by the.I kfscommand of Plan 9, except that the modification user ID is implemented..PPThe.B -roption causes the file system to be reset to an initially empty state(`reamed').Permission checking is turned off, to allow any desired permissions andfile ownership to be set.(In other words, the.B -Wand.B -Poptions are also set by default.)The file system block size is set to the.IR bsizegiven by the.B -boption(default: 1024 bytes),which must be a multiple of 512 and not greater than 16k bytes.The block size is stored in the.I fileand need not be given again.The storage representation is always little-endian..PPOtherwise, the file system is checked if required, unless the.B -coption is given..PPThe contents of the file system can be provided by using commandssuch as.IR mkdir (1),.IR cp (1)and.IR rm (1)in.IR dir ,or built from a description using.IR mkfs (8)..PPThe mapping between user names andinternal IDs within the file system is established by the file.BR adm/users(within the file system itself)as described by.IR users (6),which.I kfsreads when it starts.If no such file exists, as for instance when the file system is initially empty,.I kfsuses a minimal set corresponding to the following.IR users (6)file:.IP.EX-1:adm:adm:0:none:adm:9999:noworld::10000:sys::10001:upas:upas:10002:bootes:bootes:10006:inferno::.EE.PPAny.IR users (6)file used with.I kfsshould include entries for at least.BR adm ,.BR none ,and.BR noworldas above (although group membership can vary)..PP.I Kfscan optionally serve a control file, for use by.IR kfscmd (8).If the.B -noption is given,.I kfscreates a channel.BI /chan/kfs. name .cmdand accepts commands on it from the user that started.IR kfs ..PPOther options are:.TP.B -Ado not update access times; useful when running a file system in flash over.IR ftl (3),to avoid excessive wear.TP.B -Psuppress permission checking.TP.B -Rfile system is read only.TP.B -Wallow.B wstat(see.IR sys-stat (2)or.IR stat (5))to make arbitrary changes to user and group fields.SH EXAMPLESCreate an empty file systemin the file.BR kfs.file .Because the file system will be no larger than the existingfile's size, and the file is assumed not to be a device file, use.IR zeros (1)to prepare a file with 2048 blocks of 1024 bytes each:.IP.EXzeros 1024 2048 >kfs.filemount -c {disk/kfs -r kfs.file} /n/local.EE.PPThe.B -coption to.I mountallows files to be created in.BR /n/local ..SH SOURCE.B /appl/cmd/disk/kfs.b.SH SEE ALSO.IR dd (1),.IR zeros (1),.IR flash (3),.IR ftl (3),.IR logfs (3),.IR sd (3),.IR users (6),.IR kfscmd (8),.IR mkfs (8).SH BUGSBecause the file system format is the same as Plan 9's.IR kfs ,this one also does not support file names longer than 27 bytes.It likewise cannot cope with files bigger than 2⁳ⁱ-1 bytes.