[1f1a9e9] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
| 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
[8dfc5c3] | 7 | <!ENTITY btrfs-progs-download-http "&kernel-dl;/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-v&btrfs-progs-version;.tar.xz">
|
---|
[1f1a9e9] | 8 | <!ENTITY btrfs-progs-download-ftp " ">
|
---|
[8388aa7] | 9 | <!ENTITY btrfs-progs-md5sum "1caf3677fc4ea245ff5aab363a0b956f">
|
---|
[758ae3c2] | 10 | <!ENTITY btrfs-progs-size "2.1 MB">
|
---|
[c3447c89] | 11 | <!ENTITY btrfs-progs-buildsize "92 MB (add 2.7 GB for tests)">
|
---|
[85ac148] | 12 | <!ENTITY btrfs-progs-time "0.2 SBU (add 45-90 SBU for tests, depending on disk speed)">
|
---|
[1f1a9e9] | 13 | ]>
|
---|
| 14 |
|
---|
| 15 | <sect1 id="btrfs-progs" xreflabel="btrfs-progs-&btrfs-progs-version;">
|
---|
| 16 | <?dbhtml filename="btrfs-progs.html"?>
|
---|
| 17 |
|
---|
| 18 | <sect1info>
|
---|
| 19 | <othername>$LastChangedBy$</othername>
|
---|
| 20 | <date>$Date$</date>
|
---|
| 21 | </sect1info>
|
---|
| 22 |
|
---|
| 23 | <title>btrfs-progs-&btrfs-progs-version;</title>
|
---|
| 24 |
|
---|
| 25 | <indexterm zone="btrfs-progs">
|
---|
| 26 | <primary sortas="a-btrfs-progs">btrfs-progs</primary>
|
---|
| 27 | </indexterm>
|
---|
| 28 |
|
---|
| 29 | <sect2 role="package">
|
---|
| 30 | <title>Introduction to btrfs-progs</title>
|
---|
| 31 |
|
---|
[29244b7] | 32 | <para>
|
---|
| 33 | The <application>btrfs-progs</application> package contains
|
---|
| 34 | administration and debugging tools for the B-tree file system (btrfs).
|
---|
| 35 | </para>
|
---|
[1f1a9e9] | 36 |
|
---|
[eef74ab] | 37 | &lfs101_checked;
|
---|
[1f1a9e9] | 38 |
|
---|
| 39 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 40 | <itemizedlist spacing="compact">
|
---|
| 41 | <listitem>
|
---|
[29244b7] | 42 | <para>
|
---|
| 43 | Download (HTTP): <ulink url="&btrfs-progs-download-http;"/>
|
---|
| 44 | </para>
|
---|
[1f1a9e9] | 45 | </listitem>
|
---|
| 46 | <listitem>
|
---|
[29244b7] | 47 | <para>
|
---|
| 48 | Download (FTP): <ulink url="&btrfs-progs-download-ftp;"/>
|
---|
| 49 | </para>
|
---|
[1f1a9e9] | 50 | </listitem>
|
---|
| 51 | <listitem>
|
---|
[29244b7] | 52 | <para>
|
---|
| 53 | Download MD5 sum: &btrfs-progs-md5sum;
|
---|
| 54 | </para>
|
---|
[1f1a9e9] | 55 | </listitem>
|
---|
| 56 | <listitem>
|
---|
[29244b7] | 57 | <para>
|
---|
| 58 | Download size: &btrfs-progs-size;
|
---|
| 59 | </para>
|
---|
[1f1a9e9] | 60 | </listitem>
|
---|
| 61 | <listitem>
|
---|
[29244b7] | 62 | <para>
|
---|
| 63 | Estimated disk space required: &btrfs-progs-buildsize;
|
---|
| 64 | </para>
|
---|
[1f1a9e9] | 65 | </listitem>
|
---|
| 66 | <listitem>
|
---|
[29244b7] | 67 | <para>
|
---|
| 68 | Estimated build time: &btrfs-progs-time;
|
---|
| 69 | </para>
|
---|
[1f1a9e9] | 70 | </listitem>
|
---|
| 71 | </itemizedlist>
|
---|
| 72 |
|
---|
| 73 | <bridgehead renderas="sect3">Btrfs-progs Dependencies</bridgehead>
|
---|
| 74 |
|
---|
[61439d5] | 75 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
| 76 | <para role="required">
|
---|
| 77 | <xref linkend="lzo"/>
|
---|
| 78 | </para>
|
---|
| 79 |
|
---|
[1f1a9e9] | 80 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
| 81 | <para role="recommended">
|
---|
| 82 | <xref linkend="asciidoc"/> and
|
---|
| 83 | <xref linkend="xmlto"/> (both required to generate man pages)
|
---|
| 84 | </para>
|
---|
| 85 |
|
---|
[292a840] | 86 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 87 | <para role="optional">
|
---|
[85ac148] | 88 | <xref linkend="lvm2"/> (<command>dmsetup</command> is used in tests) and
|
---|
[f33b456] | 89 | <xref linkend="reiserfs"/> (for tests)
|
---|
[292a840] | 90 | </para>
|
---|
| 91 |
|
---|
[1f1a9e9] | 92 | <para condition="html" role="usernotes">User Notes:
|
---|
[0d4692d] | 93 | <ulink url="&blfs-wiki;/btrfs-progs"/></para>
|
---|
[1f1a9e9] | 94 |
|
---|
| 95 | </sect2>
|
---|
| 96 |
|
---|
| 97 | <sect2 role="kernel" id="btrfs-progs-kernel">
|
---|
| 98 | <title>Kernel Configuration</title>
|
---|
| 99 |
|
---|
[29244b7] | 100 | <para>
|
---|
| 101 | Enable the following option in the kernel configuration
|
---|
| 102 | and recompile the kernel:
|
---|
| 103 | </para>
|
---|
[1f1a9e9] | 104 |
|
---|
| 105 | <screen><literal>File systems --->
|
---|
| 106 | <*/M> Btrfs filesystem support [CONFIG_BTRFS_FS]</literal></screen>
|
---|
| 107 |
|
---|
[8388aa7] | 108 | <para>
|
---|
| 109 | In addition to the above and to the options required for
|
---|
| 110 | <xref linkend="lvm2"/> and <xref linkend="reiserfs"/>, the following
|
---|
| 111 | options must be enabled for running tests:
|
---|
| 112 | </para>
|
---|
| 113 |
|
---|
| 114 | <screen><literal>File systems --->
|
---|
| 115 | [*] Btrfs POSIX Access Control Lists [CONFIG_BTRFS_FS_POSIX_ACL]
|
---|
| 116 | [*] ReiserFS extended attributes [CONFIG_REISERFS_FS_XATTR]
|
---|
| 117 | [*] ReiserFS POSIX Access Control Lists [CONFIG_REISERFS_FS_POSIX_ACL]</literal></screen>
|
---|
[1f1a9e9] | 118 |
|
---|
| 119 | <indexterm zone="btrfs-progs btrfs-progs-kernel">
|
---|
[2630345] | 120 | <primary sortas="d-btrfs-progs">BTRFS Programs</primary>
|
---|
[1f1a9e9] | 121 | </indexterm>
|
---|
| 122 |
|
---|
| 123 | </sect2>
|
---|
| 124 |
|
---|
| 125 | <sect2 role="installation">
|
---|
| 126 | <title>Installation of btrfs-progs</title>
|
---|
| 127 |
|
---|
[29244b7] | 128 | <para>
|
---|
| 129 | Install <application>btrfs-progs</application> by running the following
|
---|
| 130 | commands:
|
---|
| 131 | </para>
|
---|
[7b2b4b11] | 132 |
|
---|
[261657ce] | 133 | <screen><userinput>./configure --prefix=/usr \
|
---|
| 134 | --bindir=/bin \
|
---|
[90025d31] | 135 | --libdir=/lib \
|
---|
| 136 | --with-pkgconfigdir=/usr/lib/pkgconfig &&
|
---|
[1f1a9e9] | 137 | make</userinput></screen>
|
---|
| 138 |
|
---|
[29244b7] | 139 | <note>
|
---|
| 140 | <para>
|
---|
| 141 | Some tests require grep built with perl regular expressions. To
|
---|
[170e308] | 142 | obtain this, rebuild grep with the LFS Chapter 8 instructions after
|
---|
[29244b7] | 143 | installing <xref linkend="pcre"/>.
|
---|
| 144 | </para>
|
---|
| 145 | </note>
|
---|
[85ac148] | 146 | <!-- Keeping this for now, but it seems that calling "make test" is
|
---|
| 147 | simpler and does the same thing
|
---|
[29244b7] | 148 | <para>
|
---|
[85ac148] | 149 | Before running tests, build a support program
|
---|
| 150 | and disable several that fail:
|
---|
[29244b7] | 151 | </para>
|
---|
[1f1a9e9] | 152 |
|
---|
[85ac148] | 153 | <screen remap="test"><userinput>make fssum</userinput></screen>
|
---|
[32bc8e4c] | 154 |
|
---|
[29244b7] | 155 | <para>
|
---|
| 156 | To test the results, issue (as the <systemitem
|
---|
| 157 | class="username">root</systemitem> user):
|
---|
| 158 | </para>
|
---|
[32bc8e4c] | 159 |
|
---|
[5af02b37] | 160 | <screen role="root" remap="test"><userinput>pushd tests
|
---|
[85ac148] | 161 | ./fsck-tests.sh
|
---|
| 162 | ./mkfs-tests.sh
|
---|
| 163 | ./cli-tests.sh
|
---|
| 164 | ./convert-tests.sh
|
---|
| 165 | ./misc-tests.sh
|
---|
| 166 | ./fuzz-tests.sh
|
---|
[32bc8e4c] | 167 | popd</userinput></screen>
|
---|
[85ac148] | 168 | -->
|
---|
[8388aa7] | 169 |
|
---|
| 170 | <!-- Template for failed test removal:-->
|
---|
| 171 | <para>
|
---|
| 172 | To test the results, first disable some tests that fail and prevent
|
---|
| 173 | the other ones to run:
|
---|
| 174 | </para>
|
---|
| 175 |
|
---|
| 176 | <screen remap="test"><userinput>mv tests/fsck-tests/012-leaf-corruption/test.sh{,.broken}
|
---|
| 177 | mv tests/misc-tests/046-seed-multi-mount/test.sh{,.broken}
|
---|
| 178 | mv tests/convert-tests/019-ext4-copy-timestamps/test.sh{,.broken}</userinput></screen>
|
---|
| 179 | <!-- Substitute your test failure with the one above. -->
|
---|
[85ac148] | 180 | <para>
|
---|
| 181 | To test the results, run (as the
|
---|
[949387d0] | 182 | <systemitem class="username">root</systemitem> user):
|
---|
[85ac148] | 183 | </para>
|
---|
| 184 |
|
---|
[8388aa7] | 185 | <screen role="root" remap="test"><userinput>make -j1 -k test</userinput></screen>
|
---|
[85ac148] | 186 |
|
---|
| 187 | <note>
|
---|
| 188 | <para>
|
---|
| 189 | If the above mentioned kernel options are not enabled, some tests
|
---|
| 190 | fail, and prevent all the remaining tests to run, because the test
|
---|
| 191 | disk image is not cleanly unmounted.
|
---|
| 192 | </para>
|
---|
| 193 | </note>
|
---|
| 194 |
|
---|
| 195 | <para>
|
---|
| 196 | Two tests fail for unknown reasons in the
|
---|
| 197 | <command>test-libbtrfsutil</command> section. Tests take a very long
|
---|
| 198 | time, and it may be interesting to run only part of them. Running tests
|
---|
| 199 | only in one directory can be done with
|
---|
| 200 | <command>make TEST=<DIR> test</command>.
|
---|
| 201 | </para>
|
---|
[32bc8e4c] | 202 |
|
---|
[29244b7] | 203 | <para>
|
---|
| 204 | Install the package as the <systemitem
|
---|
| 205 | class="username">root</systemitem> user:
|
---|
| 206 | </para>
|
---|
[1f1a9e9] | 207 |
|
---|
[01e86d88] | 208 | <screen role="root"><userinput>make install &&
|
---|
[1f1a9e9] | 209 |
|
---|
[555dcb4a] | 210 | ln -sfv ../../lib/$(readlink /lib/libbtrfs.so) /usr/lib/libbtrfs.so &&
|
---|
[2565779] | 211 | ln -sfv ../../lib/$(readlink /lib/libbtrfsutil.so) /usr/lib/libbtrfsutil.so &&
|
---|
| 212 | rm -fv /lib/libbtrfs.{a,so} /lib/libbtrfsutil.{a,so} &&
|
---|
[f50481de] | 213 | mv -v /bin/{mkfs,fsck}.btrfs /sbin</userinput></screen>
|
---|
[1f1a9e9] | 214 |
|
---|
| 215 | </sect2>
|
---|
| 216 |
|
---|
| 217 | <sect2 role="commands">
|
---|
| 218 | <title>Command Explanations</title>
|
---|
| 219 |
|
---|
[29244b7] | 220 | <para>
|
---|
| 221 | <option>--disable-documentation</option>: This option
|
---|
| 222 | is needed if the recommended dependencies are not installed.
|
---|
| 223 | </para>
|
---|
[85ac148] | 224 | <!-- not anymore in the commands
|
---|
[29244b7] | 225 | <para>
|
---|
| 226 | <command>mv tests/{cli,convert,misc,fuzz}-tests/ ...</command>: Disables
|
---|
| 227 | tests that fail and prevent tests from completing.
|
---|
| 228 | </para>
|
---|
[85ac148] | 229 | -->
|
---|
[29244b7] | 230 | <para>
|
---|
| 231 | <command>ln -s ... /usr/lib/libbtrfs.so</command>: Creates a
|
---|
| 232 | symbolic link in the directory where it is expected.
|
---|
| 233 | </para>
|
---|
[1f1a9e9] | 234 |
|
---|
[29244b7] | 235 | <para>
|
---|
| 236 | <command>rm /lib/libbtrfs.{a,so}</command>: Removes unneeded
|
---|
| 237 | library entries.
|
---|
| 238 | </para>
|
---|
[1f1a9e9] | 239 |
|
---|
| 240 | </sect2>
|
---|
| 241 |
|
---|
| 242 | <sect2 role="content">
|
---|
| 243 | <title>Contents</title>
|
---|
| 244 |
|
---|
| 245 | <segmentedlist>
|
---|
| 246 | <segtitle>Installed Programs</segtitle>
|
---|
| 247 | <segtitle>Installed Libraries</segtitle>
|
---|
| 248 | <segtitle>Installed Directories</segtitle>
|
---|
| 249 |
|
---|
| 250 | <seglistitem>
|
---|
| 251 | <seg>
|
---|
| 252 | btrfs,
|
---|
| 253 | btrfs-convert,
|
---|
| 254 | btrfs-find-root,
|
---|
| 255 | btrfs-image,
|
---|
| 256 | btrfs-map-logical,
|
---|
| 257 | btrfs-select-super,
|
---|
| 258 | btrfsck (link to btrfs),
|
---|
| 259 | btrfstune,
|
---|
| 260 | fsck.btrfs, and
|
---|
| 261 | mkfs.btrfs
|
---|
| 262 | </seg>
|
---|
| 263 |
|
---|
[5d01724] | 264 | <seg>
|
---|
| 265 | libbtrfs.so and
|
---|
| 266 | libbtrfsutil.so
|
---|
| 267 | </seg>
|
---|
[1f1a9e9] | 268 |
|
---|
| 269 | <seg>/usr/include/btrfs</seg>
|
---|
| 270 | </seglistitem>
|
---|
| 271 | </segmentedlist>
|
---|
| 272 |
|
---|
| 273 | <variablelist>
|
---|
| 274 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 275 | <?dbfo list-presentation="list"?>
|
---|
| 276 | <?dbhtml list-presentation="table"?>
|
---|
| 277 |
|
---|
| 278 | <varlistentry id="btrfs-prog">
|
---|
| 279 | <term><command>btrfs</command></term>
|
---|
| 280 | <listitem>
|
---|
| 281 | <para>
|
---|
[4c24eb0a] | 282 | is the main interface into btrfs filesystem operations
|
---|
[1f1a9e9] | 283 | </para>
|
---|
| 284 | <indexterm zone="btrfs-progs btrfs-prog">
|
---|
| 285 | <primary sortas="b-btrfs">btrfs</primary>
|
---|
| 286 | </indexterm>
|
---|
| 287 | </listitem>
|
---|
| 288 | </varlistentry>
|
---|
| 289 |
|
---|
[292a840] | 290 | <varlistentry id="btrfs-convert">
|
---|
| 291 | <term><command>btrfs-convert</command></term>
|
---|
| 292 | <listitem>
|
---|
| 293 | <para>
|
---|
[4c24eb0a] | 294 | converts from an ext2/3/4 filesystem to btrfs
|
---|
[292a840] | 295 | </para>
|
---|
| 296 | <indexterm zone="btrfs-progs btrfs-convert">
|
---|
| 297 | <primary sortas="b-btrfs-convert">btrfs-convert</primary>
|
---|
| 298 | </indexterm>
|
---|
| 299 | </listitem>
|
---|
| 300 | </varlistentry>
|
---|
| 301 |
|
---|
| 302 | <varlistentry id="btrfs-find-root">
|
---|
| 303 | <term><command>btrfs-find-root</command></term>
|
---|
| 304 | <listitem>
|
---|
| 305 | <para>
|
---|
[4c24eb0a] | 306 | is a filter to find btrfs root
|
---|
[292a840] | 307 | </para>
|
---|
| 308 | <indexterm zone="btrfs-progs btrfs-find-root">
|
---|
| 309 | <primary sortas="b-btrfs-find-root">btrfs-find-root</primary>
|
---|
| 310 | </indexterm>
|
---|
| 311 | </listitem>
|
---|
| 312 | </varlistentry>
|
---|
| 313 |
|
---|
| 314 | <varlistentry id="btrfs-map-logical">
|
---|
| 315 | <term><command>btrfs-map-logical</command></term>
|
---|
| 316 | <listitem>
|
---|
| 317 | <para>
|
---|
[4c24eb0a] | 318 | maps btrfs logical extent to physical extent
|
---|
[292a840] | 319 | </para>
|
---|
| 320 | <indexterm zone="btrfs-progs btrfs-map-logical">
|
---|
| 321 | <primary sortas="b-btrfs-map-logical">btrfs-map-logical</primary>
|
---|
| 322 | </indexterm>
|
---|
| 323 | </listitem>
|
---|
| 324 | </varlistentry>
|
---|
| 325 |
|
---|
| 326 | <varlistentry id="btrfs-select-super">
|
---|
| 327 | <term><command>btrfs-select-super</command></term>
|
---|
| 328 | <listitem>
|
---|
| 329 | <para>
|
---|
[4c24eb0a] | 330 | overwrites the primary superblock with a backup copy
|
---|
[292a840] | 331 | </para>
|
---|
| 332 | <indexterm zone="btrfs-progs btrfs-select-super">
|
---|
| 333 | <primary sortas="b-btrfs-select-super">btrfs-select-super</primary>
|
---|
| 334 | </indexterm>
|
---|
| 335 | </listitem>
|
---|
| 336 | </varlistentry>
|
---|
| 337 |
|
---|
| 338 | <varlistentry id="btrfstune">
|
---|
| 339 | <term><command>btrfstune</command></term>
|
---|
| 340 | <listitem>
|
---|
| 341 | <para>
|
---|
[4c24eb0a] | 342 | tunes various filesystem parameters
|
---|
[292a840] | 343 | </para>
|
---|
| 344 | <indexterm zone="btrfs-progs btrfstune">
|
---|
| 345 | <primary sortas="b-btrfstune">btrfstune</primary>
|
---|
| 346 | </indexterm>
|
---|
| 347 | </listitem>
|
---|
| 348 | </varlistentry>
|
---|
| 349 |
|
---|
[1f1a9e9] | 350 | <varlistentry id="fsck.btrfs">
|
---|
| 351 | <term><command>fsck.btrfs</command></term>
|
---|
| 352 | <listitem>
|
---|
| 353 | <para>
|
---|
[4c24eb0a] | 354 | does nothing, but is present for consistency with fstab
|
---|
[1f1a9e9] | 355 | </para>
|
---|
| 356 | <indexterm zone="btrfs-progs fsck.btrfs">
|
---|
| 357 | <primary sortas="b-fsck.btrfs">fsck.btrfs</primary>
|
---|
| 358 | </indexterm>
|
---|
| 359 | </listitem>
|
---|
| 360 | </varlistentry>
|
---|
| 361 |
|
---|
| 362 | <varlistentry id="mkfs.btrfs">
|
---|
| 363 | <term><command>mkfs.btrfs</command></term>
|
---|
| 364 | <listitem>
|
---|
[29244b7] | 365 | <para>
|
---|
[4c24eb0a] | 366 | creates a btrfs file system
|
---|
[29244b7] | 367 | </para>
|
---|
[1f1a9e9] | 368 | <indexterm zone="btrfs-progs mkfs.btrfs">
|
---|
| 369 | <primary sortas="b-mkfs.btrfs">mkfs.btrfs</primary>
|
---|
| 370 | </indexterm>
|
---|
| 371 | </listitem>
|
---|
| 372 | </varlistentry>
|
---|
| 373 |
|
---|
| 374 | </variablelist>
|
---|
| 375 |
|
---|
| 376 | </sect2>
|
---|
| 377 |
|
---|
| 378 | </sect1>
|
---|