Ignore:
Timestamp:
03/25/2020 09:46:27 PM (4 years ago)
Author:
Pierre Labastie <pieere@…>
Branches:
10.0, 10.1, 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
Children:
f716ef4
Parents:
9bd10279
Message:

format filesystems chapter

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • postlfs/filesystems/aboutlvm.xml

    r9bd10279 r29244b7  
    1616  <title>About Logical Volume Management (LVM)</title>
    1717
    18   <para>LVM manages disk drives.  It allows multiple drives and partitions
    19   to be combined into larger <emphasis>volume groups</emphasis>, assists in
    20   making backups through a <emphasis>snapshot</emphasis>, and allows for
    21   dynamic volume resizing. It can also provide mirroring similar to
    22   a RAID 1 array.</para>
     18  <para>
     19    LVM manages disk drives.  It allows multiple drives and partitions
     20    to be combined into larger <emphasis>volume groups</emphasis>, assists in
     21    making backups through a <emphasis>snapshot</emphasis>, and allows for
     22    dynamic volume resizing. It can also provide mirroring similar to
     23    a RAID 1 array.
     24  </para>
    2325
    24   <para>A complete discussion of LVM is beyond the scope of this introduction,
    25   but basic concepts are presented below.</para>
     26  <para>
     27    A complete discussion of LVM is beyond the scope of this introduction,
     28    but basic concepts are presented below.
     29  </para>
    2630
    27   <para>To run any of the commands presented here, the <xref linkend='lvm2'/>
    28   package must be installed.  All commands must be run as the <systemitem
    29   class="username">root</systemitem> user.</para>
     31  <para>
     32    To run any of the commands presented here, the <xref linkend='lvm2'/>
     33    package must be installed.  All commands must be run as the <systemitem
     34    class="username">root</systemitem> user.
     35  </para>
    3036
    31   <para>Management of disks with lvm is accomplished using the following
    32   concepts: </para>
     37  <para>
     38    Management of disks with lvm is accomplished using the following concepts:
     39  </para>
    3340
    3441  <variablelist>
    3542    <varlistentry>
    3643      <term>physical volumes</term>
    37       <listitem><para>These are physical disks or partitions such as
    38       /dev/sda3 or /dev/sdb.</para></listitem>
     44      <listitem>
     45        <para>
     46          These are physical disks or partitions such as
     47          /dev/sda3 or /dev/sdb.
     48        </para>
     49      </listitem>
    3950    </varlistentry>
    4051
    4152    <varlistentry>
    4253      <term>volume groups</term>
    43       <listitem><para>These are named groups of physical volumes that
    44       can be manipulated by the administrator.  The number of physical
    45       volumes that make up a volume group is arbitrary.  Physical volumes
    46       can be dynamically added or removed from a volume group.
    47       </para></listitem>
     54      <listitem>
     55        <para>
     56          These are named groups of physical volumes that
     57          can be manipulated by the administrator.  The number of physical
     58          volumes that make up a volume group is arbitrary.  Physical volumes
     59          can be dynamically added or removed from a volume group.
     60        </para>
     61      </listitem>
    4862    </varlistentry>
    4963
    5064    <varlistentry>
    5165      <term>logical volumes</term>
    52       <listitem><para>Volume groups may be subdivided into logical volumes.
    53       Each logical volume can then be individually formatted as if it were a
    54       regular Linux partition. Logical volumes may be dynamically resized by
    55       the administrator according to need.</para></listitem>
     66      <listitem>
     67        <para>
     68          Volume groups may be subdivided into logical volumes. Each logical
     69          volume can then be individually formatted as if it were a regular
     70          Linux partition. Logical volumes may be dynamically resized by
     71          the administrator according to need.
     72        </para>
     73      </listitem>
    5674
    5775    </varlistentry>
    5876  </variablelist>
    5977
    60   <para>To give a concrete example, suppose that you have two 2 TB disks.
    61   Also suppose a really large amount of space is required for a very large database,
    62   mounted on <filename class='directory'>/srv/mysql</filename>.  This is what
    63   the initial set of partitions would look like:</para>
     78  <para>
     79    To give a concrete example, suppose that you have two 2 TB disks. Also
     80    suppose a really large amount of space is required for a very large
     81    database, mounted on <filename class='directory'>/srv/mysql</filename>.
     82    This is what the initial set of partitions would look like:
     83  </para>
    6484
    6585  <screen><literal>Partition  Use    Size      Partition Type
     
    7191/dev/sdb2  LVM    remainder 8e (LVM)</literal></screen>
    7292
    73   <para>First initialize the physical volumes:</para>
     93  <para>
     94    First initialize the physical volumes:
     95  </para>
    7496
    7597  <screen><userinput>pvcreate /dev/sda4 /dev/sdb2</userinput></screen>
    7698
    77   <note><para>A full disk can be used as part of a physical volume, but
    78   beware that the <command>pvcreate</command> command will destroy any
    79   partition information on that disk.</para></note>
     99  <note>
     100    <para>
     101      A full disk can be used as part of a physical volume, but
     102      beware that the <command>pvcreate</command> command will destroy any
     103      partition information on that disk.
     104    </para>
     105  </note>
    80106
    81   <para>Next create a volume group named lfs-lvm:</para>
     107  <para>
     108    Next create a volume group named lfs-lvm:
     109  </para>
    82110
    83111  <screen><userinput>vgcreate lfs-lvm /dev/sda4  /dev/sdb2</userinput></screen>
    84112
    85   <para>The status of the volume group can be checked by running the command
    86   <command>vgscan</command>. Now create the logical volumes.  Since there is
    87   about 3900 GB available, leave about 900 GB free for expansion. Note that the
    88   logical volume named <emphasis>mysql</emphasis> is larger than any physical
    89   disk.  </para>
     113  <para>
     114    The status of the volume group can be checked by running the command
     115    <command>vgscan</command>. Now create the logical volumes.  Since there
     116    is about 3900 GB available, leave about 900 GB free for expansion. Note
     117    that the logical volume named <emphasis>mysql</emphasis> is larger than
     118    any physical disk.
     119  </para>
    90120
    91121  <screen><userinput>lvcreate --name mysql --size 2500G lfs-lvm
    92122lvcreate --name home  --size  500G lfs-lvm</userinput></screen>
    93123
    94   <para>Finally the logical volumes can be formatted and mounted.  In this
    95   example, the jfs file system (<xref linkend='jfsutils'/>) is used for
    96   demonstration purposes.</para>
     124  <para>
     125    Finally the logical volumes can be formatted and mounted.  In this
     126    example, the jfs file system (<xref linkend='jfsutils'/>) is used for
     127    demonstration purposes.
     128  </para>
    97129
    98130  <screen><userinput>mkfs -t ext4 /dev/lfs-lvm/home
     
    102134mount /dev/lfs-lvm/mysql /srv/mysql</userinput></screen>
    103135
    104   <para>The LFS boot scripts automatically make these file systems available
    105   to the system in the checkfs script.  Edit the <filename>/etc/fstab</filename>
    106   file as required to automatically mount them.</para>
     136  <para>
     137    The LFS boot scripts automatically make these file systems available to
     138    the system in the checkfs script. Edit the <filename>/etc/fstab</filename>
     139    file as required to automatically mount them.
     140  </para>
    107141
    108   <para>A LVM logical volume can host a root filesystem, but requires the use
    109   of an initramfs (initial RAM file system) and is not discussed here.</para>
     142  <para>
     143    A LVM logical volume can host a root filesystem, but requires the use
     144    of an initramfs (initial RAM file system) and is not discussed here.
     145  </para>
    110146
    111   <para>For a more information about LVM, see the <ulink
    112   url="http://www.tldp.org/HOWTO/LVM-HOWTO/">LVM HOWTO</ulink> and
    113   the lvm man pages.</para>
     147  <para>
     148    For a more information about LVM, see the <ulink
     149    url="http://www.tldp.org/HOWTO/LVM-HOWTO/">LVM HOWTO</ulink> and
     150    the lvm man pages.
     151  </para>
    114152
    115153</sect1>
Note: See TracChangeset for help on using the changeset viewer.