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
RevLine 
[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)">
[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 ---&gt;
106 &lt;*/M&gt; Btrfs filesystem support [CONFIG_BTRFS_FS]</literal></screen>
107
[29244b7]108 <note>
109 <para>
[85ac148]110 CONFIG_BTRFS_FS_POSIX_ACL,
111 CONFIG_REISERFS_FS_XATTR, and
112 CONFIG_REISERFS_FS_POSIX_ACL are required for some tests.
[29244b7]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 &amp;&amp;
[1f1a9e9]135make</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>
[85ac148]148<!-- Keeping this for now, but it seems that calling "make test" is
149 simpler and does the same thing
[29244b7]150 <para>
[85ac148]151 Before running tests, build a support program
152 and disable several that fail:
[29244b7]153 </para>
[1f1a9e9]154
[85ac148]155<screen remap="test"><userinput>make fssum</userinput></screen>
[32bc8e4c]156
[29244b7]157 <para>
158 To test the results, issue (as the <systemitem
159 class="username">root</systemitem> user):
160 </para>
[32bc8e4c]161
[5af02b37]162<screen role="root" remap="test"><userinput>pushd tests
[85ac148]163 ./fsck-tests.sh
164 ./mkfs-tests.sh
165 ./cli-tests.sh
166 ./convert-tests.sh
167 ./misc-tests.sh
168 ./fuzz-tests.sh
[32bc8e4c]169popd</userinput></screen>
[85ac148]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>
[32bc8e4c]193
[29244b7]194 <para>
195 Install the package as the <systemitem
196 class="username">root</systemitem> user:
197 </para>
[1f1a9e9]198
[01e86d88]199<screen role="root"><userinput>make install &amp;&amp;
[1f1a9e9]200
[555dcb4a]201ln -sfv ../../lib/$(readlink /lib/libbtrfs.so) /usr/lib/libbtrfs.so &amp;&amp;
[2565779]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;
[f50481de]204mv -v /bin/{mkfs,fsck}.btrfs /sbin</userinput></screen>
[1f1a9e9]205
206 </sect2>
207
208 <sect2 role="commands">
209 <title>Command Explanations</title>
210
[29244b7]211 <para>
212 <option>--disable-documentation</option>: This option
213 is needed if the recommended dependencies are not installed.
214 </para>
[85ac148]215<!-- not anymore in the commands
[29244b7]216 <para>
217 <command>mv tests/{cli,convert,misc,fuzz}-tests/ ...</command>: Disables
218 tests that fail and prevent tests from completing.
219 </para>
[85ac148]220-->
[29244b7]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>
[1f1a9e9]225
[29244b7]226 <para>
227 <command>rm /lib/libbtrfs.{a,so}</command>: Removes unneeded
228 library entries.
229 </para>
[1f1a9e9]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
[5d01724]255 <seg>
256 libbtrfs.so and
257 libbtrfsutil.so
258 </seg>
[1f1a9e9]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>
[4c24eb0a]273 is the main interface into btrfs filesystem operations
[1f1a9e9]274 </para>
275 <indexterm zone="btrfs-progs btrfs-prog">
276 <primary sortas="b-btrfs">btrfs</primary>
277 </indexterm>
278 </listitem>
279 </varlistentry>
280
[292a840]281 <varlistentry id="btrfs-convert">
282 <term><command>btrfs-convert</command></term>
283 <listitem>
284 <para>
[4c24eb0a]285 converts from an ext2/3/4 filesystem to btrfs
[292a840]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>
[4c24eb0a]297 is a filter to find btrfs root
[292a840]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>
[4c24eb0a]309 maps btrfs logical extent to physical extent
[292a840]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>
[4c24eb0a]321 overwrites the primary superblock with a backup copy
[292a840]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>
[4c24eb0a]333 tunes various filesystem parameters
[292a840]334 </para>
335 <indexterm zone="btrfs-progs btrfstune">
336 <primary sortas="b-btrfstune">btrfstune</primary>
337 </indexterm>
338 </listitem>
339 </varlistentry>
340
[1f1a9e9]341 <varlistentry id="fsck.btrfs">
342 <term><command>fsck.btrfs</command></term>
343 <listitem>
344 <para>
[4c24eb0a]345 does nothing, but is present for consistency with fstab
[1f1a9e9]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>
[29244b7]356 <para>
[4c24eb0a]357 creates a btrfs file system
[29244b7]358 </para>
[1f1a9e9]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.