# lvm2 weirdness [Solved]

## grooveman

Hi.

I had my system running lvm2, and it was running just great.

Yesterday, I updated the system, which worked without an incident.

The way my RAID is configured:

```
/dev/md1 ----> boot [raid 0] (ext3)

/dev/md2 ----> swap [raid 5] 

/dev/md3 [split into vgs]

     /dev/vg/slash -----> /   (ext3)

     /dev/vg/var    ----> /var  (ext3)

     /dev/vg/home ----> /home  (ext3)

```

Ever since the update, my system no longer accepts /dev/md1 and /dev/md2 as valid file systems.

At boot I get:

```

/dev/.tmp/.md1 does not exist and is not a 'standard' name so it cannot be created.

/dev/.tmp/.md2 does not exist and is not a 'standard' name so it cannot be created.

/dev/.tmp/.md3 does not exist and is not a 'standard' name so it cannot be created.

```

I try:

```
e2fsck -b 8193 /dev/md1

e2fsck 1.40.4 (31-Dec-2007)

e2fsck: Invalid argument while trying to open /dev/md1

The superblock could not be read or does not describe a correct ext2

filesystem.  If the device is valid and it really contains an ext2

filesystem (and not swap or ufs or something else), then the superblock

is corrupt, and you might try running e2fsck with an alternate superblock:

    e2fsck -b 8193 <device>

```

dmesg tells me this:

```
Unable to find swap-space signature

```

I can restore both md1 and md2 into good working order with no problems on the command line using 'mdadm -A'. I can mount /dev/md1 and play with the files as one would expect, and I can swapon /dev/md2.  It is only at boot that it has a problem.

These are the packages that were updated on my system:

```

[ebuild     U ] sys-apps/portage-2.1.4.4 [2.1.3.19]

[ebuild     U ] app-misc/pax-utils-0.1.17 [0.1.16]

[ebuild     U ] sys-libs/timezone-data-2007k [2007j]

[ebuild     U ] sys-fs/mdadm-2.6.4 [2.6.2]

[ebuild     U ] sys-kernel/linux-headers-2.6.23-r3 [2.6.23-r2]

[ebuild     U ] dev-libs/mpfr-2.3.0_p4 [2.2.1_p5]

[ebuild     U ] sys-devel/dev86-0.16.17-r5 [0.16.17-r4]

[ebuild     U ] sys-apps/less-418 [416]

[ebuild     U ] sys-process/htop-0.7 [0.6.6]

[ebuild     U ] sys-libs/readline-5.2_p12-r1 [5.2_p7]

[ebuild     U ] sys-apps/which-2.19 [2.16]

[ebuild     U ] sys-apps/debianutils-2.28.2 [2.25]

[ebuild     U ] app-admin/perl-cleaner-1.05 [1.04.3]

[ebuild     U ] sys-devel/libtool-1.5.26 [1.5.24]

[ebuild     U ] sys-boot/grub-0.97-r4 [0.97-r3]

[ebuild     U ] dev-lang/python-2.4.4-r9 [2.4.4-r6]

[ebuild     U ] sys-libs/cracklib-2.8.12 [2.8.10]

[ebuild     U ] dev-libs/libxml2-2.6.30-r1 [2.6.30] USE="-bootstrap% -build%"

[ebuild     U ] sys-apps/file-4.23 [4.21-r1]

[ebuild     U ] sys-libs/com_err-1.40.4 [1.40.3]

[ebuild     U ] sys-apps/findutils-4.3.11 [4.3.8-r1]

[ebuild     U ] sys-apps/man-1.6f [1.6e-r3]

[ebuild     U ] app-editors/nano-2.0.7 [2.0.6]

[ebuild     U ] sys-apps/shadow-4.0.18.2 [4.0.18.1-r1]

[ebuild  N    ] app-admin/eselect-ctags-1.3

[ebuild     U ] sys-apps/busybox-1.8.2 [1.7.4]

[ebuild     U ] app-arch/tar-1.19-r1 [1.19]

[ebuild     U ] sys-process/psmisc-22.6 [22.5-r2]

[ebuild     U ] dev-util/ctags-5.7 [5.5.4-r2] USE="-ada%"

[ebuild     U ] sys-apps/man-pages-2.78 [2.69] LINGUAS="-cs% -da% -de% -es% -fr% -it% -ja% -nl% -pl% -ro% -ru% -zh_CN%"

[ebuild     U ] sys-libs/ss-1.40.4 [1.40.3]

[ebuild     U ] dev-libs/glib-2.14.6 [2.14.3]

[ebuild     U ] net-misc/openssh-4.7_p1-r3 [4.7_p1-r1]

[ebuild     U ] sys-fs/e2fsprogs-1.40.4 [1.40.3]

[ebuild   R   ] sys-devel/gcc-4.1.2  USE="-libffi%"

[ebuild     U ] sys-apps/util-linux-2.13-r2 [2.12r-r8] USE="-old-linux%"

[ebuild     U ] sys-apps/baselayout-1.12.11.1 [1.12.10-r5]

[ebuild  NS   ] sys-kernel/xen-sources-2.6.21  USE="-build -symlink"

[ebuild     U ] app-emulation/xen-tools-3.2.0 [3.1.2]

[ebuild  NS   ] sys-kernel/gentoo-sources-2.6.23-r9  USE="-build -symlink"

[ebuild     U ] app-emulation/xen-3.2.0 [3.1.2]

```

I was pretty careful with my etc-update, and my mdadm.conf and my lvm.conf are unchanged.

Any ideas on how I can fix this?

Thanks!

G

----------

## HeissFuss

It sounds like the issue is that your array isn't being assembled on boot.  Did you install a new kernel at some point and not reboot since then?  Are the member partitions of your raid groups type fd (linux raid autodetect?) or do you assemble though mdadm.conf?

----------

## eccerr0r

Since you had root on lvm on raid (I think?) your boot options is probably very complicated.  Did the grub update do something with loading your initrd (which I believe is the only way to get this working?)

----------

## grooveman

 *HeissFuss wrote:*   

> It sounds like the issue is that your array isn't being assembled on boot.  Did you install a new kernel at some point and not reboot since then?  Are the member partitions of your raid groups type fd (linux raid autodetect?) or do you assemble though mdadm.conf?

 

I was following this hotwo: 

http://gentoo-wiki.com/Installing_on_LVM2_And_Raid5

And this one:

http://gentoo-wiki.com/HOWTO_Install_Gentoo_on_an_LVM2_root_partition

Yes, that is exactly the problem:  Not assembling on boot.  Yes, I am using fd, as was suggested in the first howto.  I don't have much experience with lvm2, but I thought that this is how it is done nowdays.

eccerr0r, Yeah, I think that is exactly it, grub changed something, but what?  I didn't use anything terribly complicated in my grub.conf.  I followed the "second easiest" way in the second hotwo above.

grub.conf:

```
title=Gentoo Linux  (2.6.x) (64 bit)

root (hd0,0)

kernel /bzImage-2.6.x root=/dev/ram0 lvm2root=/dev/vg2/slash video=radeonfb:ywrap,mtrr,1024x768-16@85

initrd /initrd-lvm2-2.6.22-gentoo-r9.gz

```

This all makes me incredibly nervous now... rolling out a production machine with lvm2 if they can just change the rules when they feel like it...  Somebody tell me my concern is unwarranted!

So, please, if anyone is still out there, I could use a hand!

G

----------

## HeissFuss

Is there nothing that comes up at boot that may help?

The only reason you're booting at all is because the lvm2 initrd takes care of md3 and the root VG.  

I suppose it could be an issue with udev, but I don't see any associated updates in that list and it seems to work fine after boot.

Is there anything defined in your mdadm.conf?  And are raid/lvm options compiled in or modules?

----------

## grooveman

 *Quote:*   

> At boot I get:
> 
> Code:
> 
> /dev/.tmp/.md1 does not exist and is not a 'standard' name so it cannot be created.
> ...

 

Hmm... the answer was staring me in the face on my first post in this thread.

I have no clue where the ".tmp" came from... but somehow, it got in there.  I removed it in the mdadm.conf so it read: "/dev/md1", "/dev/md2" and so on, and it worked just fine!  The funny thing is I don't remember messing with that file, other than when I originally created it, and it used to work just fine...

Thank you all for the help, and I'm sorry for the trouble.

G

----------

