123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
- "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
- <!ENTITY % general-entities SYSTEM "../general.ent">
- %general-entities;
- ]>
- <sect1 id="ch-system-e2fsprogs" role="wrap">
- <?dbhtml filename="e2fsprogs.html"?>
- <sect1info condition="script">
- <productname>e2fsprogs</productname>
- <productnumber>&e2fsprogs-version;</productnumber>
- <address>&e2fsprogs-url;</address>
- </sect1info>
- <title>E2fsprogs-&e2fsprogs-version;</title>
- <indexterm zone="ch-system-e2fsprogs">
- <primary sortas="a-E2fsprogs">E2fsprogs</primary>
- </indexterm>
- <sect2 role="package">
- <title/>
- <para>E2fsprogs 软件包包含处理
- <systemitem class="filesystem">ext2</systemitem> 文件系统的工具。
- 此外它也支持 <systemitem class="filesystem">ext3</systemitem> 和
- <systemitem class="filesystem">ext4</systemitem> 日志文件系统。</para>
- <segmentedlist>
- <segtitle>&buildtime;</segtitle>
- <segtitle>&diskspace;</segtitle>
- <seglistitem>
- <seg>&e2fsprogs-ch6-sbu;</seg>
- <seg>&e2fsprogs-ch6-du;</seg>
- </seglistitem>
- </segmentedlist>
- </sect2>
- <sect2 role="installation">
- <title>安装 E2fsprogs</title>
- <para>E2fsprogs 文档推荐在源代码目录树中的一个子目录中构建该软件包:
- </para>
- <screen><userinput remap="pre">mkdir -v build
- cd build</userinput></screen>
- <para>准备安装 E2fsprogs:</para>
- <!--<screen><userinput remap="configure">LIBS=-L/tools/lib \
- CFLAGS=-I/tools/include \
- CFLAGS=-I/tools/include \
- PKG_CONFIG_PATH=/tools/lib/pkgconfig \
- ../configure - -prefix=/usr \-->
- <screen><userinput remap="configure">../configure --prefix=/usr \
- --bindir=/bin \
- --with-root-prefix="" \
- --enable-elf-shlibs \
- --disable-libblkid \
- --disable-libuuid \
- --disable-uuidd \
- --disable-fsck</userinput></screen>
- <variablelist>
- <title>环境变量和配置选项的含义:</title>
- <!--
- <varlistentry>
- <term><parameter>PKG_CONFIG_PATH, LIBS, CFLAGS</parameter></term>
- <listitem>
- <para>这些变量使得 e2fsprog 在构建时使用之前构建的
- <xref linkend="ch-tools-util-linux"/> 软件包。</para>
- </listitem>
- </varlistentry>
- -->
- <varlistentry>
- <term><parameter>--with-root-prefix=""</parameter> 和
- <parameter>--bindir=/bin</parameter></term>
- <listitem>
- <para>某些程序(例如 <command>e2fsck</command>
- 程序)被认为是关键的。在
- <filename class="directory">/usr</filename> 尚未挂载等情况下,
- 这些程序仍然必须可用。它们应该放置在
- <filename class="directory">/lib</filename> 和 <filename
- class="directory">/sbin</filename> 等目录中。如果没有向
- e2fsprogs 配置脚本传递该参数,这些程序会被安装到
- <filename class="directory">/usr</filename> 目录。</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>--enable-elf-shlibs</parameter></term>
- <listitem>
- <para>该选项表示创建该软件包中一些程序使用的共享库。</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>--disable-*</parameter></term>
- <listitem>
- <para>该选项防止 e2fsprogs 构建和安装
- <systemitem class="library">libuuid</systemitem> 和
- <systemitem class="library">libblkid</systemitem> 库,
- <systemitem class="daemon">uuidd</systemitem> 守护程序,以及
- <command>fsck</command> 包装器, 因为 Util-linux 会安装更新的版本。
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- <para>编译该软件包:</para>
- <screen><userinput remap="make">make</userinput></screen>
- <!--
- <para>To set up and run the test suite we need to first link some
- libraries from /tools/lib to a location where the test programs look.
- To run the tests, issue:</para>
- -->
- <para>执行以下命令,以运行测试:</para>
- <screen><userinput remap="test">make check</userinput></screen>
- <!--ln -sfv /tools/lib/lib{blk,uu}id.so.1 lib -->
- <!--make LD_LIBRARY_PATH=/tools/lib check</userinput></screen>-->
- <!--para>One of the E2fsprogs tests will attempt to allocate 256 MB of memory.
- If you do not have significantly more RAM than this, be sure to enable
- sufficient swap space for the test. See <xref
- linkend="space-creatingfilesystem"/> and <xref linkend="space-mounting"/>
- for details on creating and enabling swap space.</para-->
- <para>某个 e2fsprogs 测试会试图分配 256MB 内存。
- 如果您的内存刚刚超过或者甚至不足这个大小,
- 一定要为测试启用足够的交换空间。
- 阅读 <xref linkend="space-creatingfilesystem"/>
- 和 <xref linkend="space-mounting"/>
- 了解创建和启用交换空间的详细过程。</para>
- <para>安装二进制程序、文档和共享库:</para>
- <screen><userinput remap="install">make install</userinput></screen>
- <para>安装静态库和头文件:</para>
- <screen><userinput remap="install">make install-libs</userinput></screen>
- <para>将安装好的静态库变为可写的,以便之后移除调试符号:</para>
- <screen><userinput remap="install">chmod -v u+w /usr/lib/{libcom_err,libe2p,libext2fs,libss}.a</userinput></screen>
- <para>该软件包安装了一个 gzip 压缩的
- <filename class="extension">.info</filename> 文件,却没有更新系统的
- <filename>dir</filename> 文件。执行以下命令解压该文件,并更新系统
- <filename>dir</filename> 文件:</para>
- <screen><userinput remap="install">gunzip -v /usr/share/info/libext2fs.info.gz
- install-info --dir-file=/usr/share/info/dir /usr/share/info/libext2fs.info</userinput></screen>
- <para>如果需要,执行以下命令创建并安装一些额外的文档:</para>
- <screen><userinput remap="install">makeinfo -o doc/com_err.info ../lib/et/com_err.texinfo
- install -v -m644 doc/com_err.info /usr/share/info
- install-info --dir-file=/usr/share/info/dir /usr/share/info/com_err.info</userinput></screen>
- </sect2>
- <sect2 id="contents-e2fsprogs" role="content">
- <title>E2fsprogs 的内容</title>
- <segmentedlist>
- <segtitle>安装的程序</segtitle>
- <segtitle>安装的库</segtitle>
- <segtitle>安装的目录</segtitle>
- <seglistitem>
- <seg>badblocks, chattr, compile_et, debugfs, dumpe2fs,e2freefrag,
- e2fsck, e2image, e2label, e2undo, e4defrag, filefrag, fsck.ext2,
- fsck.ext3, fsck.ext4, fsck.ext4dev, logsave, lsattr, mk_cmds, mke2fs,
- mkfs.ext2, mkfs.ext3, mkfs.ext4, mkfs.ext4dev, mklost+found,
- resize2fs, 以及 tune2fs</seg>
- <seg>libcom_err.so, libe2p.so, libext2fs.so, 以及 libss.so</seg>
- <seg>/usr/include/e2p, /usr/include/et, /usr/include/ext2fs,
- /usr/include/ss, /usr/share/et, 以及 /usr/share/ss</seg>
- </seglistitem>
- </segmentedlist>
- <variablelist>
- <bridgehead renderas="sect3">简要描述</bridgehead>
- <?dbfo list-presentation="list"?>
- <?dbhtml list-presentation="table"?>
- <varlistentry id="badblocks">
- <term><command>badblocks</command></term>
- <listitem>
- <para>在一个设备(一般是磁盘分区)上搜索坏块</para>
- <indexterm zone="ch-system-e2fsprogs badblocks">
- <primary sortas="b-badblocks">badblocks</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="chattr">
- <term><command>chattr</command></term>
- <listitem>
- <para>在 <systemitem class="filesystem">ext2</systemitem>
- 文件系统上修改文件属性,也适用于
- <systemitem class="filesystem">ext3</systemitem> 文件系统,
- 即<systemitem class="filesystem">ext2</systemitem>
- 文件系统的日志版本</para>
- <indexterm zone="ch-system-e2fsprogs chattr">
- <primary sortas="b-chattr">chattr</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="compile_et">
- <term><command>compile_et</command></term>
- <listitem>
- <para>一个错误表编译器;
- 它将包含错误编号名称和消息的表转化成 C 源代码,以和
- <filename class="libraryfile">com_err</filename>
- 库一起使用</para>
- <indexterm zone="ch-system-e2fsprogs compile_et">
- <primary sortas="b-compile_et">compile_et</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="debugfs">
- <term><command>debugfs</command></term>
- <listitem>
- <para>一个文件系统调试器;可以检验并修改
- <systemitem class="filesystem">ext2</systemitem>
- 文件系统的状态</para>
- <indexterm zone="ch-system-e2fsprogs debugfs">
- <primary sortas="b-debugfs">debugfs</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="dumpe2fs">
- <term><command>dumpe2fs</command></term>
- <listitem>
- <para>打印给定设备上文件系统的超级块和块组信息</para>
- <indexterm zone="ch-system-e2fsprogs dumpe2fs">
- <primary sortas="b-dumpe2fs">dumpe2fs</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="e2freefrag">
- <term><command>e2freefrag</command></term>
- <listitem>
- <para>报告可用空间碎片信息</para>
- <indexterm zone="ch-system-e2fsprogs e2freefrag">
- <primary sortas="b-e2freefrag">e2freefrag</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="e2fsck">
- <term><command>e2fsck</command></term>
- <listitem>
- <para>用于检查或修复 <systemitem
- class="filesystem">ext2</systemitem> 文件系统和 <systemitem
- class="filesystem">ext3</systemitem> 文件系统</para>
- <indexterm zone="ch-system-e2fsprogs e2fsck">
- <primary sortas="b-e2fsck">e2fsck</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="e2image">
- <term><command>e2image</command></term>
- <listitem>
- <para>用于将 <systemitem
- class="filesystem">ext2</systemitem> 文件系统关键数据保存到文件
- </para>
- <indexterm zone="ch-system-e2fsprogs e2image">
- <primary sortas="b-e2image">e2image</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="e2label">
- <term><command>e2label</command></term>
- <listitem>
- <para>显示或修改给定设备上的 <systemitem
- class="filesystem">ext2</systemitem> 文件系统标签</para>
- <indexterm zone="ch-system-e2fsprogs e2label">
- <primary sortas="b-e2label">e2label</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="e2undo">
- <term><command>e2undo</command></term>
- <listitem>
- <para>重放设备上找到的 ext2/ext3/ext4 文件系统撤销日志 undo_log
- [可以用于撤销 e2fsprogs 程序的失败操作。]</para>
- <indexterm zone="ch-system-e2fsprogs e2undo">
- <primary sortas="b-e2undo">e2undo</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="e4defrag">
- <term><command>e4defrag</command></term>
- <listitem>
- <para>ext4 文件系统在线碎片整理器</para>
- <indexterm zone="ch-system-e2fsprogs e4defrag">
- <primary sortas="b-e4defrag">e4defrag</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="filefrag">
- <term><command>filefrag</command></term>
- <listitem>
- <para>报告特定文件碎片化程度</para>
- <indexterm zone="ch-system-e2fsprogs filefrag">
- <primary sortas="b-filefrag">filefrag</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="fsck.ext2">
- <term><command>fsck.ext2</command></term>
- <listitem>
- <para>默认情况下检查
- <systemitem class="filesystem">ext2</systemitem> 文件系统,
- 是 <command>e2fsck</command> 的硬链接</para>
- <indexterm zone="ch-system-e2fsprogs fsck.ext2">
- <primary sortas="b-fsck.ext2">fsck.ext2</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="fsck.ext3">
- <term><command>fsck.ext3</command></term>
- <listitem>
- <para>默认情况下检查
- <systemitem class="filesystem">ext3</systemitem> 文件系统,
- 是 <command>e2fsck</command> 的硬链接</para>
- <indexterm zone="ch-system-e2fsprogs fsck.ext3">
- <primary sortas="b-fsck.ext3">fsck.ext3</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="fsck.ext4">
- <term><command>fsck.ext4</command></term>
- <listitem>
- <para>默认情况下检查
- <systemitem class="filesystem">ext4</systemitem> 文件系统,
- 是 <command>e2fsck</command> 的硬链接</para>
- <indexterm zone="ch-system-e2fsprogs fsck.ext4">
- <primary sortas="b-fsck.ext4">fsck.ext4</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="fsck.ext4dev">
- <term><command>fsck.ext4dev</command></term>
- <listitem>
- <para>默认情况下检查
- <systemitem class="filesystem">ext4</systemitem>
- 开发版文件系统,是 <command>e2fsck</command> 的硬链接</para>
- <indexterm zone="ch-system-e2fsprogs fsck.ext4dev">
- <primary sortas="b-fsck.ext4dev">fsck.ext4dev</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="logsave">
- <term><command>logsave</command></term>
- <listitem>
- <para>将命令输出保存到日志文件</para>
- <indexterm zone="ch-system-e2fsprogs logsave">
- <primary sortas="b-logsave">logsave</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="lsattr">
- <term><command>lsattr</command></term>
- <listitem>
- <para>列出 ext2 文件系统上的文件属性</para>
- <indexterm zone="ch-system-e2fsprogs lsattr">
- <primary sortas="b-lsattr">lsattr</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="mk_cmds">
- <term><command>mk_cmds</command></term>
- <listitem>
- <para>将包含命令名称和帮助信息的表格转换成 C 源代码文件,以便和
- <filename class="libraryfile">libss</filename>
- 子系统库一起使用</para>
- <indexterm zone="ch-system-e2fsprogs mk_cmds">
- <primary sortas="b-mk_cmds">mk_cmds</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="mke2fs">
- <term><command>mke2fs</command></term>
- <listitem>
- <para>在给定设备上创建
- <systemitem class="filesystem">ext2</systemitem> 或
- <systemitem class="filesystem">ext3</systemitem> 文件系统
- </para>
- <indexterm zone="ch-system-e2fsprogs mke2fs">
- <primary sortas="b-mke2fs">mke2fs</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="mkfs.ext2">
- <term><command>mkfs.ext2</command></term>
- <listitem>
- <para>默认情况下创建
- <systemitem class="filesystem">ext2</systemitem> 文件系统,
- 是 <command>mke2fs</command> 的硬链接</para>
- <indexterm zone="ch-system-e2fsprogs mkfs.ext2">
- <primary sortas="b-mkfs.ext2">mkfs.ext2</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="mkfs.ext3">
- <term><command>mkfs.ext3</command></term>
- <listitem>
- <para>默认情况下创建
- <systemitem class="filesystem">ext3</systemitem> 文件系统,
- 是 <command>mke2fs</command> 的硬链接</para>
- <indexterm zone="ch-system-e2fsprogs mkfs.ext3">
- <primary sortas="b-mkfs.ext3">mkfs.ext3</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="mkfs.ext4">
- <term><command>mkfs.ext4</command></term>
- <listitem>
- <para>默认情况下创建
- <systemitem class="filesystem">ext4</systemitem> 文件系统,
- 是 <command>mke2fs</command> 的硬链接</para>
- <indexterm zone="ch-system-e2fsprogs mkfs.ext4">
- <primary sortas="b-mkfs.ext4">mkfs.ext4</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="mkfs.ext4dev">
- <term><command>mkfs.ext4dev</command></term>
- <listitem>
- <para>默认情况下创建
- <systemitem class="filesystem">ext4</systemitem>
- 开发版文件系统,是 <command>mke2fs</command> 的硬链接</para>
- <indexterm zone="ch-system-e2fsprogs mkfs.ext4dev">
- <primary sortas="b-mkfs.ext4dev">mkfs.ext4dev</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="mklost-found">
- <term><command>mklost+found</command></term>
- <listitem>
- <para>用于在 <systemitem class="filesystem">ext2</systemitem>
- 文件系统上创建 <filename class="directory">lost+found</filename>
- 目录; 它为该目录预先分配磁盘块,以减轻 e2fsck 的负担</para>
- <indexterm zone="ch-system-e2fsprogs mklost-found">
- <primary sortas="b-mklost+found">mklost+found</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="resize2fs">
- <term><command>resize2fs</command></term>
- <listitem>
- <para>可以用于扩大或压缩 <systemitem
- class="filesystem">ext2</systemitem> 文件系统</para>
- <indexterm zone="ch-system-e2fsprogs resize2fs">
- <primary sortas="b-resize2fs">resize2fs</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="tune2fs">
- <term><command>tune2fs</command></term>
- <listitem>
- <para>调整 <systemitem
- class="filesystem">ext2</systemitem> 文件系统的可调参数</para>
- <indexterm zone="ch-system-e2fsprogs tune2fs">
- <primary sortas="b-tune2fs">tune2fs</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="libcom_err">
- <term><filename class="libraryfile">libcom_err</filename></term>
- <listitem>
- <para>公用错误显示子程序</para>
- <indexterm zone="ch-system-e2fsprogs libcom_err">
- <primary sortas="c-libcom_err">libcom_err</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="libe2p">
- <term><filename class="libraryfile">libe2p</filename></term>
- <listitem>
- <para>被 <command>dumpe2fs</command>、<command>chattr</command>,
- 和 <command>lsattr</command> 使用</para>
- <indexterm zone="ch-system-e2fsprogs libe2p">
- <primary sortas="c-libe2p">libe2p</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="libext2fs">
- <term><filename class="libraryfile">libext2fs</filename></term>
- <listitem>
- <para>包含允许用户级程序操纵
- <systemitem class="filesystem">ext2</systemitem>
- 文件系统的子程序</para>
- <indexterm zone="ch-system-e2fsprogs libext2fs">
- <primary sortas="c-libext2fs">libext2fs</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="libss">
- <term><filename class="libraryfile">libss</filename></term>
- <listitem>
- <para>被 <command>debugfs</command> 使用</para>
- <indexterm zone="ch-system-e2fsprogs libss">
- <primary sortas="c-libss">libss</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- </variablelist>
- </sect2>
- </sect1>
|