Ignore:
Timestamp:
06/29/2020 07:38:45 AM (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:
691f4f70
Parents:
c3a210a
Message:

Add instructions to activate and mount lvm volume in systemd. ticket 13730

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • postlfs/filesystems/aboutlvm.xml

    rc3a210a r55dc313  
    134134mount /dev/lfs-lvm/mysql /srv/mysql</userinput></screen>
    135135
    136   <para>
     136  <para revision="sysv">
    137137    The LFS boot scripts automatically make these file systems available to
    138138    the system in the checkfs script. Edit the <filename>/etc/fstab</filename>
     
    142142  <para>
    143143    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.
     144    of an initramfs (initial RAM file system). The initramfs proposed in
     145    <xref linkend="initramfs"/> allows to pass the lvm volume in
     146    the <parameter>root=</parameter> switch of the kernel command line.
    145147  </para>
     148
     149  <para revision="systemd">
     150    If not using an initramfs, there is a race condition in <application>
     151    systemd</application> preventing mounting logical volumes through
     152    <filename>/etc/fstab</filename>. You must create a <quote>mount</quote>
     153    unit (see systemd.mount(5)) as in the following example, which mounts
     154    the <filename class="directory">/home</filename> directory automatically
     155    at boot:
     156  </para>
     157
     158<screen role="root" revision="systemd"><userinput>cat &gt; /etc/systemd/system/home.mount &lt;&lt; EOF
     159<literal>[Unit]
     160Description=Mount the lvm volume /dev/lfs-lvm/home to /home
     161
     162[Mount]
     163What=/dev/lfs-lvm/home
     164Where=/home
     165Type=ext4
     166Options=default
     167
     168[Install]
     169WantedBy=multi-user.target</literal>
     170EOF</userinput></screen>
     171
     172  <note revision="systemd">
     173    <para>
     174    The name of the unit must be the name of the mount point with the
     175    `/' character replaced by `-', omitting the leading one.
     176    </para>
     177  </note>
     178
     179  <para revision="systemd">
     180    Next the unit must be enabled with:
     181  </para>
     182
     183<screen role="root" revision="systemd"><userinput>systemctl enable home.mount</userinput></screen>
    146184
    147185  <para>
Note: See TracChangeset for help on using the changeset viewer.