File: mfstools.1

package info (click to toggle)
lizardfs 3.12.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 8,064 kB
  • sloc: cpp: 91,899; sh: 9,341; python: 3,878; ansic: 3,109; pascal: 128; makefile: 57
file content (187 lines) | stat: -rw-r--r-- 8,380 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
.TH MFSTOOLS "1" "July 2009" "MooseFS 1.6.0"
.SH NAME
mfstools \- perform MooseFS\-specific operations
.SH SYNOPSIS
.B mfsgetgoal
[\fB-r\fP] [\fB-n\fP|\fB-h\fP|\fB-H\fP] \fIOBJECT\fP...
.PP
.B mfsrgetgoal
[\fB-n\fP|\fB-h\fP|\fB-H\fP] \fIOBJECT\fP...
.PP
.B mfssetgoal
[\fB-r\fP] [\fB-n\fP|\fB-h\fP|\fB-H\fP] \fBName\fP \fIOBJECT\fP...
.PP
.B mfssetquota
[\fB-r\fP] [\fB-n\fP|\fB-h\fP|\fB-H\fP] [\fB+\fP|\fB-\fP]N \fITODO(alek)\fP...
.PP
.B mfsrepquota
[\fB-r\fP] [\fB-n\fP|\fB-h\fP|\fB-H\fP] [\fB+\fP|\fB-\fP]N \fITODO(alek)\fP...
.PP
.B mfsrsetgoal
[\fB-n\fP|\fB-h\fP|\fB-H\fP] [\fB+\fP|\fB-\fP]N \fIOBJECT\fP...
.PP
.B mfsgettrashtime
[\fB-r\fP] [\fB-n\fP|\fB-h\fP|\fB-H\fP] \fIOBJECT\fP...
.PP
.B mfsrgettrashtime
[\fB-n\fP|\fB-h\fP|\fB-H\fP] \fIOBJECT\fP...
.PP
.B mfssettrashtime
[\fB-r\fP] [\fB-n\fP|\fB-h\fP|\fB-H\fP] [\fB+\fP|\fB-\fP]SECONDS \fIOBJECT\fP...
.PP
.B mfsrsettrashtime
[\fB-n\fP|\fB-h\fP|\fB-H\fP] [\fB+\fP|\fB-\fP]SECONDS \fIOBJECT\fP...
.PP
.B mfsgeteattr
[\fB-r\fP] [\fB-n\fP|\fB-h\fP|\fB-H\fP] \fIOBJECT\fP...
.PP
.B mfsseteattr
[\fB-r\fP] [\fB-n\fP|\fB-h\fP|\fB-H\fP] \fB-f\fP \fIATTRNAME\fP [\fB-f\fP \fIATTRNAME\fP ...] \fIOBJECT\fP...
.PP
.B mfsdeleattr
[\fB-r\fP] [\fB-n\fP|\fB-h\fP|\fB-H\fP] \fB-f\fP \fIATTRNAME\fP [\fB-f\fP \fIATTRNAME\fP ...] \fIOBJECT\fP...
.PP
.B mfscheckfile
\fIFILE\fP...
.PP
.B mfsfileinfo
\fIFILE\fP...
.PP
.B mfsdirinfo
[\fB-n\fP|\fB-h\fP|\fB-H\fP] \fIOBJECT\fP...
.PP
.B mfsfilerepair
[\fB-n\fP|\fB-h\fP|\fB-H\fP] \fIFILE\fP...
.PP
.B mfsappendchunks
\fISNAPSHOT_FILE\fP \fIOBJECT\fP...
.PP
.B mfsmakesnapshot
[\fB-o\fP] \fISOURCE\fP... \fIDESTINATION\fP
.PP
.SH DESCRIPTION
\fBmfsgetgoal\fP and \fBmfssetgoal\fP operate on object's \fIgoal\fP value.
\fBmfsgetgoal\fP prints current \fIgoal\fP value of given object(s).
\fB-r\fP option enables recursive mode, which works as usual for every
given file, but for every given directory additionally prints current
\fIgoal\fP value of all contained objects (files and directories).
\fBmfssetgoal\fP changes current \fIgoal\fP value of given object(s).
\fB-r\fP option enables recursive mode.
These tools can be used on any file, directory or deleted (\fItrash\fP) file.
.PP
\fBmfsrgetgoal\fP and \fBmfsrsetgoal\fP are deprecated aliases for
\fBmfsgetgoal -r\fP and \fBmfssetgoal -r\fP respectively.
.PP
\fBmfsgettrashtime\fP and \fBmfssettrashtime\fP operate on object's
\fItrashtime\fP value, i.e. the number of seconds the file is preserved in
special \fItrash\fP directory before it's finally removed from filesystem.
\fITrashtime\fP must be non\-negative integer value.
\fBmfsgettrashtime\fP prints current \fItrashtime\fP value of given object(s).
\fB-r\fP option enables recursive mode, which works as usual for every given
file, but for every given directory additionally prints current \fItrashtime\fP
value of all contained objects (files and directories).
\fBmfssettrashtime\fP changes current \fItrashtime\fP value of given object(s).
If new value is specified in \fB+\fP\fIN\fP form, \fItrashtime\fP value is
increased to \fIN\fP for objects with lower \fItrashtime\fP value and unchanged
for the rest. Similarly, if new value is specified as \fB\-\fP\fIN\fP,
\fItrashtime\fP value is decreased to \fIN\fP for objects with higher
\fItrashtime\fP value and unchanged for the rest. \fB-r\fP option enables
recursive mode.
These tools can be used on any file, directory or deleted (\fItrash\fP) file.
.PP
\fBmfsrgettrashtime\fP and \fBmfsrsettrashtime\fP are deprecated aliases for
\fBmfsgettrashtime -r\fP and \fBmfssettrashtime -r\fP respectively.
.PP
\fBmfsgeteattr\fP, \fBmfsseteattr\fP and \fBmfsdeleattr\fP
tools are used to get, set or delete some extra attributes. Attributes are
described below.
.PP
\fBmfscheckfile\fP checks and prints number of chunks and number of chunk
copies belonging to specified file(s).
It can be used on any file, included deleted (\fItrash\fP).
.PP
\fBmfsfileinfo\fP prints location (\fIchunkserver\fP host and port) of each
chunk copy belonging to specified file(s).
It can be used on any file, included deleted (\fItrash\fP).
.PP
\fBmfsdirinfo\fP is extended, MooseFS-specific equivalent of \fBdu -s\fP
command. It prints summary for each specified object (single file or
directory tree).
.PP
\fBmfsfilerepair\fP deals with broken files (those which cause I/O errors on
read operations) to make them partially readable. In case of missing chunk
it fills missing parts of file with zeros; in case of chunk version mismatch
it sets chunk version known to \fBmfsmaster\fP to highest one found on
chunkservers. Note: because in the second case content mismatch can occur in
chunks with the same version, it's advised to make a copy (not a snapshot!)
and delete original file after "repairing".
.PP
\fBmfsappendchunks\fP (equivalent of \fBmfssnapshot\fP from MooseFS 1.5)
appends a lazy copy of specified file(s) to specified snapshot file ("lazy"
means that creation of new chunks is delayed to the moment one copy is
modified).
If multiple files are given, they are merged into one target file in the way
that each file begins at \fIchunk\fP (64MB) boundary; padding space is left
empty.
.PP
\fBmfsmakesnapshots\fP makes a "real" snapshot (lazy copy, like in case of
\fBmfsappendchunks\fP) of some object(s) or subtree (similarly to \fBcp -r\fP
command). It's atomic with respect to each \fISOURCE\fP argument separately.
If \fIDESTINATION\fP points to already existing file, error will be reported
unless \fB-o\fP (overwrite) option is given. Note: if \fISOURCE\fP is
a directory, it's copied as a whole; but if it's followed by trailing slash,
only directory content is copied.
.SH GENERAL OPTIONS
Most of \fBmfstools\fP use \fB-n\fP, \fB-h\fP and \fB-H\fP options to select
format of printed numbers. \fB-n\fP causes to print exact numbers, \fB-h\fP
uses binary prefixes (Ki, Mi, Gi as 2^10, 2^20 etc.) while \fB-H\fP uses SI
prefixes (k, M, G as 10^3, 10^6 etc.).
The same can be achieved by setting
\fBMFSHRFORMAT\fP environment variable to: \fB0\fP (exact numbers), \fB1\fP
or \fBh\fP (binary prefixes), \fB2\fP or \fBH\fP (SI prefixes), \fB3\fP or
\fBh+\fP (exact numbers and binary prefixes), \fB4\fP or \fBH+\fP (exact
numbers and SI prefixes). The default is to print just exact numbers.
.SH EXTRA ATTRIBUTES
\fBnoowner\fP This flag means,
that particular object belongs to current user (\fIuid\fP and \fIgid\fP are equal
to \fIuid\fP and \fIgid\fP values of accessing process). Only root (\fIuid\fP=0)
sees the real \fIuid\fP and \fIgid\fP.
.PP
\fBnoattrcache\fP This flag means, that standard file attributes such as uid, gid,
mode, length and so on won't be stored in kernel cache. In MooseFS 1.5 this was the
only behaviour, and mfsmount always prevented attributes from being stored in
kernel cache, but in MooseFS 1.6 attributes can be cached, so in very rare ocassions
it could be useful to turn it off.
.PP
\fBnoentrycache\fP This flag is similar to above. It prevents directory entries
from being cached in kernel.
.SH INHERITANCE
When new object is created in MooseFS, attributes such as goal, trashtime and extra
attributes are inherited from parent directory. So if you set i.e. "noowner"
attribute and goal to 3 in a directory then every new object created in
this directory will have goal set to 3 and "noowner" flag set. A newly created
object inherits always the current set of its parent's attributes. Changing a
directory attribute does not affect its already created children. To change
an attribute for a directory and all of its children use "-r" option.
.SH NOTES
\fBmfstools\fP require MooseFS (\fBmfsmaster\fP and \fBmfsmount\fP) >= 1.6.0 to
work on read-only filesystem.
.SH "REPORTING BUGS"
Report bugs to <contact@lizardfs.org>.
.SH COPYRIGHT
Copyright 2008-2009 Gemius SA, 2013 Skytechnology sp. z o.o..

LizardFS is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, version 3.

LizardFS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with LizardFS  If not, see <http://www.gnu.org/licenses/>.
.SH "SEE ALSO"
.BR mfsmount (8),
.BR moosefs (7)