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