.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "VOLSCAN 8" .TH VOLSCAN 8 2024-03-20 OpenAFS "AFS Command Reference" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME volscan \- Produces detailed information about AFS volumes .SH SYNOPSIS .IX Header "SYNOPSIS" \&\fBvolscan\fR [\fB\-checkout\fR] [\fB\-partition\fR\ <\fIAFS\ partition\ name\ or\ id\fR>] [\fB\-volumeid\fR\ <\fIVolume\ id\fR>] [\fB\-type\fR\ <\fIVolume\ types\ (rw,\ ro,\ bk)\fR>+] [\fB\-find\fR\ <\fIObjects\ to\ find\ (file,\ dir,\ mount,\ symlink,\ acl)\fR>+] [\fB\-output\fR\ <\fIColumn\fR>+] [\fB\-delim\fR\ <\fIOutput\ field\ delimiter\fR>] [\fB\-noheading\fR] [\fB\-ignore\-magic\fR] [\fB\-help\fR] .SH DESCRIPTION .IX Header "DESCRIPTION" The \fBvolscan\fR command displays volume meta-data stored on AFS file servers. The output is intended for debugging purposes and is meaningful to someone familiar with the internal structure of AFS volumes. The \fBvolscan\fR command must be issued directly on a file server machine as the root superuser. The \fBvolscan\fR command does not modify volume information. .PP The \fBvolscan\fR command will produce output for all the volumes on the file server by default. To display output for the volumes in one partition only, include the \fB\-partition\fR argument. To display output for one volume only, include the \fB\-partition\fR and \fB\-volumeid\fR arguments. .PP The \fBvolscan\fR command will produce output for read-write, read-only, and backup volumes by default. To limit the output to particular types of volumes, include the \fB\-type\fR argument with one or more volume types (\f(CW\*(C`rw\*(C'\fR, \f(CW\*(C`ro\*(C'\fR, \&\f(CW\*(C`bk\*(C'\fR). .PP The \fBvolscan\fR command will produce output for each type of vnode object found in the volumes scanned. The command will output information for files, directories, AFS mount points, and symbolic links by default. The \fBvolscan\fR command can output access control lists (ACLs) for directory vnode objects scanned. To limit the output to particular types of vnode objects, or to output access control lists (ACLs), include the \fB\-find\fR argument with one or more object types (\f(CW\*(C`file\*(C'\fR, \f(CW\*(C`dir\*(C'\fR, \f(CW\*(C`mount\*(C'\fR, \f(CW\*(C`symlink\*(C'\fR, \f(CW\*(C`acl\*(C'\fR). .PP The output of the \fBvolscan\fR command is tabular. The output consists of an optional heading line, followed by zero or more lines of delimiter separated values. By default, the output values are the file server hostname (\f(CW\*(C`host\*(C'\fR), the object type (\f(CW\*(C`desc\*(C'\fR), the vnode FID (\f(CW\*(C`fid\*(C'\fR), the vnode data version (\f(CW\*(C`dv\*(C'\fR), and the directory path (\f(CW\*(C`path\*(C'\fR). The directory path is relative to the root directory of the volume. When \f(CW\*(C`acl\*(C'\fR is included as an argument to \&\f(CW\*(C`\-find\*(C'\fR, the default output values also include the user/group id (\f(CW\*(C`aid\*(C'\fR) and the access rights (\f(CW\*(C`arights\*(C'\fR). To specify different output values, include the \&\f(CW\*(C`\-output\*(C'\fR argument with one or more column names. See OUTPUT for the column names. .PP Values are space delimited by default. To use a different delimiter character, include the \fB\-delim\fR argument. Include the \fB\-noheading\fR flag to suppress the output heading line. .SH OPTIONS .IX Header "OPTIONS" .IP \fB\-checkout\fR 4 .IX Item "-checkout" Checkout the specified volume from the running file server. This ensures that the file server or other processes will not be modifying volume meta-data at the same time we are trying to read it, leading to invalid or incorrect results. .IP "\fB\-partition\fR <\fIpartition name or id\fR>+" 4 .IX Item "-partition +" Specifies the partition that houses each volume for which to produce output. Use the format \fI/vicepxx\fR or \fIxx\fR, where \fIxx\fR is one or two lowercase letters. .Sp This argument can be omitted if the current working directory is the mount location for an AFS server partition. If the current working directory is not the mount location for an AFS server partition, the command produces output for every volume on all local AFS server partitions. .IP "\fB\-volumeid\fR <\fIvolume id\fR>+" 4 .IX Item "-volumeid +" Specifies the ID number of one volume for which to produce output. The \&\fB\-partition\fR argument must be provided along with this one unless the current working directory is the mount location for the AFS server partition that houses the volume. .IP "\fB\-type\fR <\fIVolume types: rw, ro, bk\fR>+" 4 .IX Item "-type +" Limit the volumes to be scanned by read/write, read-only, or backup volumes. Specify one or more of \f(CW\*(C`rw\*(C'\fR, \f(CW\*(C`ro\*(C'\fR, \f(CW\*(C`bk\*(C'\fR. The \fBvolscan\fR command will scan all types of volumes by default. .IP "\fB\-find\fR <\fIObjects to find: file, dir, mount, symlink, acl\fR>+" 4 .IX Item "-find +" Output the specified volume objects within the scanned volumes. Specify one or more of \f(CW\*(C`file\*(C'\fR, \f(CW\*(C`dir\*(C'\fR, \f(CW\*(C`mount\*(C'\fR, \f(CW\*(C`symlink\*(C'\fR, \f(CW\*(C`acl\*(C'\fR. By default, the \&\fBvolscan\fR command will find \f(CW\*(C`file\*(C'\fR, \f(CW\*(C`dir\*(C'\fR, \f(CW\*(C`mount\*(C'\fR, \f(CW\*(C`symlink\*(C'\fR objects. .IP "\fB\-output\fR <\fIColumn\fR>+" 4 .IX Item "-output +" The \fB\-output\fR argument specifies the output columns produced by the \fBvolscan\fR command. See the OUTPUT section for <\fIColumn\fR> names. .Sp The default output columns are the file server hostname (\f(CW\*(C`host\*(C'\fR), the object type (\f(CW\*(C`desc\*(C'\fR), the vnode FID (\f(CW\*(C`fid\*(C'\fR), the vnode data version (\f(CW\*(C`dv\*(C'\fR), and the directory path (\f(CW\*(C`path\*(C'\fR). When \f(CW\*(C`acl\*(C'\fR is included as an argument to \f(CW\*(C`\-find\*(C'\fR, the default output values also include the user/group id (\f(CW\*(C`aid\*(C'\fR) and the access rights (\f(CW\*(C`arights\*(C'\fR). .IP "\fB\-delim\fR <\fIOutput field delimiter\fR>" 4 .IX Item "-delim " The \fB\-delim\fR argument specifies the record delimiter character. The default value is the space (\f(CW\*(Aq \*(Aq\fR) character. .IP \fB\-noheading\fR 4 .IX Item "-noheading" The \fB\-noheading\fR flags prevents the \fBvolscan\fR command from printing the heading line. .IP \fB\-ignore\-magic\fR 4 .IX Item "-ignore-magic" Display vnodes even with incorrect vnode magic numbers. By default, the \&\fBvolscan\fR command will not process vnodes objects with incorrect vnode magic numbers. .IP \fB\-help\fR 4 .IX Item "-help" Prints the online help for this command. All other valid options are ignored. .SH OUTPUT .IX Header "OUTPUT" The following column names are valid for the \fB\-output\fR argument: .ie n .IP """host""" 4 .el .IP \f(CWhost\fR 4 .IX Item "host" The hostname of the current machine. This field may be useful when combining the \fBvolscan\fR output from several hosts. .ie n .IP """desc""" 4 .el .IP \f(CWdesc\fR 4 .IX Item "desc" The descriptive name of the type of volume object. Values are \f(CW\*(C`file\*(C'\fR, \f(CW\*(C`dir\*(C'\fR, \&\f(CW\*(C`symlink\*(C'\fR, \f(CW\*(C`mount\*(C'\fR, and \f(CW\*(C`acl\*(C'\fR. .ie n .IP """vid""" 4 .el .IP \f(CWvid\fR 4 .IX Item "vid" The numeric volume id. .ie n .IP """offset""" 4 .el .IP \f(CWoffset\fR 4 .IX Item "offset" The vnode index table offset. .ie n .IP """vtype""" 4 .el .IP \f(CWvtype\fR 4 .IX Item "vtype" The volume type. Values are \f(CW\*(C`RW\*(C'\fR, \f(CW\*(C`RO\*(C'\fR, \f(CW\*(C`BK\*(C'\fR. .ie n .IP """vname""" 4 .el .IP \f(CWvname\fR 4 .IX Item "vname" The volume name. .ie n .IP """part""" 4 .el .IP \f(CWpart\fR 4 .IX Item "part" The partition path. .ie n .IP """partid""" 4 .el .IP \f(CWpartid\fR 4 .IX Item "partid" The AFS partition id. .ie n .IP """fid""" 4 .el .IP \f(CWfid\fR 4 .IX Item "fid" The AFS File Identifier (FID). .ie n .IP """path""" 4 .el .IP \f(CWpath\fR 4 .IX Item "path" The directory path and filename. The path is relative to the volume root directory. .ie n .IP """target""" 4 .el .IP \f(CWtarget\fR 4 .IX Item "target" The symlink target. Empty if the vnode is not a symlink. .ie n .IP """mount""" 4 .el .IP \f(CWmount\fR 4 .IX Item "mount" The mount point value. Empty if the vnode is not a mount point. See "fs lsmount" for the mount point value format. .ie n .IP """mtype""" 4 .el .IP \f(CWmtype\fR 4 .IX Item "mtype" The mount point type. Empty if the vnode is not a mount point. Values are \f(CW\*(Aq#\*(Aq\fR for regular mount points and \f(CW\*(Aq%\*(Aq\fR for read-write mount points. .ie n .IP """mcell""" 4 .el .IP \f(CWmcell\fR 4 .IX Item "mcell" The mount point target cell. Empty if the vnode is not a cellular mount point. .ie n .IP """mvol""" 4 .el .IP \f(CWmvol\fR 4 .IX Item "mvol" The mount point target volume. Empty if the vnode is not a mount point. .ie n .IP """aid""" 4 .el .IP \f(CWaid\fR 4 .IX Item "aid" Access entry user or group id. Empty if the object is not an ACL. .ie n .IP """arights""" 4 .el .IP \f(CWarights\fR 4 .IX Item "arights" Access entry rights. Empty if the object is not an ACL. .ie n .IP """vntype""" 4 .el .IP \f(CWvntype\fR 4 .IX Item "vntype" The vnode type. Values are \f(CW\*(C`file\*(C'\fR, \f(CW\*(C`dir\*(C'\fR, \f(CW\*(C`symlink\*(C'\fR. .ie n .IP """cloned""" 4 .el .IP \f(CWcloned\fR 4 .IX Item "cloned" The vnode cloned flag. Values are \f(CW\*(C`y\*(C'\fR or \f(CW\*(C`n\*(C'\fR. .ie n .IP """mode""" 4 .el .IP \f(CWmode\fR 4 .IX Item "mode" The vnode Unix mode bits, as an octal number. .ie n .IP """links""" 4 .el .IP \f(CWlinks\fR 4 .IX Item "links" The vnode link count. .ie n .IP """length""" 4 .el .IP \f(CWlength\fR 4 .IX Item "length" The vnode data length. .ie n .IP """uniq""" 4 .el .IP \f(CWuniq\fR 4 .IX Item "uniq" The vnode uniquifier number. .ie n .IP """dv""" 4 .el .IP \f(CWdv\fR 4 .IX Item "dv" The vnode data version number. .ie n .IP """inode""" 4 .el .IP \f(CWinode\fR 4 .IX Item "inode" The vnode inode number. This is an internally used number on namei file servers. .ie n .IP """namei""" 4 .el .IP \f(CWnamei\fR 4 .IX Item "namei" The vnode namei path. .ie n .IP """modtime""" 4 .el .IP \f(CWmodtime\fR 4 .IX Item "modtime" The vnode modification time. .ie n .IP """author""" 4 .el .IP \f(CWauthor\fR 4 .IX Item "author" The vnode author user id. .ie n .IP """owner""" 4 .el .IP \f(CWowner\fR 4 .IX Item "owner" The vnode Unix owner id. .ie n .IP """parent""" 4 .el .IP \f(CWparent\fR 4 .IX Item "parent" The parent directory vnode number. .ie n .IP """magic""" 4 .el .IP \f(CWmagic\fR 4 .IX Item "magic" The vnode magic number. .ie n .IP """lock""" 4 .el .IP \f(CWlock\fR 4 .IX Item "lock" The vnode lock count and time. The format is <\fIcount\fR>.<\fItime\fR>, where <\fItime\fR> is the epoch time. .ie n .IP """smodtime""" 4 .el .IP \f(CWsmodtime\fR 4 .IX Item "smodtime" The vnode server modify time. .ie n .IP """group""" 4 .el .IP \f(CWgroup\fR 4 .IX Item "group" The vnode unix group id. .SH EXAMPLES .IX Header "EXAMPLES" The following command displays the FID, data version, and relative path for each vnode object in a volume. .PP .Vb 5 \& # volscan \-partition a \-volumeid 536870916 \& HOST DESC FID DV PATH \& fs1 dir 536870916.1.1 3 / \& fs1 mount 536870916.2.2 0 /test \& fs1 mount 536870916.4.3 0 /xyzzy .Ve .PP The following command displays the AFS mount points in all the read-write volumes on the file server. For each mount point the following is shown: the volume containing the mount point, the type of mount point, regular (\f(CW\*(C`#\*(C'\fR) or read-write (\f(CW\*(C`%\*(C'\fR), the target cell (or \f(CW\*(C`\-\*(C'\fR if not a cellular mount point), the name of the target volume, the path of the mount point within the volume (relative to the volume root directory). .PP .Vb 4 \& # volscan \-type rw \-find mount \-output vid mtype mcell mvol path \-noheading \& 536870915 # \- test /test \& 536870912 # example.com root.cell /example.com \& 536870912 % example.com root.cell /.example.com .Ve .PP The following command displays access control lists for a volume. .PP .Vb 7 \& # volscan \-partition a \-volumeid 536870918 \-find acl \e \& \-output fid aid arights path \-delim : \-noheading \& 536870918.1.1:\-204:+rlidwka:/ \& 536870918.1.1:\-101:+rl:/ \& 536870918.3.3:\-204:+rlidwka:/xyzzy \& 536870918.3.3:\-101:+rl:/xyzzy \& 536870918.3.3:1027:+rlidwk:/xyzzy .Ve .PP The following commands find files which have unix permissions bit \f(CW04000\fR (\f(CW\*(C`suid\*(C'\fR) or \f(CW02000\fR (\f(CW\*(C`sgid\*(C'\fR): .PP .Vb 2 \& # volscan \-find file \-output fid mode \-noheading | \e \& perl \-lane \*(Aqprint if oct($F[1]) & 06000\*(Aq .Ve .SH "PRIVILEGE REQUIRED" .IX Header "PRIVILEGE REQUIRED" The issuer must be logged in as the local superuser \f(CW\*(C`root\*(C'\fR. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBvolinfo\fR\|(8), \&\fBvldb.DB0\fR\|(5), \&\fBvolserver\fR\|(8) .SH COPYRIGHT .IX Header "COPYRIGHT" Copyright 2014 Sine Nomine Associates. All Rights Reserved. .PP This documentation is covered by the BSD License as written in the doc/LICENSE file. This man page was written by Michael Meffie for OpenAFS.