Talk:HOWTO setup evms

From Gentoo Linux Wiki

Jump to: navigation, search

great walkthru! I haven't run thru the install yet, but i plan on doing it soon. One comment though, isn't 512mb a bit large for a boot partition? How about 50mb or 100mb?



So i'm working thru my first EVMS install and i think there's a bit of a problem with the docs. After 8.1 Create a dos partition for the rest of the disk we have raw segments- then suddenly in 8.3 Mirror the two segments together we have MD devices (md2). It's my understanding of LVM2 that it doesn't provide software raid... MD is required for that. So should there be a step prior to 8.3 where we combine the newly created segments into an MD device?


[DCB] Booting with Gentoo 2005.1 ...

I found it necessary to mkdir /initrd when using evms on a fresh 2005.1 install.

I also needed emerge multipath-tools to get the devmap_name utility and allow evms to find my root device.

Excellent guide! After running through this HowTo, it finally made sense how the various evms layers fit together. Thanks bunches.


I am trying to mount root file sysytem, but real_root=/dev/evms/sdb2 is not work...

>I found it necessary to mkdir /initrd when using evms on a fresh 2005.1 install.

where? /initrd on /mnt/gentoo? or / of 2005.1? I will make both and try emerge multipath-tools. Thanks!


The guide was fine... but real_root should be /dev/evms/root if you follow this guide. And don't forget to mkdir /initrd _and_ install grub on both disks. Somehow I thought that part was under "12 B. Gentoo prior to 2005.1 and older kernels." And I followed 11 A instead.


Ive used evms for some time and found this howto when looking for an updated initrd for a 2.6 udev kernel. I had not used genkernel before. Im having problems with evms_activate on the genkernel initrd. When booting evms_activate segfaults and does not detect the evms volumes. Running it manually from the initrd shell doesnt segfault, but just hangs there forever until I hit the reset button. Im wondering if this has something to do with evms being built dynamically instead of statically as recommended by the howto, and also on the genkernel docs page. The problem is, no matter what I do, evms compiles dynamically (evms 2.5.3) and ignores the USE=static flag - in fact there is nothing in the ebuild to act on this flag and cause the configure script to build a static evms. Does genkernel now support dynamically built evms, or is the use=static logic missing from the ebuild, or am I missing the point entirely?


Confirming some previous comments... 100mb is plenty for a boot partition, and remember to install grub on both disks (it really helps when a drive fails to have it on both). As noted by others, the example is buried in the old-kernels section. The example there could be a bit confusing for newbies - ie: using the device command to make both disks look like hd0... I would make it more apparent by using root (hd1,0) and setup (hd1) for sdb, and either removing or correcting the device statements.


LiveCD not appropriate?

I am trying to setup a system on evms as described. I had problems with kernel panics: The first I had the system running for two days (most in idle as no services installed yet), and when changing kernels I was unable to boot, even with the previous kernel wich was the kernel of the LiveCD. Trying to chroot into the system from the LiveCD also hung the kernel! The filesystem checks gave no problems, but the chroot hangup persisted. I tried a second install, on another machine (as I thought it could be a hardware problem) and got a kernel panic (unable to handle paging request) during install (still with the LiveCD system running, which run overnight updating world in the chroot of the new system). I used RAID1 for the swap too, as I want reliability.

My idea is now, that the 2.6.12-gentoo-r6 kernel of the LiveCD could be the problem. As mentioned in this howto there is a problem with RAID1 that is fixed in 2.6.12-gentoo-r9 and kernels 2.6.13. Maybe the problem of setting up a system as described (with root and swap on evms) is that the kernel of the LiveCD has problems with RAID1?

FollowUp: I now first installed a temporary system on normal partitions, updated to kernel 2.6.13 (I used vserver-sources) and then installed the EVMS system with root on RAID1. This worked and the system is now running flawlessly for 5 days...!

Here is what I did in detail: As there are two disks in the box, I used one for the temporary system, and the second for RAID1. Fortunately I installed the EVMS system twice on the second disc (copied it), once as "rescue" and once as "main". After I was able to boot from the second disk (with RAID1 but only one disc - which means deprecated RAID arrays), I repartitioned the temporary first disc and added the partitions to the RAID1 arrays to get them fully working. It was not possible to add them to the running root-RAID1 array, so I had to reboot to my rescue system (also on RAID1) and then both EVMS systems (rescue and main) where on full functioning RAID1 (needed still some time for recovery).


I was reading this howto on how to setup evms with gentoo but something caught my eyes. Why do you want to strip (raid 0) the swap space? You don't need a striped volume to get RAID 0 performance with swap. Just setup 2 partitions on different disks at the same priority. The Linux memory subsystem will automatically strip the swap. Mirroring swap might be usefull on the other hand, you swap will keep gong even if one disk gets bad. EricL


After chroot I could not access my evms setup anymore because /dev/evms/ was empty. It took me some time to find the solution: evms uses sysfs to find block devices. strace revealed it looks at /newroot/sys/block which was not there. So I made ln -s / /newroot within the chroot session. evms worked then...


has anybody successfuly expanded a raid 5? i cannot do it, and believe me, i have tried everything. for details. here btw i havent used lvm2.

[edit] A. Booting with Gentoo 2005.1 and newer and a recent kernel

The current evms ebuilds (2.5.3-r1, 2.5.5, and 2.5.5-r1) do not support the "static" useflag. It doesn't seem to be neccessary anymore, as I've successfully booted a new Gentoo EVMS system and am using it without any problems:

oak ~ # mount
/dev/evms/root on / type reiserfs (rw,noatime,notail)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
udev on /dev type tmpfs (rw,nosuid)
devpts on /dev/pts type devpts (rw)
/dev/evms/usr on /usr type reiserfs (rw,noatime,notail)
/dev/evms/home on /home type reiserfs (rw,noatime,notail)
/dev/evms/var on /var type reiserfs (rw,noatime,notail)
/dev/evms/log on /var/log type reiserfs (rw,noatime,notail)
/dev/evms/tmp on /tmp type reiserfs (rw,noatime,notail)
shm on /dev/shm type tmpfs (rw,noexec,nosuid,nodev)
usbfs on /proc/bus/usb type usbfs (rw,devmode=0664,devgid=85)
/dev/evms/boot on /boot type ext3 (rw,noatime)

delete /etc/mtab after grub setup

after following this howto, i couldn't get evms to boot up and mount itself on / until i removed /etc/mtab (/mnt/gentoo/etc/mtab during setup). the gentoo handbook installation instructions instruct you to create an /etc/mtab file as part of the grub bootloader configuration, once i removed this /etc/mtab i was able to boot evms on /.

Yes - I second this! I had the same problem, but after deleting the invalid /etc/mtab, things worked perfercly. This should really be documented better somewhere. The handbook should definitely mention that if you're using EVMS that you should delete the mostly invalid mtab after getting boot loader configured.