[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 " ">
|
---|
[0a7ee10] | 9 | <!ENTITY btrfs-progs-md5sum "0ec41da8462196c17ac08f351db86912">
|
---|
[758ae3c2] | 10 | <!ENTITY btrfs-progs-size "2.1 MB">
|
---|
[c3447c89] | 11 | <!ENTITY btrfs-progs-buildsize "92 MB (add 2.7 GB for tests)">
|
---|
[0a7ee10] | 12 | <!ENTITY btrfs-progs-time "0.3 SBU (add 45 SBU for tests)">
|
---|
[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 |
|
---|
[170e308] | 37 | &lfs10_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">
|
---|
[6eb166fa] | 88 | <xref linkend="lvm2"/> (<command>dmsetup</command> is used in tests),
|
---|
[f33b456] | 89 | <xref linkend="python2"/> (python bindings), and
|
---|
| 90 | <xref linkend="reiserfs"/> (for tests)
|
---|
[292a840] | 91 | </para>
|
---|
| 92 |
|
---|
[1f1a9e9] | 93 | <para condition="html" role="usernotes">User Notes:
|
---|
[0d4692d] | 94 | <ulink url="&blfs-wiki;/btrfs-progs"/></para>
|
---|
[1f1a9e9] | 95 |
|
---|
| 96 | </sect2>
|
---|
| 97 |
|
---|
| 98 | <sect2 role="kernel" id="btrfs-progs-kernel">
|
---|
| 99 | <title>Kernel Configuration</title>
|
---|
| 100 |
|
---|
[29244b7] | 101 | <para>
|
---|
| 102 | Enable the following option in the kernel configuration
|
---|
| 103 | and recompile the kernel:
|
---|
| 104 | </para>
|
---|
[1f1a9e9] | 105 |
|
---|
| 106 | <screen><literal>File systems --->
|
---|
| 107 | <*/M> Btrfs filesystem support [CONFIG_BTRFS_FS]</literal></screen>
|
---|
| 108 |
|
---|
[29244b7] | 109 | <note>
|
---|
| 110 | <para>
|
---|
| 111 | CONFIG_BTRFS_FS_POSIX_ACL and
|
---|
| 112 | CONFIG_REISERFS_FS_XATTR are required for some tests.
|
---|
| 113 | Other Btrfs options in the kernel are optional.
|
---|
| 114 | </para>
|
---|
| 115 | </note>
|
---|
[1f1a9e9] | 116 |
|
---|
| 117 | <indexterm zone="btrfs-progs btrfs-progs-kernel">
|
---|
[2630345] | 118 | <primary sortas="d-btrfs-progs">BTRFS Programs</primary>
|
---|
[1f1a9e9] | 119 | </indexterm>
|
---|
| 120 |
|
---|
| 121 | </sect2>
|
---|
| 122 |
|
---|
| 123 | <sect2 role="installation">
|
---|
| 124 | <title>Installation of btrfs-progs</title>
|
---|
| 125 |
|
---|
[29244b7] | 126 | <para>
|
---|
| 127 | Install <application>btrfs-progs</application> by running the following
|
---|
| 128 | commands:
|
---|
| 129 | </para>
|
---|
[7b2b4b11] | 130 |
|
---|
[261657ce] | 131 | <screen><userinput>./configure --prefix=/usr \
|
---|
| 132 | --bindir=/bin \
|
---|
[90025d31] | 133 | --libdir=/lib \
|
---|
| 134 | --with-pkgconfigdir=/usr/lib/pkgconfig &&
|
---|
[1f1a9e9] | 135 | make</userinput></screen>
|
---|
| 136 |
|
---|
[0a7ee10] | 137 | <!-- Template for failed test removal:
|
---|
| 138 | mv tests/misc-tests/025-ztsd-compression/test.sh{,.broken}
|
---|
| 139 | Substitute your test failure with the one above. -->
|
---|
| 140 |
|
---|
[29244b7] | 141 | <note>
|
---|
| 142 | <para>
|
---|
| 143 | Some tests require grep built with perl regular expressions. To
|
---|
[170e308] | 144 | obtain this, rebuild grep with the LFS Chapter 8 instructions after
|
---|
[29244b7] | 145 | installing <xref linkend="pcre"/>.
|
---|
| 146 | </para>
|
---|
| 147 | </note>
|
---|
| 148 |
|
---|
| 149 | <para>
|
---|
[0a7ee10] | 150 | Before running tests, build a support program:
|
---|
| 151 | <!-- and disable several that fail:-->
|
---|
[29244b7] | 152 | </para>
|
---|
[1f1a9e9] | 153 |
|
---|
[e7d4e823] | 154 | <screen remap="test"><userinput>make fssum &&
|
---|
[bd9de06d] | 155 |
|
---|
[0a7ee10] | 156 | sed -i '/found/s/^/: #/' tests/convert-tests.sh &&</userinput></screen>
|
---|
[32bc8e4c] | 157 |
|
---|
[29244b7] | 158 | <para>
|
---|
| 159 | To test the results, issue (as the <systemitem
|
---|
| 160 | class="username">root</systemitem> user):
|
---|
| 161 | </para>
|
---|
[32bc8e4c] | 162 |
|
---|
[5af02b37] | 163 | <screen role="root" remap="test"><userinput>pushd tests
|
---|
[0a2d9ff] | 164 | ./fsck-tests.sh <!-- 43 tests 6m14s -->
|
---|
| 165 | ./mkfs-tests.sh <!-- 20 tests 2m48s -->
|
---|
| 166 | ./cli-tests.sh <!-- 12 tests 0m51s -->
|
---|
| 167 | ./convert-tests.sh <!-- 16 tests 13m36s -->
|
---|
| 168 | ./misc-tests.sh <!-- 38 tests 3m18s -->
|
---|
| 169 | ./fuzz-tests.sh <!-- 8 tests 1m11s -->
|
---|
[32bc8e4c] | 170 | popd</userinput></screen>
|
---|
| 171 |
|
---|
[29244b7] | 172 | <para>
|
---|
| 173 | Install the package as the <systemitem
|
---|
| 174 | class="username">root</systemitem> user:
|
---|
| 175 | </para>
|
---|
[1f1a9e9] | 176 |
|
---|
[01e86d88] | 177 | <screen role="root"><userinput>make install &&
|
---|
[1f1a9e9] | 178 |
|
---|
[555dcb4a] | 179 | ln -sfv ../../lib/$(readlink /lib/libbtrfs.so) /usr/lib/libbtrfs.so &&
|
---|
[2565779] | 180 | ln -sfv ../../lib/$(readlink /lib/libbtrfsutil.so) /usr/lib/libbtrfsutil.so &&
|
---|
| 181 | rm -fv /lib/libbtrfs.{a,so} /lib/libbtrfsutil.{a,so} &&
|
---|
[f50481de] | 182 | mv -v /bin/{mkfs,fsck}.btrfs /sbin</userinput></screen>
|
---|
[1f1a9e9] | 183 |
|
---|
| 184 | </sect2>
|
---|
| 185 |
|
---|
| 186 | <sect2 role="commands">
|
---|
| 187 | <title>Command Explanations</title>
|
---|
| 188 |
|
---|
[29244b7] | 189 | <para>
|
---|
| 190 | <option>--disable-documentation</option>: This option
|
---|
| 191 | is needed if the recommended dependencies are not installed.
|
---|
| 192 | </para>
|
---|
[61439d5] | 193 |
|
---|
[29244b7] | 194 | <para>
|
---|
| 195 | <command>mv tests/{cli,convert,misc,fuzz}-tests/ ...</command>: Disables
|
---|
| 196 | tests that fail and prevent tests from completing.
|
---|
| 197 | </para>
|
---|
[32bc8e4c] | 198 |
|
---|
[29244b7] | 199 | <para>
|
---|
| 200 | <command>ln -s ... /usr/lib/libbtrfs.so</command>: Creates a
|
---|
| 201 | symbolic link in the directory where it is expected.
|
---|
| 202 | </para>
|
---|
[1f1a9e9] | 203 |
|
---|
[29244b7] | 204 | <para>
|
---|
| 205 | <command>rm /lib/libbtrfs.{a,so}</command>: Removes unneeded
|
---|
| 206 | library entries.
|
---|
| 207 | </para>
|
---|
[1f1a9e9] | 208 |
|
---|
| 209 | </sect2>
|
---|
| 210 |
|
---|
| 211 | <sect2 role="content">
|
---|
| 212 | <title>Contents</title>
|
---|
| 213 |
|
---|
| 214 | <segmentedlist>
|
---|
| 215 | <segtitle>Installed Programs</segtitle>
|
---|
| 216 | <segtitle>Installed Libraries</segtitle>
|
---|
| 217 | <segtitle>Installed Directories</segtitle>
|
---|
| 218 |
|
---|
| 219 | <seglistitem>
|
---|
| 220 | <seg>
|
---|
| 221 | btrfs,
|
---|
| 222 | btrfs-convert,
|
---|
| 223 | btrfs-find-root,
|
---|
| 224 | btrfs-image,
|
---|
| 225 | btrfs-map-logical,
|
---|
| 226 | btrfs-select-super,
|
---|
| 227 | btrfsck (link to btrfs),
|
---|
| 228 | btrfstune,
|
---|
| 229 | fsck.btrfs, and
|
---|
| 230 | mkfs.btrfs
|
---|
| 231 | </seg>
|
---|
| 232 |
|
---|
[5d01724] | 233 | <seg>
|
---|
| 234 | libbtrfs.so and
|
---|
| 235 | libbtrfsutil.so
|
---|
| 236 | </seg>
|
---|
[1f1a9e9] | 237 |
|
---|
| 238 | <seg>/usr/include/btrfs</seg>
|
---|
| 239 | </seglistitem>
|
---|
| 240 | </segmentedlist>
|
---|
| 241 |
|
---|
| 242 | <variablelist>
|
---|
| 243 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 244 | <?dbfo list-presentation="list"?>
|
---|
| 245 | <?dbhtml list-presentation="table"?>
|
---|
| 246 |
|
---|
| 247 | <varlistentry id="btrfs-prog">
|
---|
| 248 | <term><command>btrfs</command></term>
|
---|
| 249 | <listitem>
|
---|
| 250 | <para>
|
---|
| 251 | is the main interface into btrfs filesystem operations.
|
---|
| 252 | </para>
|
---|
| 253 | <indexterm zone="btrfs-progs btrfs-prog">
|
---|
| 254 | <primary sortas="b-btrfs">btrfs</primary>
|
---|
| 255 | </indexterm>
|
---|
| 256 | </listitem>
|
---|
| 257 | </varlistentry>
|
---|
| 258 |
|
---|
[292a840] | 259 | <varlistentry id="btrfs-convert">
|
---|
| 260 | <term><command>btrfs-convert</command></term>
|
---|
| 261 | <listitem>
|
---|
| 262 | <para>
|
---|
[4163b584] | 263 | converts from an ext2/3/4 filesystem to btrfs.
|
---|
[292a840] | 264 | </para>
|
---|
| 265 | <indexterm zone="btrfs-progs btrfs-convert">
|
---|
| 266 | <primary sortas="b-btrfs-convert">btrfs-convert</primary>
|
---|
| 267 | </indexterm>
|
---|
| 268 | </listitem>
|
---|
| 269 | </varlistentry>
|
---|
| 270 |
|
---|
| 271 | <varlistentry id="btrfs-find-root">
|
---|
| 272 | <term><command>btrfs-find-root</command></term>
|
---|
| 273 | <listitem>
|
---|
| 274 | <para>
|
---|
| 275 | is a filter to find btrfs root.
|
---|
| 276 | </para>
|
---|
| 277 | <indexterm zone="btrfs-progs btrfs-find-root">
|
---|
| 278 | <primary sortas="b-btrfs-find-root">btrfs-find-root</primary>
|
---|
| 279 | </indexterm>
|
---|
| 280 | </listitem>
|
---|
| 281 | </varlistentry>
|
---|
| 282 |
|
---|
| 283 | <varlistentry id="btrfs-map-logical">
|
---|
| 284 | <term><command>btrfs-map-logical</command></term>
|
---|
| 285 | <listitem>
|
---|
| 286 | <para>
|
---|
| 287 | maps btrfs logical extent to physical extent.
|
---|
| 288 | </para>
|
---|
| 289 | <indexterm zone="btrfs-progs btrfs-map-logical">
|
---|
| 290 | <primary sortas="b-btrfs-map-logical">btrfs-map-logical</primary>
|
---|
| 291 | </indexterm>
|
---|
| 292 | </listitem>
|
---|
| 293 | </varlistentry>
|
---|
| 294 |
|
---|
| 295 | <varlistentry id="btrfs-select-super">
|
---|
| 296 | <term><command>btrfs-select-super</command></term>
|
---|
| 297 | <listitem>
|
---|
| 298 | <para>
|
---|
[4163b584] | 299 | overwrites the primary superblock with a backup copy.
|
---|
[292a840] | 300 | </para>
|
---|
| 301 | <indexterm zone="btrfs-progs btrfs-select-super">
|
---|
| 302 | <primary sortas="b-btrfs-select-super">btrfs-select-super</primary>
|
---|
| 303 | </indexterm>
|
---|
| 304 | </listitem>
|
---|
| 305 | </varlistentry>
|
---|
| 306 |
|
---|
| 307 | <varlistentry id="btrfstune">
|
---|
| 308 | <term><command>btrfstune</command></term>
|
---|
| 309 | <listitem>
|
---|
| 310 | <para>
|
---|
| 311 | tunes various filesystem parameters.
|
---|
| 312 | </para>
|
---|
| 313 | <indexterm zone="btrfs-progs btrfstune">
|
---|
| 314 | <primary sortas="b-btrfstune">btrfstune</primary>
|
---|
| 315 | </indexterm>
|
---|
| 316 | </listitem>
|
---|
| 317 | </varlistentry>
|
---|
| 318 |
|
---|
[1f1a9e9] | 319 | <varlistentry id="fsck.btrfs">
|
---|
| 320 | <term><command>fsck.btrfs</command></term>
|
---|
| 321 | <listitem>
|
---|
| 322 | <para>
|
---|
| 323 | does nothing, but is present for consistency with fstab.
|
---|
| 324 | </para>
|
---|
| 325 | <indexterm zone="btrfs-progs fsck.btrfs">
|
---|
| 326 | <primary sortas="b-fsck.btrfs">fsck.btrfs</primary>
|
---|
| 327 | </indexterm>
|
---|
| 328 | </listitem>
|
---|
| 329 | </varlistentry>
|
---|
| 330 |
|
---|
| 331 | <varlistentry id="mkfs.btrfs">
|
---|
| 332 | <term><command>mkfs.btrfs</command></term>
|
---|
| 333 | <listitem>
|
---|
[29244b7] | 334 | <para>
|
---|
| 335 | creates a btrfs file system.
|
---|
| 336 | </para>
|
---|
[1f1a9e9] | 337 | <indexterm zone="btrfs-progs mkfs.btrfs">
|
---|
| 338 | <primary sortas="b-mkfs.btrfs">mkfs.btrfs</primary>
|
---|
| 339 | </indexterm>
|
---|
| 340 | </listitem>
|
---|
| 341 | </varlistentry>
|
---|
| 342 |
|
---|
| 343 | </variablelist>
|
---|
| 344 |
|
---|
| 345 | </sect2>
|
---|
| 346 |
|
---|
| 347 | </sect1>
|
---|