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 "130be469ced99b01948af64b6a6312f6">
|
---|
10 | <!ENTITY btrfs-progs-size "2.0 MB">
|
---|
11 | <!ENTITY btrfs-progs-buildsize "78 MB (add 6 MB for tests)">
|
---|
12 | <!ENTITY btrfs-progs-time "0.4 SBU (add 6.4 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 | &lfs83_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/004-shrink-fs/test.sh{,.broken} &&
|
---|
131 | mv tests/misc-tests/013-subvolume-sync-crash/test.sh{,.broken} &&
|
---|
132 | mv tests/misc-tests/025-zstd-compression/test.sh{,.broken} &&
|
---|
133 | mv tests/fuzz-tests/003-multi-check-unmounted/test.sh{,.broken} &&
|
---|
134 | mv tests/fuzz-tests/009-simple-zero-log/test.sh{,.broken}</userinput></screen>
|
---|
135 |
|
---|
136 | <para>To test the results, issue (as the <systemitem
|
---|
137 | class="username">root</systemitem> user): </para>
|
---|
138 |
|
---|
139 | <screen><userinput>pushd tests
|
---|
140 | ./fsck-tests.sh
|
---|
141 | ./mkfs-tests.sh
|
---|
142 | ./cli-tests.sh
|
---|
143 | ./convert-tests.sh
|
---|
144 | ./misc-tests.sh
|
---|
145 | ./fuzz-tests.sh
|
---|
146 | popd</userinput></screen>
|
---|
147 |
|
---|
148 | <para>Install the package as the <systemitem
|
---|
149 | class="username">root</systemitem> user:</para>
|
---|
150 |
|
---|
151 | <screen role="root"><userinput>make install &&
|
---|
152 |
|
---|
153 | ln -sfv ../../lib/$(readlink /lib/libbtrfs.so) /usr/lib/libbtrfs.so &&
|
---|
154 | ln -sfv ../../lib/$(readlink /lib/libbtrfsutil.so) /usr/lib/libbtrfsutil.so &&
|
---|
155 | rm -fv /lib/libbtrfs.{a,so} /lib/libbtrfsutil.{a,so} &&
|
---|
156 | mv -v /bin/{mkfs,fsck}.btrfs /sbin</userinput></screen>
|
---|
157 |
|
---|
158 | </sect2>
|
---|
159 |
|
---|
160 | <sect2 role="commands">
|
---|
161 | <title>Command Explanations</title>
|
---|
162 |
|
---|
163 | <para><command>sed ... Documentation/Makefile.in</command>: Disables
|
---|
164 | compressing man pages to be consistent with the rest of BLFS.</para>
|
---|
165 |
|
---|
166 | <para><option>--disable-documentation</option>: This option
|
---|
167 | is needed if the recommended dependencies are not installed.</para>
|
---|
168 |
|
---|
169 | <para><command>mv tests/{cli,convert,misc,fuzz}-tests/ ...</command>: Disables
|
---|
170 | tests that fail and prevent tests from completing.</para>
|
---|
171 |
|
---|
172 | <para><command>ln -s ... /usr/lib/libbtrfs.so</command>: Creates a
|
---|
173 | symbolic link in the directory where it is expected.</para>
|
---|
174 |
|
---|
175 | <para><command>rm /lib/libbtrfs.{a,so}</command>: Removes unneeded
|
---|
176 | library entries.</para>
|
---|
177 |
|
---|
178 | </sect2>
|
---|
179 |
|
---|
180 | <sect2 role="content">
|
---|
181 | <title>Contents</title>
|
---|
182 |
|
---|
183 | <segmentedlist>
|
---|
184 | <segtitle>Installed Programs</segtitle>
|
---|
185 | <segtitle>Installed Libraries</segtitle>
|
---|
186 | <segtitle>Installed Directories</segtitle>
|
---|
187 |
|
---|
188 | <seglistitem>
|
---|
189 | <seg>
|
---|
190 | btrfs,
|
---|
191 | btrfs-convert,
|
---|
192 | btrfs-debug-tree,
|
---|
193 | btrfs-find-root,
|
---|
194 | btrfs-image,
|
---|
195 | btrfs-map-logical,
|
---|
196 | btrfs-select-super,
|
---|
197 | btrfs-zero-log,
|
---|
198 | btrfsck (link to btrfs),
|
---|
199 | btrfstune,
|
---|
200 | fsck.btrfs, and
|
---|
201 | mkfs.btrfs
|
---|
202 | </seg>
|
---|
203 |
|
---|
204 | <seg>libbtrfs.so</seg>
|
---|
205 |
|
---|
206 | <seg>/usr/include/btrfs</seg>
|
---|
207 | </seglistitem>
|
---|
208 | </segmentedlist>
|
---|
209 |
|
---|
210 | <variablelist>
|
---|
211 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
212 | <?dbfo list-presentation="list"?>
|
---|
213 | <?dbhtml list-presentation="table"?>
|
---|
214 |
|
---|
215 | <varlistentry id="btrfs-prog">
|
---|
216 | <term><command>btrfs</command></term>
|
---|
217 | <listitem>
|
---|
218 | <para>
|
---|
219 | is the main interface into btrfs filesystem operations.
|
---|
220 | </para>
|
---|
221 | <indexterm zone="btrfs-progs btrfs-prog">
|
---|
222 | <primary sortas="b-btrfs">btrfs</primary>
|
---|
223 | </indexterm>
|
---|
224 | </listitem>
|
---|
225 | </varlistentry>
|
---|
226 |
|
---|
227 | <varlistentry id="btrfs-convert">
|
---|
228 | <term><command>btrfs-convert</command></term>
|
---|
229 | <listitem>
|
---|
230 | <para>
|
---|
231 | converts from ext2/3/4 filesystem to btrfs.
|
---|
232 | </para>
|
---|
233 | <indexterm zone="btrfs-progs btrfs-convert">
|
---|
234 | <primary sortas="b-btrfs-convert">btrfs-convert</primary>
|
---|
235 | </indexterm>
|
---|
236 | </listitem>
|
---|
237 | </varlistentry>
|
---|
238 |
|
---|
239 | <varlistentry id="btrfs-debug-tree">
|
---|
240 | <term><command>btrfs-debug-tree</command></term>
|
---|
241 | <listitem>
|
---|
242 | <para>
|
---|
243 | queries various internal information.
|
---|
244 | </para>
|
---|
245 | <indexterm zone="btrfs-progs btrfs-debug-tree">
|
---|
246 | <primary sortas="b-btrfs-debug-tree">btrfs-debug-tree</primary>
|
---|
247 | </indexterm>
|
---|
248 | </listitem>
|
---|
249 | </varlistentry>
|
---|
250 |
|
---|
251 | <varlistentry id="btrfs-find-root">
|
---|
252 | <term><command>btrfs-find-root</command></term>
|
---|
253 | <listitem>
|
---|
254 | <para>
|
---|
255 | is a filter to find btrfs root.
|
---|
256 | </para>
|
---|
257 | <indexterm zone="btrfs-progs btrfs-find-root">
|
---|
258 | <primary sortas="b-btrfs-find-root">btrfs-find-root</primary>
|
---|
259 | </indexterm>
|
---|
260 | </listitem>
|
---|
261 | </varlistentry>
|
---|
262 |
|
---|
263 | <varlistentry id="btrfs-map-logical">
|
---|
264 | <term><command>btrfs-map-logical</command></term>
|
---|
265 | <listitem>
|
---|
266 | <para>
|
---|
267 | maps btrfs logical extent to physical extent.
|
---|
268 | </para>
|
---|
269 | <indexterm zone="btrfs-progs btrfs-map-logical">
|
---|
270 | <primary sortas="b-btrfs-map-logical">btrfs-map-logical</primary>
|
---|
271 | </indexterm>
|
---|
272 | </listitem>
|
---|
273 | </varlistentry>
|
---|
274 |
|
---|
275 | <varlistentry id="btrfs-select-super">
|
---|
276 | <term><command>btrfs-select-super</command></term>
|
---|
277 | <listitem>
|
---|
278 | <para>
|
---|
279 | overwrites primary superblock with a backup copy.
|
---|
280 | </para>
|
---|
281 | <indexterm zone="btrfs-progs btrfs-select-super">
|
---|
282 | <primary sortas="b-btrfs-select-super">btrfs-select-super</primary>
|
---|
283 | </indexterm>
|
---|
284 | </listitem>
|
---|
285 | </varlistentry>
|
---|
286 |
|
---|
287 | <varlistentry id="btrfs-zero-log">
|
---|
288 | <term><command>btrfs-zero-log</command></term>
|
---|
289 | <listitem>
|
---|
290 | <para>
|
---|
291 | recovers a damaged btrfs filesystem.
|
---|
292 | </para>
|
---|
293 | <indexterm zone="btrfs-progs btrfs-zero-log">
|
---|
294 | <primary sortas="b-btrfs-zero-log">btrfs-zero-log</primary>
|
---|
295 | </indexterm>
|
---|
296 | </listitem>
|
---|
297 | </varlistentry>
|
---|
298 |
|
---|
299 | <varlistentry id="btrfstune">
|
---|
300 | <term><command>btrfstune</command></term>
|
---|
301 | <listitem>
|
---|
302 | <para>
|
---|
303 | tunes various filesystem parameters.
|
---|
304 | </para>
|
---|
305 | <indexterm zone="btrfs-progs btrfstune">
|
---|
306 | <primary sortas="b-btrfstune">btrfstune</primary>
|
---|
307 | </indexterm>
|
---|
308 | </listitem>
|
---|
309 | </varlistentry>
|
---|
310 |
|
---|
311 | <varlistentry id="fsck.btrfs">
|
---|
312 | <term><command>fsck.btrfs</command></term>
|
---|
313 | <listitem>
|
---|
314 | <para>
|
---|
315 | does nothing, but is present for consistency with fstab.
|
---|
316 | </para>
|
---|
317 | <indexterm zone="btrfs-progs fsck.btrfs">
|
---|
318 | <primary sortas="b-fsck.btrfs">fsck.btrfs</primary>
|
---|
319 | </indexterm>
|
---|
320 | </listitem>
|
---|
321 | </varlistentry>
|
---|
322 |
|
---|
323 | <varlistentry id="mkfs.btrfs">
|
---|
324 | <term><command>mkfs.btrfs</command></term>
|
---|
325 | <listitem>
|
---|
326 | <para>creates a btrfs file system.</para>
|
---|
327 | <indexterm zone="btrfs-progs mkfs.btrfs">
|
---|
328 | <primary sortas="b-mkfs.btrfs">mkfs.btrfs</primary>
|
---|
329 | </indexterm>
|
---|
330 | </listitem>
|
---|
331 | </varlistentry>
|
---|
332 |
|
---|
333 | </variablelist>
|
---|
334 |
|
---|
335 | </sect2>
|
---|
336 |
|
---|
337 | </sect1>
|
---|