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