Summary: | upgrade sys-fs/device-mapper & sys-fs/lvm2 for virtio support | ||
---|---|---|---|
Product: | Gentoo Hosted Projects | Reporter: | Lance Albertson <lance> |
Component: | genkernel | Assignee: | Gentoo Genkernel Maintainers <genkernel> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | CC: | kayvansylvan, sping |
Priority: | High | Keywords: | InVCS |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 351772 |
Description
Lance Albertson
2009-04-24 21:19:50 UTC
genkernel: bump I ran into this too. I'm trying to simulate setting up a Gentoo system with 4 disks, each set of 2 disks set up in a software RAID1, with the /boot on an md device and the remainder of the RAID1 devices in a volume group, from which I parse out the root filesystem, etc. Like this: (chroot) livecd home # cat /proc/mdstat Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] md1 : active raid1 vda1[0] vdb1[1] 97664 blocks [2/2] [UU] md2 : active raid1 vda3[0] vdb3[1] 25139456 blocks [2/2] [UU] md3 : active raid1 vdc1[0] vdd1[1] 26213952 blocks [2/2] [UU] unused devices: <none> (chroot) livecd home # pvscan PV /dev/md2 VG vg lvm2 [23.97 GiB / 8.97 GiB free] PV /dev/md3 VG vg lvm2 [25.00 GiB / 3.00 GiB free] Total: 2 [48.97 GiB] / in use: 2 [48.97 GiB] / in no VG: 0 [0 ] And so, the set of filesystems, including /, are: /dev/mapper/vg-root 2064208 311096 1648256 16% / /dev/md1 94567 9666 80018 11% /boot /dev/mapper/vg-home 2064208 115920 1843432 6% /home /dev/mapper/vg-opt 1032088 34088 945572 4% /opt /dev/mapper/vg-root 2064208 311096 1648256 16% /root /dev/mapper/vg-usr 10321208 2098648 7698272 22% /usr /dev/mapper/vg-var 20642428 211060 19382792 2% /var /dev/mapper/vg-tmp 2064208 68676 1890676 4% /tmp Examining the initramfs, I can see that the genkernel generated initramfs does not include any of the virtio modules. As a result, no virtio block devices are seen and the mdraid devices are never assembled. (In reply to comment #2) > I ran into this too. I'm trying to simulate setting up a Gentoo system with 4 > disks, each set of 2 disks set up in a software RAID1, with the /boot on an md > device and the remainder of the RAID1 devices in a volume group, from which I > parse out the root filesystem, etc. > > Like this: > > (chroot) livecd home # cat /proc/mdstat > Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] > md1 : active raid1 vda1[0] vdb1[1] > 97664 blocks [2/2] [UU] > > md2 : active raid1 vda3[0] vdb3[1] > 25139456 blocks [2/2] [UU] > > md3 : active raid1 vdc1[0] vdd1[1] > 26213952 blocks [2/2] [UU] > > unused devices: <none> > > (chroot) livecd home # pvscan > PV /dev/md2 VG vg lvm2 [23.97 GiB / 8.97 GiB free] > PV /dev/md3 VG vg lvm2 [25.00 GiB / 3.00 GiB free] > Total: 2 [48.97 GiB] / in use: 2 [48.97 GiB] / in no VG: 0 [0 ] > > > And so, the set of filesystems, including /, are: > > /dev/mapper/vg-root 2064208 311096 1648256 16% / > /dev/md1 94567 9666 80018 11% /boot > /dev/mapper/vg-home 2064208 115920 1843432 6% /home > /dev/mapper/vg-opt 1032088 34088 945572 4% /opt > /dev/mapper/vg-root 2064208 311096 1648256 16% /root > /dev/mapper/vg-usr 10321208 2098648 7698272 22% /usr > /dev/mapper/vg-var 20642428 211060 19382792 2% /var > /dev/mapper/vg-tmp 2064208 68676 1890676 4% /tmp > > Examining the initramfs, I can see that the genkernel generated initramfs does > not include any of the virtio modules. > > As a result, no virtio block devices are seen and the mdraid devices are never > assembled. > genkernel can be configured to include the virtio modules in the initramfs by appending the following line to your /etc/genkernel.conf: MODULES_KVM="virtio virtio_balloon virtio_ring virtio_pci virtio_blk virtio_net" You can then load the block driver on boot by appending the following to your kernel boot options: doload=virtio_pci,virtio_blk I have a guest using the virtio drivers and running entirely on top of LVM whose kernel I build with genkernel using the above method. I'm using Grub 2 as the bootloader. I DID NOT use grub-mkconfig as it seems to be broken (I emerged grub-9999 since grub-1.98's root-on-LVM support also seems to be broken). device-mapper 1.02.28 seems to build fine but I currently cannot get LVM2 compiling from genkernel. I get errors for all of 2.02.28, 2.02.36 and 2.02.74. I have tried applying patches from Gentoo ebuilds, too. Please help me getting a newer version compiling. These commands can get you started. # git clone git://git.overlays.gentoo.org/proj/genkernel.git # git co -t origin/experimental # sudo mv /sbin/lvm.static{,_BACKUP} # sudo GK_SHARE="$PWD" ./genkernel initramfs Patches found in ${GK_SHARE}/patches/lvm/${LVM_VER}/ are auto-applied for you. PS: "git co" is my alias for "git checkout". Should have said that. genkernel-99999 (five nines) is now using LVM 2.02.74 which does not depend on sys-fs/device-mapper any more. |