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 |
|
---|
7 | <!ENTITY btrfs-progs-download-http "&kernel-dl;/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-v&btrfs-progs-version;.tar.xz">
|
---|
8 | <!ENTITY btrfs-progs-download-ftp " ">
|
---|
9 | <!ENTITY btrfs-progs-md5sum "d7a4598d58fc91d49ee8e7c342b3b919">
|
---|
10 | <!ENTITY btrfs-progs-size "1.9 MB">
|
---|
11 | <!ENTITY btrfs-progs-buildsize "51 MB (add 160 MB for tests)">
|
---|
12 | <!ENTITY btrfs-progs-time "0.4 SBU (add 10 SBU for tests)">
|
---|
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 |
|
---|
32 | <para>The <application>btrfs-progs</application> package contains administration
|
---|
33 | and debugging tools for the B-tree file system (btrfs).</para>
|
---|
34 |
|
---|
35 | &lfs82_checked;
|
---|
36 |
|
---|
37 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
38 | <itemizedlist spacing="compact">
|
---|
39 | <listitem>
|
---|
40 | <para>Download (HTTP): <ulink url="&btrfs-progs-download-http;"/></para>
|
---|
41 | </listitem>
|
---|
42 | <listitem>
|
---|
43 | <para>Download (FTP): <ulink url="&btrfs-progs-download-ftp;"/></para>
|
---|
44 | </listitem>
|
---|
45 | <listitem>
|
---|
46 | <para>Download MD5 sum: &btrfs-progs-md5sum;</para>
|
---|
47 | </listitem>
|
---|
48 | <listitem>
|
---|
49 | <para>Download size: &btrfs-progs-size;</para>
|
---|
50 | </listitem>
|
---|
51 | <listitem>
|
---|
52 | <para>Estimated disk space required: &btrfs-progs-buildsize;</para>
|
---|
53 | </listitem>
|
---|
54 | <listitem>
|
---|
55 | <para>Estimated build time: &btrfs-progs-time;</para>
|
---|
56 | </listitem>
|
---|
57 | </itemizedlist>
|
---|
58 |
|
---|
59 | <bridgehead renderas="sect3">Btrfs-progs Dependencies</bridgehead>
|
---|
60 |
|
---|
61 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
62 | <para role="required">
|
---|
63 | <xref linkend="lzo"/>
|
---|
64 | </para>
|
---|
65 |
|
---|
66 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
67 | <para role="recommended">
|
---|
68 | <xref linkend="asciidoc"/> and
|
---|
69 | <xref linkend="xmlto"/> (both required to generate man pages)
|
---|
70 | </para>
|
---|
71 |
|
---|
72 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
73 | <para role="optional">
|
---|
74 | <xref linkend="lvm2"/> (<command>dmsetup</command> is used in tests),
|
---|
75 | <xref linkend="reiserfs"/> (for tests), and
|
---|
76 | <ulink url='https://github.com/facebook/zstd/releases/'>zstd</ulink> (for tests)
|
---|
77 | </para>
|
---|
78 |
|
---|
79 | <para condition="html" role="usernotes">User Notes:
|
---|
80 | <ulink url="&blfs-wiki;/xfs"/></para>
|
---|
81 |
|
---|
82 | </sect2>
|
---|
83 |
|
---|
84 | <sect2 role="kernel" id="btrfs-progs-kernel">
|
---|
85 | <title>Kernel Configuration</title>
|
---|
86 |
|
---|
87 | <para>Enable the following option in the kernel configuration
|
---|
88 | and recompile the kernel:</para>
|
---|
89 |
|
---|
90 | <screen><literal>File systems --->
|
---|
91 | <*/M> Btrfs filesystem support [CONFIG_BTRFS_FS]</literal></screen>
|
---|
92 |
|
---|
93 | <note><para>CONFIG_BTRFS_FS_POSIX_ACL and
|
---|
94 | CONFIG_REISERFS_FS_XATTR are required for some tests.
|
---|
95 | Other Btrfs options in the kernel are optional.</para></note>
|
---|
96 |
|
---|
97 | <indexterm zone="btrfs-progs btrfs-progs-kernel">
|
---|
98 | <primary sortas="d-btrfs-progs">BTRFS Programs</primary>
|
---|
99 | </indexterm>
|
---|
100 |
|
---|
101 | </sect2>
|
---|
102 |
|
---|
103 | <sect2 role="installation">
|
---|
104 | <title>Installation of btrfs-progs</title>
|
---|
105 |
|
---|
106 | <para>Install <application>btrfs-progs</application> by running the following
|
---|
107 | commands:</para>
|
---|
108 |
|
---|
109 | <screen><userinput>sed -i '40,107 s/\.gz//g' Documentation/Makefile.in &&
|
---|
110 |
|
---|
111 | ./configure --prefix=/usr \
|
---|
112 | --bindir=/bin \
|
---|
113 | --libdir=/lib \
|
---|
114 | --disable-zstd &&
|
---|
115 | make</userinput></screen>
|
---|
116 |
|
---|
117 | <para>Before running tests, build a support program and
|
---|
118 | disable several that fail:</para>
|
---|
119 |
|
---|
120 | <screen><userinput>make fssum &&
|
---|
121 |
|
---|
122 | sed -i '/found/s/^/: #/' tests/convert-tests.sh &&
|
---|
123 |
|
---|
124 | mv tests/mkfs-tests/013-reserved-1M-for-single/test.sh{,.broken} &&
|
---|
125 | mv tests/convert-tests/010-reiserfs-basic/test.sh{,.broken} &&
|
---|
126 | mv tests/convert-tests/011-reiserfs-delete-all-rollback/test.sh{,.broken} &&
|
---|
127 | mv tests/convert-tests/012-reiserfs-large-hole-extent/test.sh{,.broken} &&
|
---|
128 | mv tests/convert-tests/013-reiserfs-common-inode-flags/test.sh{,.broken} &&
|
---|
129 | mv tests/convert-tests/014-reiserfs-tail-handling/test.sh{,.broken} &&
|
---|
130 | mv tests/misc-tests/025-zstd-compression/test.sh{,.broken} &&
|
---|
131 | mv tests/fuzz-tests/003-multi-check-unmounted/test.sh{,.broken} &&
|
---|
132 | mv tests/fuzz-tests/009-simple-zero-log/test.sh{,.broken}</userinput></screen>
|
---|
133 |
|
---|
134 | <para>To test the results, issue (as the <systemitem
|
---|
135 | class="username">root</systemitem> user): </para>
|
---|
136 |
|
---|
137 | <screen><userinput>pushd tests
|
---|
138 | ./fsck-tests.sh
|
---|
139 | ./mkfs-tests.sh
|
---|
140 | ./cli-tests.sh
|
---|
141 | ./convert-tests.sh
|
---|
142 | ./misc-tests.sh
|
---|
143 | ./fuzz-tests.sh
|
---|
144 | popd</userinput></screen>
|
---|
145 |
|
---|
146 | <para>Install the package as the <systemitem
|
---|
147 | class="username">root</systemitem> user:</para>
|
---|
148 |
|
---|
149 | <screen role="root"><userinput>make install &&
|
---|
150 |
|
---|
151 | ln -sfv ../../lib/$(readlink /lib/libbtrfs.so) /usr/lib/libbtrfs.so &&
|
---|
152 | ln -sfv ../../lib/$(readlink /lib/libbtrfsutil.so) /usr/lib/libbtrfsutil.so &&
|
---|
153 | rm -fv /lib/libbtrfs.{a,so} /lib/libbtrfsutil.{a,so} &&
|
---|
154 | mv -v /bin/{mkfs,fsck}.btrfs /sbin</userinput></screen>
|
---|
155 |
|
---|
156 | </sect2>
|
---|
157 |
|
---|
158 | <sect2 role="commands">
|
---|
159 | <title>Command Explanations</title>
|
---|
160 |
|
---|
161 | <para><command>sed ... Documentation/Makefile.in</command>: Disables
|
---|
162 | compressing man pages to be consistent with the rest of BLFS.</para>
|
---|
163 |
|
---|
164 | <para><option>--disable-documentation</option>: This option
|
---|
165 | is needed if the recommended dependencies are not installed.</para>
|
---|
166 |
|
---|
167 | <para><command>mv tests/{cli,convert,misc,fuzz}-tests/ ...</command>: Disables
|
---|
168 | tests that fail and prevent tests from completing.</para>
|
---|
169 |
|
---|
170 | <para><command>ln -s ... /usr/lib/libbtrfs.so</command>: Creates a
|
---|
171 | symbolic link in the directory where it is expected.</para>
|
---|
172 |
|
---|
173 | <para><command>rm /lib/libbtrfs.{a,so}</command>: Removes unneeded
|
---|
174 | library entries.</para>
|
---|
175 |
|
---|
176 | </sect2>
|
---|
177 |
|
---|
178 | <sect2 role="content">
|
---|
179 | <title>Contents</title>
|
---|
180 |
|
---|
181 | <segmentedlist>
|
---|
182 | <segtitle>Installed Programs</segtitle>
|
---|
183 | <segtitle>Installed Libraries</segtitle>
|
---|
184 | <segtitle>Installed Directories</segtitle>
|
---|
185 |
|
---|
186 | <seglistitem>
|
---|
187 | <seg>
|
---|
188 | btrfs,
|
---|
189 | btrfs-convert,
|
---|
190 | btrfs-debug-tree,
|
---|
191 | btrfs-find-root,
|
---|
192 | btrfs-image,
|
---|
193 | btrfs-map-logical,
|
---|
194 | btrfs-select-super,
|
---|
195 | btrfs-zero-log,
|
---|
196 | btrfsck (link to btrfs),
|
---|
197 | btrfstune,
|
---|
198 | fsck.btrfs, and
|
---|
199 | mkfs.btrfs
|
---|
200 | </seg>
|
---|
201 |
|
---|
202 | <seg>libbtrfs.so</seg>
|
---|
203 |
|
---|
204 | <seg>/usr/include/btrfs</seg>
|
---|
205 | </seglistitem>
|
---|
206 | </segmentedlist>
|
---|
207 |
|
---|
208 | <variablelist>
|
---|
209 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
210 | <?dbfo list-presentation="list"?>
|
---|
211 | <?dbhtml list-presentation="table"?>
|
---|
212 |
|
---|
213 | <varlistentry id="btrfs-prog">
|
---|
214 | <term><command>btrfs</command></term>
|
---|
215 | <listitem>
|
---|
216 | <para>
|
---|
217 | is the main interface into btrfs filesystem operations.
|
---|
218 | </para>
|
---|
219 | <indexterm zone="btrfs-progs btrfs-prog">
|
---|
220 | <primary sortas="b-btrfs">btrfs</primary>
|
---|
221 | </indexterm>
|
---|
222 | </listitem>
|
---|
223 | </varlistentry>
|
---|
224 |
|
---|
225 | <varlistentry id="btrfs-convert">
|
---|
226 | <term><command>btrfs-convert</command></term>
|
---|
227 | <listitem>
|
---|
228 | <para>
|
---|
229 | converts from ext2/3/4 filesystem to btrfs.
|
---|
230 | </para>
|
---|
231 | <indexterm zone="btrfs-progs btrfs-convert">
|
---|
232 | <primary sortas="b-btrfs-convert">btrfs-convert</primary>
|
---|
233 | </indexterm>
|
---|
234 | </listitem>
|
---|
235 | </varlistentry>
|
---|
236 |
|
---|
237 | <varlistentry id="btrfs-debug-tree">
|
---|
238 | <term><command>btrfs-debug-tree</command></term>
|
---|
239 | <listitem>
|
---|
240 | <para>
|
---|
241 | queries various internal information.
|
---|
242 | </para>
|
---|
243 | <indexterm zone="btrfs-progs btrfs-debug-tree">
|
---|
244 | <primary sortas="b-btrfs-debug-tree">btrfs-debug-tree</primary>
|
---|
245 | </indexterm>
|
---|
246 | </listitem>
|
---|
247 | </varlistentry>
|
---|
248 |
|
---|
249 | <varlistentry id="btrfs-find-root">
|
---|
250 | <term><command>btrfs-find-root</command></term>
|
---|
251 | <listitem>
|
---|
252 | <para>
|
---|
253 | is a filter to find btrfs root.
|
---|
254 | </para>
|
---|
255 | <indexterm zone="btrfs-progs btrfs-find-root">
|
---|
256 | <primary sortas="b-btrfs-find-root">btrfs-find-root</primary>
|
---|
257 | </indexterm>
|
---|
258 | </listitem>
|
---|
259 | </varlistentry>
|
---|
260 |
|
---|
261 | <varlistentry id="btrfs-map-logical">
|
---|
262 | <term><command>btrfs-map-logical</command></term>
|
---|
263 | <listitem>
|
---|
264 | <para>
|
---|
265 | maps btrfs logical extent to physical extent.
|
---|
266 | </para>
|
---|
267 | <indexterm zone="btrfs-progs btrfs-map-logical">
|
---|
268 | <primary sortas="b-btrfs-map-logical">btrfs-map-logical</primary>
|
---|
269 | </indexterm>
|
---|
270 | </listitem>
|
---|
271 | </varlistentry>
|
---|
272 |
|
---|
273 | <varlistentry id="btrfs-select-super">
|
---|
274 | <term><command>btrfs-select-super</command></term>
|
---|
275 | <listitem>
|
---|
276 | <para>
|
---|
277 | overwrites primary superblock with a backup copy.
|
---|
278 | </para>
|
---|
279 | <indexterm zone="btrfs-progs btrfs-select-super">
|
---|
280 | <primary sortas="b-btrfs-select-super">btrfs-select-super</primary>
|
---|
281 | </indexterm>
|
---|
282 | </listitem>
|
---|
283 | </varlistentry>
|
---|
284 |
|
---|
285 | <varlistentry id="btrfs-zero-log">
|
---|
286 | <term><command>btrfs-zero-log</command></term>
|
---|
287 | <listitem>
|
---|
288 | <para>
|
---|
289 | recovers a damaged btrfs filesystem.
|
---|
290 | </para>
|
---|
291 | <indexterm zone="btrfs-progs btrfs-zero-log">
|
---|
292 | <primary sortas="b-btrfs-zero-log">btrfs-zero-log</primary>
|
---|
293 | </indexterm>
|
---|
294 | </listitem>
|
---|
295 | </varlistentry>
|
---|
296 |
|
---|
297 | <varlistentry id="btrfstune">
|
---|
298 | <term><command>btrfstune</command></term>
|
---|
299 | <listitem>
|
---|
300 | <para>
|
---|
301 | tunes various filesystem parameters.
|
---|
302 | </para>
|
---|
303 | <indexterm zone="btrfs-progs btrfstune">
|
---|
304 | <primary sortas="b-btrfstune">btrfstune</primary>
|
---|
305 | </indexterm>
|
---|
306 | </listitem>
|
---|
307 | </varlistentry>
|
---|
308 |
|
---|
309 | <varlistentry id="fsck.btrfs">
|
---|
310 | <term><command>fsck.btrfs</command></term>
|
---|
311 | <listitem>
|
---|
312 | <para>
|
---|
313 | does nothing, but is present for consistency with fstab.
|
---|
314 | </para>
|
---|
315 | <indexterm zone="btrfs-progs fsck.btrfs">
|
---|
316 | <primary sortas="b-fsck.btrfs">fsck.btrfs</primary>
|
---|
317 | </indexterm>
|
---|
318 | </listitem>
|
---|
319 | </varlistentry>
|
---|
320 |
|
---|
321 | <varlistentry id="mkfs.btrfs">
|
---|
322 | <term><command>mkfs.btrfs</command></term>
|
---|
323 | <listitem>
|
---|
324 | <para>creates a btrfs file system.</para>
|
---|
325 | <indexterm zone="btrfs-progs mkfs.btrfs">
|
---|
326 | <primary sortas="b-mkfs.btrfs">mkfs.btrfs</primary>
|
---|
327 | </indexterm>
|
---|
328 | </listitem>
|
---|
329 | </varlistentry>
|
---|
330 |
|
---|
331 | </variablelist>
|
---|
332 |
|
---|
333 | </sect2>
|
---|
334 |
|
---|
335 | </sect1>
|
---|