From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 1EBBB138CD2 for ; Sun, 17 May 2015 11:49:28 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6CEEFE08A2; Sun, 17 May 2015 11:49:21 +0000 (UTC) Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com [209.85.212.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 66F5BE088F for ; Sun, 17 May 2015 11:49:20 +0000 (UTC) Received: by wicmc15 with SMTP id mc15so69382648wic.1 for ; Sun, 17 May 2015 04:49:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-type; bh=bXEeyS5dmOtbt9WhgkqePcjBtF2S27q5XBBQ2CFqLPw=; b=SUkAA1A3h3yO5LsAupes4dhlbQAF2f/3mjPQYNqK5WHvGkbLMPniEJneWan4wFbL8C lBfTkwbOUkU2t/e2LPvkoJrvWcykCdFrIALJW4iHM8/ItXRnTlMYdl4k//Wp6/qEaN7E etBxwt3SrzcVyFxeCHPyvGhtYE8iL8iLW+dpWyVF8RhVXfnVx8XOfcwXLGcdSf/7+37V 8qaO/IcpsgmmOwiEGQuofqj6lZ945FbVCcUmYh+dcSYUkk3FTadywnn63xH3QE1YTkXO XKz1samBeIw8glzkKWcioaP7NhDHZ2KCU4PMzcp0jYJrlfW/cp2fZEf8hFHzdqQWALxK 1sgw== X-Gm-Message-State: ALoCoQl7iNwAbXodHrUVrSQdNpSusRXjD/Dq4iFqbB8LYU2y4QDquwXi76hxRZZHwEhxzkNOO1hv X-Received: by 10.180.207.67 with SMTP id lu3mr13375729wic.10.1431863359261; Sun, 17 May 2015 04:49:19 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Received: by 10.28.213.9 with HTTP; Sun, 17 May 2015 04:48:58 -0700 (PDT) From: =?UTF-8?Q?Nuno_Magalh=C3=A3es?= Date: Sun, 17 May 2015 12:48:58 +0100 Message-ID: Subject: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2 To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 X-Archives-Salt: 7cd5c0e2-d6e6-4d10-a362-68fafde54cc3 X-Archives-Hash: 3697bc162b26526504298dc1f8a00df3 Hello Gentoo World, TL;DR warning I've tested Gentoo and liked it, tried to tune it a bit and borked it. :) I want to use mdadm to create a RAID1 with 2 SATA disks. From what i gather, i'll need (bootable) 0xFD partitions, i'll use full disk for them and no separate /boot (unless required). Is GPT required or can i stick to MBR? Is fdisk safe? Seems usable to me. Is 0.90 metadata mandatory for RAID1? What's the recommended version? I've seen manuals that use mknode, but discovered that mdadm --create will create a /dev/md for me. (Later i want to get rid of systemd-udev and use eudev instead.) Also, why so many tty* and similar in /dev? Is there a way to make it less crowded? Just a whim... Does GRUB2 (rather grub2-install) handle well RAID1 stuff or does it get confused? What's the difference between dodmraid and domdadm? I don't want to use fakeraid, so is it safe to just use domdadm? Then i want to use LVM on the /dev/md and setup my / in an LV. This seems straightforward (as far as creation goes). Any tips here? I remember you could tune LVM LVs to the underlying RAID stripe. I intend to use XFS for /. Incidentally, if i later decide to "fork out" /usr (or some other subdirectory) into it's own LV, is it "just" a mater of copying its contents and updating /etc/fstab? Or should i just do it now and expand the LVs if later required (especially if i want to use different filesystems)? The problem will be (has been) getting it to boot. If i have 2 kernels in /boot, shouldn't grub2-mkconfig generate 2 entries in the GRUB boot menu (not counting the recovery entries)? I read somewhere that genkernel is a bad choice for creating the kernel because it un/sets a CONFIG_ flag that interferes with RAID/LVM (sorry, i should've noted where/what). I use make menuconfig anyway, it's fun. I do use genkernel to create the initramfs, i'm assuming "genkernel --lvm --mdadm --bootloader=grub --install initramfs" would suffice? I'm assuming the key will be to make sure /etc/mdadm.conf has the ARRAY= line and that GRUB has the right parameters in /etc/default/grub, like GRUB_PRELOAD_MODULES=raid,lvm Or mdraid09? Where do these come from, /etc/grub/i386pc? Mine's an amd64 but that's the only directory i could find. GRUB_CMDLINE_LINUX_DEFAULT="domdadm dolvm rootfstype=xfs" Are there any USE flags i should be aware of? Currently i'm gonna go with USE="bindist 3dnow 3dnowext mmx mmxext popcnt sse sse2 sse3 sse4a smp ssl unicode -avahi -pulseaudio -selinux -gnome -kde -systemd -bluetooth -ieee1394 -networkmanager -fortran" Plus CPU_FLAGS_X86 based on an emerge news item about processor flags. Neither RAID nor LVM should have an impact, application-wise. While the Handbook is awesome, it doesn't cover this and all the information i find is either outdated or conflicting. I had a similar setup with Debian Wheezy on this same hardware, but that was done through the debian installer, nifty and under the hood. Incidentally, the hardware's an Asus M2NPV-VM with 4 SATA II disks. It's my desktop, not mission-critical, but i want to make the most of it. Thanks for the patience and feedback (and the distro!) :) Cheers, Nuno