kfscmd, ksync – kfs administration

disk/kfscmd [–n name] cmd ...


Kfs is a local user–level file server for a Plan 9 terminal with a disk. Kfscmd transmits commands to the kfs server (see kfs(4)). The –n option changes the name of the kfs service to (by default, full name is just kfs).

Ksync executes the sync command for all active kfs servers.

The known commands are described below. Note that some commands are multiple words and should be quoted to appear as a single argument to rc(1).
allow      Turn permission checking off (to simplify administration).
Turn permission checking on.
noauth     Disable authentication of users.
halt       Write all changed blocks and stop the file system.
start      The opposite of halt; restart the file system.
help       Print the list of commands.
rename file name
Change the name of file to name. Name may be a single path element or a full path; if it is a full path, every element along the path must exist except the last.
newuser user
Add user to /adm/users and make the standard directories needed for booting.
remove fileRemove file and place its blocks on the free list.
clri file    Remove file but do not place the blocks on the free list. This command can be used to remove files that have duplicated blocks. The non–duplicate blocks can be retrieved by checking the file system with option f (see below).
create file owner group mode [adl]
Create the file. Owner and group are users in /adm/users and mode is an octal number. If present, a creates an append only file, d creates a directory, and l creates a file that is exclusive–use.
sync       Write to disk all of the dirty blocks in the memory cache.
atime      Toggle whether atimes are updated as files and directories are accessed. By default, atimes are updated. On laptops it can be useful to turn off atime updates to reduce disk accesses.
stats      Report statistics about the performance of the file system.
user       Re–initialize authentication information by reading /adm/users.
Each time kfs rereads /adm/users, it looks for a group named write. If such a group exists, then the entire file system will appear read–only to users not in the group. If a write group exists but no one is in it, it will be impossible to edit /adm/users to correct the problem. To resolve this, the nowritegroup command turns off write group checking until the next time /adm/users is reread.
cfs filsys    Change the `console' to the named file system (default is the main system).
chat       Toggle tracing of 9P messages.
check [cdfpPqrtw]
Check the file system and print summary information. The options are
c     fix bad tags and clear the contents of the block.
d     delete redundant references to a block, fix bad UTF filenames.
f     rebuild the list of free blocks.
p     print the names of directories as they are checked.
P     print the names of all files as they are checked.
q     quiet mode: report errors, but suppress summary information
r     read all of the data blocks and check the tags.
t     fix bad tags.
w     write all of the blocks that are touched.
listen [address]
Start a listener to serve the network at address, default tcp!*!564. This feature is intended to facilitate small networks of a couple machines in the situation when convenience is more important than performance. This command is only useful on machines with (possibly simulated) NVRAM, which needs to be readable to the kfs processes; see readnvram in authsrv(2). The production file server (see fs(4)) is strongly encouraged for anything more than casual use.
When listening to the network, the default behavior is that the user none may only attach over connections that have already authenticated as someone else. This prevents just anyone from being able to dial your server and attach as none. The noneattach command toggles whether none can attach without such a chaperone.


kfs(4), mkfs(8), prep(8), sd(3)
Copyright © 2023 Alcatel-Lucent. All rights reserved.