Hi,

I have found the problem, and a solution.

The problem is not lmt, nor systemd. It's initramfs-tools not properly
mounting /usr (if LVM).
In initramfs-tools version 0.117 an option has been added to mount usr if
in fstab.

The initramfs init scripts are in /usr/share/initramfs-tools. The file
responsible for activating volume groups
is scripts/local-top/lvm2

It activates the root and optionally the resume volume group only, which
means the usr volume stays inactive
and can't be mounted.

I fixed this with a quick patch, adding lvm vgchange -ay (patch attached)

Ilan

On Fri, Sep 26, 2014 at 2:36 PM, Ritesh Raj Sarraf <r...@researchut.com>
wrote:

>  Hi,
>
> Thank you for reporting this.
>
> On Friday 26 September 2014 03:31 PM, Ilan Cohen wrote:
>
> Hi,
>
>  I have applied your patch changing the last line of /lib/udev/lmt-udev
> and my system still boots with / in read only mode.
>
>
>
> Matthew: Can you please confirm your results ??
>
>
>
>  running:
> systemd 215
>  udevd 215
>
>  I have the same symptoms as you describe:
>
>  # systemctl status systemd-remount-fs.service
> ● systemd-remount-fs.service - Remount Root and Kernel File Systems
>    Loaded: loaded (/lib/systemd/system/systemd-remount-fs.service; static)
>    Active: failed (Result: exit-code) since Fri 2014-09-26 12:54:16 IDT;
> 1min 32s ago
>      Docs: man:systemd-remount-fs.service(8)
>            http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
>   Process: 510 ExecStart=/lib/systemd/systemd-remount-fs (code=exited,
> status=1/FAILURE)
>  Main PID: 510 (code=exited, status=1/FAILURE)
>
>  Sep 26 12:54:16 thinkpad systemd-remount-fs[510]: mount: /usr not
> mounted or bad option
> Sep 26 12:54:16 thinkpad systemd-remount-fs[510]: /bin/mount for /usr
> exited with exit status 32.
> Sep 26 12:54:16 thinkpad systemd[1]: systemd-remount-fs.service: main
> process exited, code=exited, status=1/FAILURE
> Sep 26 12:54:16 thinkpad systemd[1]: Failed to start Remount Root and
> Kernel File Systems.
> Sep 26 12:54:16 thinkpad systemd[1]: Unit systemd-remount-fs.service
> entered failed state.
>
>  and in syslog from boot:
>
>  [    2.345523] systemd[1]: /usr appears to be on its own filesytem and
> is not already mounted. This is not a supported setup. Some things will
> probably break (sometimes even silently) in mysterious ways. Consult
> http://freedesktop.org/wiki/Software/systemd/separate-usr-is-broken for
> more information.
>
>  --
> Ilan Cohen
>
>
> I don't know how I should interpret this last statement. When systemd
> itself reports it as a setup not supported, what should we expect out of it
> ?
>
>
> What lmt-udev currently does, and with Matt's patch, it should work. Can
> you capture the output from the initial boot to confirm _if_ it is an LMT
> problem ? I do not have a setup where /usr is on a separate partition.
>
> --
> Ritesh Raj Sarraf
> RESEARCHUT - http://www.researchut.com
> "Necessity is the mother of invention."
>
>


-- 
Ilan Cohen
--- lvm2	2014-09-26 14:53:20.648542077 +0300
+++ lvm2.patch	2014-09-26 14:55:00.736539886 +0300
@@ -1,66 +0,0 @@
-#!/bin/sh
-
-PREREQ="mdadm mdrun multipath"
-
-prereqs()
-{
-	echo "$PREREQ"
-}
-
-case $1 in
-# get pre-requisites
-prereqs)
-	prereqs
-	exit 0
-	;;
-esac
-
-activate_vg()
-{
-	local dev="$1"
-
-	# Make sure that we have a non-empty argument
-	if [ -z "$dev" ]; then
-		return 1
-	fi
-
-	# Take care of lilo boot arg, risky activating of all vg
-	case "$dev" in
-	fe[0-9]*)
-		lvm vgchange -aly --ignorelockingfailure
-		exit 0
-		;;
-	# FIXME: check major
-	/dev/root)
-		lvm vgchange -aly --ignorelockingfailure
-		exit 0
-		;;
-	esac
-
-	# Make sure that we have a d-m path
-	dev="${dev#/dev/mapper/}"
-	if [ "$dev" = "$1" ]; then
-		return 1
-	fi
-
-	eval $(dmsetup splitname --nameprefixes --noheadings --rows "$dev")
-
-	if [ "$DM_VG_NAME" ] && [ "$DM_LV_NAME" ]; then
-		lvm lvchange -aly --ignorelockingfailure "$DM_VG_NAME/$DM_LV_NAME"
-		rc=$?
-		if [ $rc = 5 ]; then
-			echo "Unable to find LVM volume $DM_VG_NAME/$DM_LV_NAME"
-		fi
-	fi
-}
-
-if [ ! -e /sbin/lvm ]; then
-	exit 0
-fi
-
-modprobe -q dm-mod
-
-activate_vg "$ROOT"
-activate_vg "$resume"
-
-exit 0

Reply via email to