blob: 04cc9ea97764d2cdfe6532ad076084ba08c7c762 [file] [log] [blame]
Steve Kondik79165c32015-11-09 19:43:00 -08001.\" Copyright (c) 2014 Jean-Pierre Andre
2.\" This file may be copied under the terms of the GNU Public License.
3.\"
4.TH NTFSFALLOCATE 8 "June 2014" "ntfs-3g @VERSION@"
5.SH NAME
6ntfsfallocate \- preallocate space to a file on an NTFS volume
7.SH SYNOPSIS
8\fBntfsfallocate\fR [\fIoptions\fR] -l \fIlength\fR \fIdevice\fR \fIfile\fR \fI[attr-type\fR [\fIattr-name\fR]]
9.SH DESCRIPTION
10.B ntfsfallocate
11preallocates space for any attribute of a file or directory, thus reserving
12space before actual contents is written. This is similar to fallocate(1).
13.SH OPTIONS
14Below is a summary of all the options that
15.B ntfsfallocate
16accepts. Nearly all options have two equivalent names. The short name is
17preceded by
18.B \-
19and the long name is preceded by
20.BR \-\- .
21Any single letter options, that don't take an argument, can be combined into a
22single command, e.g.
23.B \-fv
24is equivalent to
25.BR "\-f \-v" .
26Long named options can be abbreviated to any unique prefix of their name.
27.TP
28\fB\-f\fR, \fB\-\-force\fR
29This will override some sensible defaults, such as not using a mounted volume.
30Use this option with caution.
31.TP
32\fB\-h\fR, \fB\-\-help\fR
33Show a list of options with a brief description of each one.
34.TP
35\fB\-l\fR, \fB\-\-length\fR LENGTH
36This is a mandatory option to specify the number of bytes to preallocate.
37It will be rounded up to a multiple of the cluster size.
38A suffix of K, M, G, T, P or E may be appended to
39mean a multiplicative factor of a power of 1000. Similarly a suffix of
40Ki, Mi, Gi, Ti, Pi or Ei may be appended to mean a multiplicative factor
41of a power of 1024.
42.TP
43\fB\-n\fR, \fB\-\-no-size-change\fR
44Do not change the apparent size of the file. The space allocated beyond
45the apparent size is not zeroed, but subsequent writing beyond the apparent
46end of file will force zeroing the inner allocated space as it cannot be
47considered as a hole any more, and this may take significant time.
48.TP
49\fB\-N\fR, \fB\-\-no-action\fR
50Simulate the allocation without actually write to device.
51.TP
52\fB\-o\fR, \fB\-\-offset\fR OFFSET
53Specify the offset in the file where preallocation starts. By default,
54the preallocation is counted from the beginning of the file. Space already
55allocated in the area defined by offset and length is preserved.
56.TP
57\fB\-q\fR, \fB\-\-quiet\fR
58Suppress some debug/warning/error messages.
59.TP
60\fB\-v\fR, \fB\-\-verbose\fR
61Display more debug/warning/error messages.
62.TP
63\fB\-V\fR, \fB\-\-version\fR
64Show the version number, copyright and license of
65.BR ntfsfallocate .
66.TP
67\fBattr-type\fR
68Define a particular attribute type to be preallocated (advanced use only).
69By default, the unnamed $DATA attribute (the contents of a plain file) will
70be preallocated. The attribute has to be specified by a number in decimal
71or hexadecimal :
72.TS
73box;
74lB lB lB
75l l l.
76Hex Decimal Name
770x10 16 "$STANDARD_INFORMATION"
780x20 32 "$ATTRIBUTE_LIST"
790x30 48 "$FILE_NAME"
800x40 64 "$OBJECT_ID"
810x50 80 "$SECURITY_DESCRIPTOR"
820x60 96 "$VOLUME_NAME"
830x70 112 "$VOLUME_INFORMATION"
840x80 128 "$DATA"
850x90 144 "$INDEX_ROOT"
860xA0 160 "$INDEX_ALLOCATION"
870xB0 176 "$BITMAP"
880xC0 192 "$REPARSE_POINT"
890xD0 208 "$EA_INFORMATION"
900xE0 224 "$EA"
910xF0 240 "$PROPERTY_SET"
920x100 256 "$LOGGED_UTILITY_STREAM"
93.TE
94.sp
95.TP
96\fBattr-name\fR
97Define the name of the particular attribute type to be preallocated
98(advanced use only).
99.SH EXAMPLES
100Preallocate 100MB to the file database.db located in the Data directory
101which is at the root of an NTFS file system.
102.RS
103.sp
104.B ntfsfallocate -l 100M /dev/sda1 Data/database.db
105.sp
106.RE
107.SH BUGS
108There are no known problems with
109.BR ntfsfallocate ,
110however it can lead to configurations not supported by Windows
111and Windows may crash (BSOD) when writing to preallocated clusters
112which were not written to earlier. Files with preallocated space should
113be fully be written to before they are updated by Windows.
114.P
115If you find a bug in \fBntfsfallocate\fR proper, please send an email
116describing the problem to the development team:
117.br
118.nh
119ntfs\-3g\-devel@lists.sf.net
120.hy
121.SH AUTHORS
122.B ntfsfallocate
123was written by Jean-Pierre Andre.
124.SH AVAILABILITY
125.B ntfsfallocate
126is part of the
127.B ntfs-3g
128package and is available from:
129.br
130.nh
131http://www.tuxera.com/community/
132.hy
133.SH SEE ALSO
134.BR ntfs-3g (8),
135.BR ntfstruncate (8),
136.BR ntfsprogs (8),
137.BR fallocate (1)