Whamcloud - gitweb
d8455bb8865012cb909c7f8adfc63f99aabcb3bc
[fs/lustre-release.git] / lustre / doc / lfs.1
1 .TH lfs 1 "2003 Oct 29" Lustre "configuration utilities"
2 .SH NAME
3 lfs \- Lustre utility to create a file with specific striping pattern, find the striping pattern of exiting files
4 .SH SYNOPSIS
5 .br
6 .B lfs
7 .br
8 .B lfs find [--atime|-A N] [--mtime|-M N] [--ctime|-C N] [--maxdepth|-D N]
9          \fB[--print0|-P] [--print|-p] [--obd|-O <uuid>] <dir/file>\fR
10 .br
11 .B lfs find [--quiet|-q] [--verbose|-v] [--recursive|-r] <dir|file>
12 .br
13 .B lfs getstripe [--obd|-O <uuid>] [--quiet|-q] [--verbose|-v] 
14               \fB[--recursive|-r] <dir/file>\fR
15 .br
16 .B lfs setstripe <filename|dirname> <stripe-size> <start-ost> <stripe-cnt> 
17 .br
18 .B lfs setstripe <filename|dirname> [--size|-s stripe-size] [--index|-i start-ost] [--count|-c stripe-cnt]
19 .br
20 .B lfs setstripe -d <dirname>
21 .br
22 .B lfs quotachown [-i] <filesystem>
23 .br
24 .B lfs quotacheck [-ug] <filesystem>
25 .br
26 .B lfs quotaon [-ugf] <filesystem>
27 .br
28 .B lfs quotaoff [-ug] <filesystem>
29 .br
30 .B lfs setquota [-u|-g] <name> <block-softlimit> <block-hardlimit> 
31              \fB<inode-softlimit> <inode-hardlimit> <filesystem>\fR
32 .br
33 .B lfs setquota -t [-u|-g] <block-grace> <inode-grace> <filesystem>
34 .br
35 .B lfs quota [-o obd_uuid] [-u|-g] <name> <filesystem>
36 .br
37 .B lfs quota -t [-u|-g] <filesystem>
38 .br
39 .B lfs check <mds| osts| servers>
40 .br
41 .B lfs df [-i] [-h] [path]
42 .SH DESCRIPTION
43 .B lfs
44 can be used to create a new file with a specific striping pattern, determine the default striping pattern, gather the extended attributes (object numbers and 
45 location) for a specific file. It can be invoked interactively without any 
46 arguments or in a non-interactive mode with one of the arguements supported. 
47 .SH OPTIONS
48 The various options supported by lctl are listed and explained below:
49 .TP
50 .B setstripe 
51 To create a new file with a specific striping pattern
52 .TP
53 .B find 
54 To search the directory tree rooted at the given dir/file name for the files that match the given parameters: \fB--atime\fR (file was last accessed N*24 hours ago), \fB--ctime\fR (file's status was last changed N*24 hours ago), \fB--mtime\fR (file's data was last modified N*24 hours ago), \fB--obd\fR (file has an object on a specific OST). The option \fB--maxdepth\fR allows find to decend at most N levels of directory tree. The options \fB--print\fR and \fB--print0\fR print full file name, followed by a newline and null character correspondingly.  Using one of these options works in the new (filename only) mode.
55 .TP
56 .B find
57 To list the striping info for a given filename or files in a directory or recursively for all files in a directory tree use one of the following options: \fB[--quiet|-q] [--verbose|-v] [--recursive|-r]\fR. If one of these options is given find works in old (obsolete, please use getstripe instead) filename and striping mode.
58 .TP
59 .B getstripe 
60 To list the striping info for given filename or files in a directory or recursively for all files in a directory tree. It can also be used to list the files that have objects on a specific OST.
61 .TP
62 .B quotachown
63 To change files' owner and group on OSTs of the specified filesystem
64 .TP
65 .B quotacheck [-ugf] <filesystem>
66 To scan the specified filesystem for disk usage, and create or update quota files. Options specify quota for users (-u) groups (-g) and force (-f)
67 .TP
68 .B quotaon [-ugf] <filesystem>
69 To turn filesystem quotas on. Options specify quota for users (-u) groups (-g) and force (-f)
70 .TP
71 .B quotaoff [-ugf] <filesystem>
72 To turn filesystem quotas off.  Options specify quota for users (-u) groups (-g) and force (-f)
73 .TP
74 .B setquota  [-u|-g] <name> <block-softlimit> <block-hardlimit> <inode-softlimit> <inode-hardlimit> <filesystem>
75 To set filesystem quotas for users or groups. Limits are specific as blocks and inodes, see EXAMPLES
76 .TP
77 .B setquota -t [-u|-g] <block-grace> <inode-grace> <filesystem>
78 To set filesystem quota grace times for users or groups. Grace time is specified in "XXwXXdXXhXXmXXs" format or as an integer seconds value, see EXAMPLES
79 .TP
80 .B quota [-o obd_uuid] [-u|-g] <name> <filesystem>
81 To display disk usage and limits, either for the full filesystem, or for objects on a specific obd. A user or group name must be specified.
82 .TP
83 .B quota -t [-u|-g] <filesystem>
84 To display block and inode grace times for user (-u) or group (-g) quotas
85 .TP
86 .B check 
87 Display the status of MDS or OSTs (as specified in the command) or all the servers (MDS and OSTs)
88 .TP
89 .B osts 
90 List all the OSTs for the filesystem
91 .TP
92 .B df
93 Report filesystem disk space usage or inodes usage of each MDT/OST.
94 .TP
95 .B help 
96 Provides brief help on the various arguments
97 .TP
98 .B exit/quit 
99 Quit the interactive lfs session
100 .SH EXAMPLES
101 .TP
102 .B $ lfs setstripe /mnt/lustre/file1 131072 -1 2
103 This creats a file striped on two OSTs with 128kB on each stripe.
104 .TP
105 .B $ lfs setstripe -d /mnt/lustre/dir
106 This deletes a default stripe pattern on dir. New files will use the default striping pattern created therein.
107 .TP
108 .B $ lfs find /mnt/lustre/file1
109 Lists the object allocation of a given file
110 .TP
111 .B $ lfs find /mnt/lustre/
112 Lists the object allocationss of all files in a given directory
113 .TP
114 .B $ lfs find -r /mnt/lustre/
115 Recursively list the objects of all files in a given directory tree
116 .TP
117 .B $ lfs find -r --obd OST2-UUID /mnt/lustre/
118 Recursively list all files in a given directory that have objects on OST2-UUID.
119 .TP
120 .B $ lfs quotachown -i /mnt/lustre
121 Change file owner and group
122 .TP
123 .B $ lfs quotacheck -ug /mnt/lustre
124 Quotacheck for user and group - will turn on quotas after making the check.
125 .TP
126 .B $ lfs quotaon -ug /mnt/lustre
127 Turn quotas of user and group on
128 .TP
129 .B $ lfs quotaoff -ug /mnt/lustre
130 Turn quotas of user and group off
131 .TP
132 .B $ lfs setquota -u bob 0 1000000 0 10000 /mnt/lustre
133 Set quotas of user `bob': 1GB block quota and 10,000 file quota
134 .TP
135 .B $ lfs setquota -t -u 1000 1w4d /mnt/lustre
136 Set grace times for user quotas: 1000 seconds for block quotas, 1 week and 4 days for inode quotas
137 .TP
138 .B $ lfs quota -u bob /mnt/lustre
139 List quotas of user `bob'
140 .TP
141 .B $ lfs quota -t -u /mnt/lustre
142 Show grace times for user quotas on /mnt/lustre
143 .TP
144 .B $ lfs check servers 
145 Check the status of all servers (MDT, OST)
146 .TP
147 .B $ lfs osts
148 List all the OSTs
149 .TP
150 .B $ lfs df -i 
151 Lists inode consumpton per OST and MDT
152 .SH BUGS
153 None are known.