kfs 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. .TH KFS 4
  2. .SH NAME
  3. kfs \- disk file system
  4. .SH SYNOPSIS
  5. .B disk/kfs
  6. [
  7. .B -rc
  8. ] [
  9. .B -b
  10. .I n
  11. ] [
  12. .B -f
  13. .I file
  14. ] [
  15. .B -n
  16. .I name
  17. ] [
  18. .B -p
  19. .I perm
  20. ] [
  21. .B -s
  22. ] [
  23. .B -B
  24. .I nbuf
  25. ]
  26. .SH DESCRIPTION
  27. .I Kfs
  28. is an old, local user-level file server for a Plan 9 terminal with a disk.
  29. It maintains a hierarchical Plan 9 file system on the disk
  30. and offers
  31. 9P (see
  32. .IR intro (5))
  33. access to it.
  34. .I Kfs
  35. begins by
  36. checking the file system for consistency,
  37. rebuilding the free list, and placing a file descriptor in
  38. .BI /srv/ name\f1,
  39. where
  40. .I name
  41. is the service name (default
  42. .BR kfs ).
  43. If the file system is inconsistent,
  44. the user is asked for permission to ream
  45. .RI ( q.v. )
  46. the disk.
  47. The file system is not checked if it is reamed.
  48. .PP
  49. The options are
  50. .TF "n name"
  51. .TP
  52. .BI "b " n
  53. If the file system is reamed, use
  54. .I n
  55. byte blocks.
  56. Larger blocks make the file system faster
  57. and less space efficient.
  58. .B 1024
  59. and
  60. .B 4096
  61. are good choices.
  62. .I N
  63. must be a multiple of 512.
  64. .TP
  65. .B c
  66. Do not check the file system.
  67. .TP
  68. .BI "f " file
  69. Use
  70. .I file
  71. as the disk.
  72. The default is
  73. .BR /dev/sdC0/fs .
  74. .TP
  75. .BI "n " name
  76. Use
  77. .RI kfs. name
  78. as the name of the service.
  79. .TP
  80. .BI "p " perm
  81. Use
  82. .I perm
  83. as the initial permissions for the
  84. command channel
  85. .BI /srv/ service .cmd\fR;
  86. the default is 660.
  87. .TP
  88. .B r
  89. Ream the file system, erasing all of the old data
  90. and adding all blocks to the free list.
  91. .TP
  92. .B s
  93. Post file descriptor zero in
  94. .BI /srv/ service
  95. and read and write protocol messages on file descriptor one.
  96. .TP
  97. .B B
  98. Allocate
  99. .I nbuf
  100. in-memory file system blocks.
  101. The default is as many as will fit in 10% of memory
  102. or two megabytes, whichever is smaller.
  103. .PD
  104. .SH EXAMPLES
  105. Create a file system with service name
  106. .I kfs.local
  107. and mount it on
  108. .BR /n/kfs .
  109. .IP
  110. .EX
  111. % disk/kfs -rb4096 -nlocal
  112. % mount -c /srv/kfs.local /n/kfs
  113. .EE
  114. .PP
  115. .SH FILES
  116. .TF /dev/sdC0/fs
  117. .TP
  118. .B /dev/sdC0/fs
  119. Default file holding blocks.
  120. .SH SOURCE
  121. .B /sys/src/cmd/disk/kfs
  122. .SH "SEE ALSO"
  123. .IR fossil (4),
  124. .IR kfscmd (8),
  125. .IR mkfs (8),
  126. .IR prep (8),
  127. .IR sd (3)
  128. .SH BUGS
  129. For the moment,
  130. .I kfs
  131. serves both the old (third edition) and new (fourth
  132. edition) versions of 9P, deciding which to serve by sniffing the first packet on each
  133. connection.
  134. .LP
  135. .I Kfs
  136. doesn't allow creating files with component names longer than 28 bytes.