source: postlfs/filesystems/btrfs-progs.xml@ 85ac148

11.0 11.1 11.2 11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 85ac148 was 85ac148, checked in by Pierre Labastie <pieere@…>, 3 years ago

Remove some dependencies on python2, and use a new method for running tests
in btrfs-progs

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@24332 af4574ff-66df-0310-9fd7-8a98e5e911e0

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