You are not logged in.

#1 2013-11-01 01:45:08

dafrizz
Member
Registered: 2011-05-27
Posts: 31

Mounting lvm (on raid) fails every few boots

Hi,

as the title says, every few boots (probably every 5th boot or so) I get dropped to an emergency console because mounting one of my logical volumes (not always the same one) fails.

I have attached the logs form a successful and unsuccessful boot. The relevant lines I could find are:

Job dev-mapper-raidvg\x2dlvimages.device/start timed out.
Nov 01 07:58:01 mythbackend systemd[1]: Timed out waiting for device dev-mapper-raidvg\x2dlvimages.device.
Nov 01 07:58:01 mythbackend systemd[1]: Dependency failed for /home/laffi/media/images.
Nov 01 07:58:01 mythbackend systemd[1]: Dependency failed for Local File Systems.
Nov 01 07:58:01 mythbackend systemd[1]: Triggering OnFailure= dependencies of local-fs.target.
Nov 01 07:58:01 mythbackend systemd[1]: Dependency failed for File System Check on /dev/mapper/raidvg-lvimages.

Another thing I noticed is that a filesystem check gets started for that particular lv (lvimages) during the successful boot, but not the unsuccessful one. No idea if that means anything.

As you can see from the full log other lv's get mounted successful during the same boot.

The raid also seems to get started fine. I noticed this line in the logs, but it's in both the successful and unsuccessful boots so it probably is not the issue.

Nov 01 07:56:31 mythbackend systemd[1]: Cannot add dependency job for unit lvm.service, ignoring: Unit lvm.service failed to load: No such file or directory.

This is my fstab

#
# /etc/fstab: static file system information
#
# <file system>        <dir>         <type>    <options>          <dump> <pass>
# devpts                 /dev/pts      devpts    defaults            0      0
shm                    /dev/shm      tmpfs     nodev,nosuid        0      0

#/dev/cdrom             /media/cd   auto    ro,user,noauto,unhide   0      0
#/dev/dvd               /media/dvd  auto    ro,user,noauto,unhide   0      0
#/dev/fd0               /media/fl   auto    user,noauto             0      0

# /dev/sda1 /boot ext4 defaults 0 1
/dev/sda2 swap swap defaults 0 0
/dev/sda5 / ext4 defaults 0 1

#/dev/VolGroup01/lvolhome /home ext4 defaults 0 1
#/dev/raidvg/lvhome /home ext4 defaults 0 2
/dev/sda7 /home ext4 defaults 0 2

/dev/mapper/raidvg-lvmusic /home/laffi/media/music ext4 defaults 0 2

/dev/mapper/raidvg-lvphotos /home/laffi/media/photos ext4 defaults 0 2

/dev/mapper/raidvg-lvvideos /home/laffi/media/videos xfs defaults 0 2

/dev/mapper/raidvg-lvmovies /home/laffi/media/movies xfs defaults 0 2

/dev/mapper/raidvg-lvcamcorder /home/laffi/media/camcorder ext4 defaults 0 2

/dev/mapper/raidvg-lvrecordings /home/laffi/media/recordings xfs  defaults 0 2

/dev/mapper/raidvg-lvlivetv /home/laffi/media/livetv xfs defaults 0 2

/dev/mapper/raidvg-lvrecarchive /home/laffi/media/recarchive xfs defaults 0 2

/dev/mapper/raidvg-lvbooks /home/laffi/media/books ext4 defaults 0 2

/dev/mapper/raidvg-lvimages /home/laffi/media/images ext4 defaults 0 2

# /dev/mapper/raidvg-lvbackhome /home/laffi/media/backhome ext4 defaults 0 2

/dev/sda6 /home/laffi/media/backup ext4 defaults 0 1

/dev/sdf1        /home/laffi/usbdrive    ntfs    defaults,nofail    0  2

Any help will be much appreciated. Thank you.u

Log of successful boot:
http://pastebin.com/raw.php?i=ZE9k76PW
Log of unsuccessful boot
http://pastebin.com/raw.php?i=12FH8S1B

Offline

#2 2013-11-01 02:37:30

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Mounting lvm (on raid) fails every few boots

If you vgchange -ay when it drops you into the initramfs shell, can you then exit out and continue the boot?

Offline

#3 2013-11-01 03:49:26

dafrizz
Member
Registered: 2011-05-27
Posts: 31

Re: Mounting lvm (on raid) fails every few boots

Thanks for the reply. I don't know, will try it next time it happens.

I suspect it will not work. All my logical volumes are part of the same volume group ("raidvg") and as mentioned in the OP, some lv's get mounted during those unseccussful boots so I guess the volume group is active

Offline

#4 2013-11-07 06:43:59

dafrizz
Member
Registered: 2011-05-27
Posts: 31

Re: Mounting lvm (on raid) fails every few boots

WonderWoofy wrote:

If you vgchange -ay when it drops you into the initramfs shell, can you then exit out and continue the boot?

Ok, finally managed to try this.

vgchange -ay results in a "volume group with 11 logical volumes now active" or something along those line.

I then pressed CTRL+D to exit the emergency console. After that, nothing happened. Waited a few minutes, just in case, then rebooted (via ctrl+alt+del).

Something maybe worth noting: in the meantime I had enabled the lvm-monitoring service to see if that makes a difference (seems like it doesn't, since I still have the same problem). I found the following line(s) in this unsuccessful boot (with lvm-monitoring service enabled):

Nov 07 09:00:29 mythbackend lvm[164]: 11 logical volume(s) in volume group "raidvg" monitored
Nov 07 09:00:29 mythbackend systemd[1]: Started Load/Save Random Seed.
Nov 07 09:00:29 mythbackend systemd[1]: Started Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling.

And then further down the following familiar lines:

Nov 07 09:00:32 mythbackend systemd[1]: Starting File System Check on /dev/sda7...
Nov 07 09:00:32 mythbackend systemd-fsck[305]: /dev/sda7: clean, 57416/640848 files, 1091272/2559488 blocks
Nov 07 09:00:32 mythbackend systemd[1]: Started File System Check on /dev/sda7.
Nov 07 09:00:32 mythbackend systemd[1]: Mounting /home...
Nov 07 09:00:32 mythbackend systemd[1]: home.mount: Directory /home to mount over is not empty, mounting anyway.
Nov 07 09:00:32 mythbackend kernel: EXT4-fs (sda7): mounted filesystem with ordered data mode. Opts: (null)
Nov 07 09:00:32 mythbackend systemd[1]: Mounted /home.
Nov 07 09:00:32 mythbackend systemd[1]: Mounting /home/laffi/media/backup...
Nov 07 09:00:32 mythbackend kernel: EXT4-fs (sda6): mounted filesystem with ordered data mode. Opts: (null)
Nov 07 09:00:32 mythbackend systemd[1]: Mounted /home/laffi/media/backup.
Nov 07 09:01:57 mythbackend systemd[1]: Job dev-mapper-raidvg\x2dlvrecarchive.device/start timed out.
Nov 07 09:01:57 mythbackend systemd[1]: Timed out waiting for device dev-mapper-raidvg\x2dlvrecarchive.device.
Nov 07 09:01:57 mythbackend systemd[1]: Dependency failed for /home/laffi/media/recarchive.
Nov 07 09:01:57 mythbackend systemd[1]: Dependency failed for Local File Systems.
Nov 07 09:01:57 mythbackend systemd[1]: Triggering OnFailure= dependencies of local-fs.target.
Nov 07 09:01:57 mythbackend systemd[1]: Dependency failed for File System Check on /dev/mapper/raidvg-lvrecarchive.

Any thoughts ? Thank you very much.

Last edited by dafrizz (2013-11-07 06:45:09)

Offline

Board footer

Powered by FluxBB