check that link() doesn't cause statinfo to be corrupted/reverted for
[arla.git] / appl / fs / fs.1
blob0ac6af095f02e8cb19b6698c5056e3f761a4871b
1 .\" Copyright (c) 2000 - 2005 Kungliga Tekniska Högskolan
2 .\" (Royal Institute of Technology, Stockholm, Sweden).
3 .\" All rights reserved.
4 .\" 
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\" 
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\"    notice, this list of conditions and the following disclaimer.
11 .\" 
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\"    notice, this list of conditions and the following disclaimer in the
14 .\"    documentation and/or other materials provided with the distribution.
15 .\" 
16 .\" 3. Neither the name of the Institute nor the names of its contributors
17 .\"    may be used to endorse or promote products derived from this software
18 .\"    without specific prior written permission.
19 .\" 
20 .\" THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" SUCH DAMAGE.
31 .\"
32 .\"     $Id$
33 .\"
34 .Dd April 13, 2005
35 .Dt FS 1
36 .Os "The Arla Project"
37 .Sh NAME
38 .Nm fs
39 .Nd Manage AFS directories
40 .Sh SYNOPSIS
41 .Nm
42 .Op Ar command
43 .Op Ar args
44 .Sh DESCRIPTION
45 The
46 .Nm
47 utility is used to manipulate the AFS filesystem.
48 Note that the
49 .Nm
50 utility does
51 .Em not
52 modify the traditional
53 .Ux
54 filesystem, only files in AFS.
55 .Pp
56 The
57 .Nm
58 utility provides several commands:
59 .Pp
60 .Bl -tag -width setmaxpriority -compact
61 .It Cm apropos
62 locate commands by keyword
63 .It Cm arladebug
64 tweek arla-debugging flags
65 .It Cm checkservers
66 check if servers are up
67 .It Cm checkvolumes
68 check that all volume mapping are correct
69 .It Cm cleanacl
70 not yet implemented
71 .It Cm copyacl
72 not yet implemented
73 .It Cm diskfree
74 show free partition space
75 .It Cm examine
76 examine volume status
77 .It Cm flush
78 remove file from cache
79 .It Cm flushvolume
80 remove volumedata (and files in volume) from cache
81 .It Cm gcpags
82 garbage collect pags
83 .It Cm getcacheparms
84 get cache usage
85 .It Cm getcalleraccess
86 get current user's access permisssions
87 .It Cm gca
88 shorthand for the
89 .Cm getcalleraccess
90 command
91 .It Cm getcrypt
92 get encrypt status
93 .It Cm getcellstatus
94 get suid cell status
95 .It Cm getfid
96 get fid
97 .It Cm getserverprefs
98 not yet implemented
99 .It Cm getstatistics
100 get statistics from the cache manager
101 .It Cm getpriority
102 get priority of a file/dir
103 .It Cm gp
104 shorthand for the
105 .Cm getpriority
106 command
107 .It Cm getmaxpriority
108 get max priority for a file gc
109 .It Cm gmp
110 shorthand for the
111 .Cm getmaxpriority
112 command
113 .It Cm help
114 get help for
116 .It Cm incompat
117 report interface of the pioctl interface
118 .It Cm listacl
119 show acl
120 .It Cm la
121 shorthand for the
122 .Cm listacl
123 command
124 .It Cm listcells
125 list cells that the cache handler can communicate with
126 .It Cm listquota
127 show volume quota
128 .It Cm lq
129 shorthand for the
130 .Cm listquota
131 command
132 .It Cm quota
133 shorthand for the
134 .Cm listquota
135 command
136 .It Cm lsmount
137 show a mount point
138 .It Cm messages
139 not yet implemented
140 .It Cm mkmount
141 create mount point
142 .It Cm mkm
143 shorthand for the
144 .Cm mkmount
145 command
146 .It Cm connect
147 connect mode
148 .It Cm monitor
149 set remote logging host
150 .It Cm newcell
151 add new cell
152 .It Cm nop
153 do a pioctl-nop
154 .It Cm quit
155 leave interactive mode
156 .It Cm exit
157 leave interactive mode
158 .It Cm rmmount
159 delete a mount point
160 .It Cm removepriority
161 remove priority from file/directory
162 .It Cm rmp
163 shorthand for the
164 .Cm removepriority
165 command
166 .It Cm setacl
167 add an acl entry on a directory
168 .It Cm sa
169 shorthand for the
170 .Cm setacl
171 command
172 .It Cm setcachesize
173 change disk cache size
174 .It Cm setcell
175 change cell status
176 .It Cm setpriority
177 set priority of a file/directory
178 .It Cm sp
179 shorthand for the
180 .Cm setpriority
181 command
182 .It Cm setmaxpriority
183 set upper limit of prio gc
184 .It Cm smq
185 shorthand for the
186 .Cm setmaxpriority
187 command
188 .It Cm setquota
189 change quota on a volume
190 .It Cm sq
191 shorthand for the
192 .Cm setquota
193 command
194 .It Cm setserverprefs
195 not yet implemented
196 .It Cm setcrypt
197 set encryption on/off
198 .It Cm setvol
199 not yet implemented
200 .It Cm suidcells
201 list status of cells
202 .It Cm sysname
203 read/change sysname
204 .It Cm version
205 get version of fs and fs_lib
206 .It Cm venuslog
207 make arlad print status
208 .It Cm whereis
209 show server(s) of file
210 .It Cm whichcell
211 show cell of file
212 .It Cm wscell
213 display cell of workstation
214 .It Cm nnpfsdebug
215 tweek nnpfs-debugging flags
216 .It Cm nnpfsprint
217 make nnpfs print debug info
220 .Bd -filled -offset indent -compact
222 The syntax of the
224 commands:
226 .Ic fs apropos
227 .Bd -filled -offset indent -compact
228 Locate commands by keyword
231 .Ic fs arladebug
232 .Op Ar flags
233 .Bd -filled -offset indent -compact
234 Tweek arla-debugging flags.
237 .Ic fs checkservers
238 .Op Fl cell Ar cellname
239 .Op Fl nopoll
240 .Bd -filled -offset indent -compact
241 Check if the servers in a cell are available.
243 .Fl nopoll
244 is specified, the servers are not contactad; only internal information is
245 printed.
248 .Ic fs checkvolumes
249 .Bd -filled -offset indent -compact
250 Check that all volume mapping are correct and flush all mountpoints
251 from the cache to force them to be reread.
254 .Ic fs cleanacl
255 .Bd -filled -offset indent -compact
256 Not yet implemented.
259 .Ic fs copyacl
260 .Bd -filled -offset indent -compact
261 Not yet implemented.
264 .Ic fs diskfree
265 .Ar path
266 .Bd -filled -offset indent -compact
267 Show free space on the partition where the file or directory
268 .Ar path
269 is stored
272 .Ic fs examine
273 .Op Ar path
274 .Bd -filled -offset indent -compact
275 Print detailed information about the volume mounted on the specified
276 .Ar path
277 or the current directory.
280 .Ic fs flush
281 .Ar file
282 .Bd -filled -offset indent -compact
283 Flush
284 .Ar file
285 from the cache, causing it to be stored on the fileserver.
288 .Ic fs flushvolume
289 .Ar file
290 .Bd -filled -offset indent -compact
291 Flush all the files in the volume where the
292 .Ar file
293 is stored, causing them to be stored on the fileserver.
294 Meta information about the volume is also flushed.
297 .Ic fs gcpags
298 .Bd -filled -offset indent -compact
299 Remove unused PAGs from the kernel.
302 .Ic fs getcacheparms
303 .Bd -filled -offset indent -compact
304 Print information about cache usage.
307 .Ic fs getcalleraccess
308 .Op Ar path
309 .Bd -filled -offset indent -compact
310 Show current user's permissions for the specified
311 .Ar path
312 or the current directory.
315 .Ic fs gca
316 .Op Ar path
317 .Bd -filled -offset indent -compact
318 Shorthand for the
319 .Cm getcalleraccess
320 command.
323 .Ic fs getcrypt
324 .Bd -filled -offset indent -compact
325 Display whether traffic between the client and server is encrypted.
328 .Ic fs getcellstatus
329 .Ar cellname
330 .Bd -filled -offset indent -compact
331 Indicate if the setuid bit on executable files are honored for
332 the specified cell.
335 .Ic fs getfid
336 .Ar path
337 .Bd -filled -offset indent -compact
338 Print fid information for a file.
341 .Ic fs getserverprefs
342 .Bd -filled -offset indent -compact
343 Not yet implemented.
346 .Ic fs getstatistics
347 .Bd -filled -offset indent -compact
348 Get statistics from the cache manager.  Possible type to get statistics
349 for are fetchstatus, fetchdata, storestatus, storedata, bulkstatus.
352 .Ic fs getpriority
353 .Bd -filled -offset indent -compact
354 Display priority of a file or directory.
357 .Ic fs gp
358 .Bd -filled -offset indent -compact
359 Shorthand for the
360 .Cm getpriority
361 command
364 .Ic fs getmaxpriority
365 .Bd -filled -offset indent -compact
366 Display max priority for a file.
369 .Ic fs gmp
370 .Bd -filled -offset indent -compact
371 Shorthand for the
372 .Cm getmaxpriority
373 command.
376 .Ic fs help
377 .Bd -filled -offset indent -compact
378 Get help for
382 .Ic fs incompat
383 .Bd -filled -offset indent -compact
384 Returns what interface of the pioctl interface currently is in use.
387 .Ic fs listacl
388 .Op Ar path
389 .Bd -filled -offset indent -compact
390 Show acl for the specified
391 .Ar path
392 or the current directory.
395 .Ic fs la
396 .Op Ar path
397 .Bd -filled -offset indent -compact
398 Shorthand for the
399 .Cm listacl
400 command.
403 .Ic fs listcells
404 .Bd -filled -offset indent -compact
405 List cells that the cache handler can communicate with.
406 These are the cells listed in the file
407 .Pa CellServDB .
410 .Ic fs listquota
411 .Op Ar path
412 .Bd -filled -offset indent -compact
413 Show the quota for the volume of the specified
414 .Ar path
415 or the current directory.
418 .Ic fs lq
419 .Op Ar path
420 .Bd -filled -offset indent -compact
421 Shorthand for the
422 .Cm listquota
423 command.
426 .Ic fs quota
427 .Bd -filled -offset indent -compact
428 Shorthand for the
429 .Ic listquota
430 command.
433 .Ic fs lsmount
434 .Ar path
435 .Bd -filled -offset indent -compact
436 Show a mount point.
439 .Ic fs messages
440 .Bd -filled -offset indent -compact
441 Not yet implemented.
444 .Ic fs mkmount
445 .Ar directory
446 .Ar volume
447 .Op Fl cell Ar cell
448 .Op Fl rw
449 .Bd -filled -offset indent -compact
450 Create a mountpoint pointing to
451 .Ar volume
452 in optional
453 .Ar cell .
455 .Fl rw
456 is given, a mountpoint to the readwrite volume is created.
458 Note that there must not exist a directory named like
459 the mount point you are creating.
462 .Ic fs connect
463 .Op Ar mode
464 .Bd -filled -offset indent -compact
465 Set or get connected mode, if a
466 .Ar mode
467 is specified, the cache manager will be set to that mode.
468 If not, the current mode will be printed.
470 Valid modes are:
471 .Bl -tag -width -Fl -compact
472 .It Cm connected
473 Connected mode - this is the normal operating mode.
474 .It Cm fetch
475 Fetch only mode - files are retrieved from fileserver but are not stored back.
476 .It Cm disconnected
477 Disconnected mode - files are read and written from/to the cache, and no
478 attempt is made to contact a fileserver-
481 Disconnected mode is very useful for machines that are not connected to
482 the network at all times, such as laptops.
483 Disconnected mode is to be considered very experimental at this stage.
486 .Ic fs monitor
487 .Bd -filled -offset indent -compact
488 Not yet implemented.
491 .Ic fs newcell
492 .Fl cell Ar cellname
493 .Fl servers Ar vldb-servers
494 .Op Fl help
495 .Bd -filled -offset indent -compact
496 Add a new cell to the running configuration of the cache manager, or update
497 already existing information.
498 This information should also be entered in the file
499 .Pa /usr/arla/etc/CellServDB .
502 .Ic fs nop
503 .Bd -filled -offset indent -compact
504 Do a pioctl-nop.
505 This is useful for debugging.
508 .Ic fs quit
509 .Bd -filled -offset indent -compact
510 Leave interactive mode.
513 .Ic fs exit
514 .Bd -filled -offset indent -compact
515 Leave interactive mode.
518 .Ic fs rmmount
519 .Ar mountpoint
520 .Bd -filled -offset indent -compact
521 Delete
522 .Ar mountpoint .
525 .Ic fs removepriority
526 .Ar path
527 .Bd -filled -offset indent -compact
528 Remove priority from file or directory
529 .Ar path .
532 .Ic fs rmp
533 .Bd -filled -offset indent -compact
534 Shorthand for the
535 .Cm removepriority
536 command.
539 .Ic fs setacl
540 .Ar directory
541 .Ar permissions
542 .Bd -filled -offset indent -compact
543 Add an acl entry on a directory.
544 Each entry consists of two components:
545 a user or group and a character string describing the permissions granted
546 for that user or group.
547 These characters and the permission they represent are:
548 .Bl -tag -width Fl -compact
549 .It Cm r
550 read the files
551 .It Cm l
552 list the files
553 .It Cm i
554 insert new files
555 .It Cm d
556 delete files
557 .It Cm w
558 write (change) the files
559 .It Cm k
560 lock files
561 .It Cm a
562 administer the acl, that is, to change the acl
565 There are also a few convinience strings recognized by
566 .Ic fs setacl :
567 .Bl -tag -width Fl -compact
568 .It Cm none
569 removes all permissions.
570 .It Cm read
571 adds 'rl' permissions, which are suitable for a read-only directory.
572 .It Cm write
573 adds all permissions except 'a', that is, the user/group can read, write,
574 delete etc. but not change the acl of the directory.
575 .It Cm all
576 add all permissions.
579 Note that in AFS you set the permissions on a directory, and the permissions
580 of a file are those of their directory.
581 So, if you move a file from one
582 directory to another, you might change the permission of the file, as
583 the two directories may have different permissions.
585 Of the traditional
587 permission bits only the user part is honored, and is used for any
588 user permissioned by the directorys acl.
589 The group and world permission bits are ignored, but they are stored.
592 .Ic fs sa
593 .Ar directory
594 .Ar permissions
595 .Bd -filled -offset indent -compact
596 Shorthand for the
597 .Cm setacl
598 command.
601 .Ic fs setcachesize
602 .Ar lowvnodes
603 .Op Ar highvnodes Ar lowbytes Ar highbytes
604 .Bd -filled -offset indent -compact
605 Set the size of the disk cache.
608 .Ic fs setcell
609 .Bd -filled -offset indent -compact
610 Not yet implemented.
613 .Ic fs setpriority
614 .Ar file
615 .Ar priority
616 .Bd -filled -offset indent -compact
617 Set priority of a file/directory.
620 .Ic fs sp
621 .Bd -filled -offset indent -compact
622 Shorthand for the
623 .Cm setpriority
624 command.
627 .Ic fs setmaxpriority
628 .Ar priority
629 .Bd -filled -offset indent -compact
630 Set upper limit of priority.
633 .Ic fs smq
634 .Bd -filled -offset indent -compact
635 Shorthand for the
636 .Cm setmaxpriority
637 command.
640 .Ic fs setquota
641 .Ar path
642 .Ar quota
643 .Bd -filled -offset indent -compact
644 Set the
645 .Ar quota
646 (in Kbytes) on a volume pointed out by
647 .Ar path .
650 .Ic fs sq
651 .Bd -filled -offset indent -compact
652 Shorthand for the
653 .Cm setquota
654 command.
657 .Ic fs setserverprefs
658 .Bd -filled -offset indent -compact
659 Not yet implemented.
662 .Ic fs setcrypt
663 .Ar yes | no
664 .Bd -filled -offset indent -compact
666 .Ar no
667 is specified, encryption of the traffic to/from fileservers is
668 disabled, and if
669 .Ar yes
670 is specified, it is enabled.
673 .Ic fs setvol
674 .Bd -filled -offset indent -compact
675 Not yet implemented.
678 .Ic fs suidcells
679 .Bd -filled -offset indent -compact
680 Print cells and whether setuid execution is allowed for them.
683 .Ic fs sysname
684 .Op Ar sysname
685 .Bd -filled -offset indent -compact
686 Get or set the value of the '@sys' value.
689 .Ic fs version
690 .Bd -filled -offset indent -compact
691 Print version of fs and fs_lib.
694 .Ic fs venuslog
695 .Bd -filled -offset indent -compact
696 Make arlad print status.
699 .Ic fs whereis
700 .Op Ar path
701 .Bd -filled -offset indent -compact
702 Show server(s) of the specified file or the current directory.
705 .Ic fs whichcell
706 .Op Ar path
707 .Bd -filled -offset indent -compact
708 Show cell of a file or the current directory.
711 .Ic fs wscell
712 .Bd -filled -offset indent -compact
713 Display default cell of the client.
716 .Ic fs nnpfsdebug
717 .Bd -filled -offset indent -compact
718 Tweek nnpfs-debugging flags
721 .Ic fs nnpfsprint
722 .Op Ar flags
723 .Bd -filled -offset indent -compact
724 Make nnpfs print debug info.
726 .Sh SEE ALSO
727 .Xr pts 1 ,
728 .Xr arlad 8 ,
729 .Xr bos 8 ,
730 .Xr vos 8
731 .Sh STANDARDS
732 The Arla authors are trying to mimic the behaviour of the original AFS
733 utilities.
734 .Sh AUTHORS
735 The Arla project <http://www.stacken.kth.se/project/arla/>.
736 .Sh BUGS
737 Some commands are not implemented yet.