Changeset 55dc313


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

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • introduction/welcome/changelog.xml

    rc3a210a r55dc313  
    4545      <para>June 29th, 2020</para>
    4646      <itemizedlist>
     47        <listitem revision="systemd">
     48          <para>[pierre] - Add instructions and informations for mounting lvm
     49          volumes at boot with systemd. Fixes
     50          <ulink url="&blfs-ticket-root;13730">#13730</ulink>.</para>
     51        </listitem>
    4752        <listitem>
    4853          <para>[renodr] - Update to gtk+-3.24.21. Fixes
  • 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>
  • postlfs/filesystems/lvm2.xml

    rc3a210a r55dc313  
    230230    </para>
    231231
    232 <screen role="root"><userinput>make install</userinput></screen>
     232<screen role="root" revision="sysv"><userinput>make install</userinput></screen>
     233
     234<screen role="root" revision="systemd"><userinput>make install
     235make install_systemd_units</userinput></screen>
    233236
    234237  </sect2>
     
    265268      building of the <application>Device Mapper</application>
    266269      event daemon.
     270    </para>
     271
     272    <para revision="systemd">
     273      <command>make install_systemd_units</command>: This is needed to install
     274      a unit that activates logical volumes at boot. It is not installed
     275      by default.
    267276    </para>
    268277
Note: See TracChangeset for help on using the changeset viewer.