1

I've got a Debian Jessie system and I'm trying to recover this onto a RAID 1 with LVM.

I've got a RAID1 over two 2TB NVMe drives and my /boot is on a USB booting in Legacy mode to Grub2. That bit works, it's when the kernel tries to mount the /home it times out and I get this error;

     : Dec 12 15:33:34 ltsp systemd[1]: Job dev-mapper-vg\x2dhome.device/start timed out.
     : Dec 12 15:33:34 ltsp systemd[1]: Timed out waiting for device dev-mapper-vg\x2dhome.device.
     : -- Subject: Unit dev-mapper-vg\x2dhome.device has failed
     : -- Defined-By: systemd
     : -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
     : -- 
     : -- Unit dev-mapper-vg\x2dhome.device has failed.
     : -- 
     : -- The result is timeout.
     : Dec 12 15:33:34 ltsp systemd[1]: Dependency failed for /home.
     : -- Subject: Unit home.mount has failed
     : -- Defined-By: systemd
     : -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
     : -- 
     : -- Unit home.mount has failed.
     : -- 
     : -- The result is dependency.
     : Dec 12 15:33:34 ltsp systemd[1]: Dependency failed for Local File Systems.
     : -- Subject: Unit local-fs.target has failed
     : -- Defined-By: systemd
     : -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
     : -- 
     : -- Unit local-fs.target has failed.
     : -- 
     : -- The result is dependency.
     : Dec 12 15:33:34 ltsp systemd[1]: Triggering OnFailure= dependencies of local-fs.target.
     : Dec 12 15:33:34 ltsp systemd[1]: Dependency failed for File System Check on /dev/mapper/vg-home.
     : -- Subject: Unit systemd-fsck@dev-mapper-vg\x2dhome.service has failed
     : -- Defined-By: systemd
     : -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
     : -- 
     : -- Unit systemd-fsck@dev-mapper-vg\x2dhome.service has failed.

Then I'm dumped at the Emergency Console.

I have checked the UUID's with blkid and they are the same;

/etc/fstab

/dev/mapper/vg-root /               ext4    noatime,errors=remount-ro 0 1
UUID=d276a0d4-c95f-4792-a222-6d1451899de2 /home ext4    noatime,errors=remount-ro 0 1
UUID=4308b9dd-3319-47f4-b303-1bfdd928c25e  /boot  ext4  noatime,errors=remount-ro 0 2

Once I put my root password into the Emergency Console I can see that /home is mounted.

Why is it failing whilst booting?

UPDATE

root@ltsp:/# sudo systemctl status dev-mapper-vg\\x2home.device
● dev-mapper-vg\x2home.device
   Loaded: loaded
   Active: inactive (dead)
1
  • Please add the output of sudo systemctl status dev-mapper-vg\\x2home.device after bootup. Commented Dec 12, 2019 at 17:56

2 Answers 2

3

I had the similar problem but didn't find any suitable solution. I only can give some workarounds:

Create unit files for each volume you want to mount. E.g.

[Unit]
Description=Start home

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/mount /dev/mapper/vg-home
ExecStop=/bin/umount /dev/mapper/vg-home

[Install]
WantedBy=local-fs.target


Or add x-systemd.device-timeout option to your fstab mount rules. E.g.

UUID=d276a0d4-c95f-4792-a222-6d1451899de2 /home ext4    noatime,x-systemd.device-timeout=60s,errors=remount-ro 0 1

This will give systemd some time to do the work.
Official workaround from OpenSuse Devices time out at boot time but appear later

EDIT:

Also you can play around with:

[Install]
WantedBy=dev-mapper-vg\x2dhome.device

For trigger unit file.
To get escaped path use systemd-escape

1
  • I ran out of time and ended up putting the system into a VM under KVM debian 10. These look like viable work arounds for my problem though.
    – map7
    Commented Apr 19, 2020 at 23:34
0

My problem was solved by replacing the disk's device path by its UUID.

For example, change this :

/dev/mapper/isw_mydisk /data   ext4   nobootwait  0  2

by

UUID=8b481900-fb7a-4e9e-929c-e940a6b913a4 /data   ext4   nobootwait  0  2

Retrieve the disk's UUID running blkid

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .