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 5A5EC1381F3 for ; Sun, 20 Oct 2013 09:55:02 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0D813E0BFC; Sun, 20 Oct 2013 09:54:54 +0000 (UTC) Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com [209.85.212.175]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C6570E0AD9 for ; Sun, 20 Oct 2013 09:54:52 +0000 (UTC) Received: by mail-wi0-f175.google.com with SMTP id hm4so2696852wib.14 for ; Sun, 20 Oct 2013 02:54:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:reply-to:to:subject:date:user-agent:references:in-reply-to :mime-version:content-type:content-transfer-encoding:message-id; bh=m9iJdR2cOJuWHLrmAqe5WZ+Z6Y5q9c4I8vjJd9P1SHQ=; b=CsDtaLcaAggmzxH+t55hKyEv3ETwAoconmkbouav4bfuJERV1lWKT5cO6JdUbLVhU0 wrxpNfx2kieCVCnm/UKaqfmmOnlZrkDqvBgOLW+FGfAdtnFS/Hpumjfj/l3qGCbkmZkj DcZTRZ84LraPcgnaOIxv1Auapx2LGyZeML7rDdvTo7vsMESv0pK4V/GERfTXnaK615VQ Uu6+7XfyTNYOT+Si2OmcdQw9yZIAHh/eNhvq2YTQdq7UtbnjaNcgHyoTzE7k5CqGugxe WnKAYpeH1TbrPziNSO9E3eTtpnflSM8vO241sUUI5FL4sEv1MxDgx2JYRM3RyUku0ZNI I1RA== X-Received: by 10.180.13.113 with SMTP id g17mr5637230wic.19.1382262891375; Sun, 20 Oct 2013 02:54:51 -0700 (PDT) Received: from dell_xps.localnet (230.3.169.217.in-addr.arpa. [217.169.3.230]) by mx.google.com with ESMTPSA id bs15sm44322278wib.10.2013.10.20.02.54.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 20 Oct 2013 02:54:50 -0700 (PDT) From: Mick To: gentoo-user@lists.gentoo.org Subject: [gentoo-user] Re: [O/T] RAID help - now won't boot Date: Sun, 20 Oct 2013 10:54:15 +0100 User-Agent: KMail/1.13.7 (Linux/3.10.7-gentoo-r1; KDE/4.10.5; x86_64; ; ) References: <201310150834.21103.michaelkintzios@gmail.com> <20131016181040.GA7388@vidovic> <20131016201438.GB7388@vidovic> In-Reply-To: <20131016201438.GB7388@vidovic> 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 Content-Type: multipart/signed; boundary="nextPart9806522.cNFJDuS3ht"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201310201054.45575.michaelkintzios@gmail.com> X-Archives-Salt: e2e91090-e45d-4d0a-85ae-7751a6b04fb8 X-Archives-Hash: fe685ad7fea0f3329135a462744058c3 --nextPart9806522.cNFJDuS3ht Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Wednesday 16 Oct 2013 21:14:38 Nicolas Sebrecht wrote: > On Wed, Oct 16, 2013 at 08:10:40PM +0200, Nicolas Sebrecht wrote: > > On Tue, Oct 15, 2013 at 10:42:18PM +0100, Mick wrote: > > > mdadm --create --auto=3Dmdp --verbose /dev/md_d0 --level=3Dmirror > > > --raid-devices=3D2 /dev/sda /dev/sdb > > >=20 > > > which is thereafter partitioned with fdisk. This is the one I have > > > used in the past. > > >=20 > > > Which one is preferable, or what are the pros & cons of each? > >=20 > > For a basic RAID1, the best is to keep it as simple as possible. So > > mirroring while disk looks better. It will also keep MBR/GPT synced. >=20 > s/while/the whole/ >=20 > > I tend to make manual partitions that I mirror but this is because I > > usually require to do more complex setups (e.g. mixing mirror types), or > > because I need to have the setup more flexible. OK, I spent some time to experiment in a VM. Two small un-partitioned virt= ual=20 disks which I used to create /dev/md0 as RAID 1 using sysrescuecd. Then I= =20 used fdisk to create a MSDOS partition table on /dev/md0, followed by 4=20 partitions on /dev/md0: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ~$ fdisk -l Disk /dev/sda: 10.5 GB, 10522460160 bytes 255 heads, 63 sectors/track, 1279 cylinders, total 20551680 sectors Units =3D sectors of 1 * 512 =3D 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Disk /dev/sda doesn't contain a valid partition table Disk /dev/sdb: 10.5 GB, 10522460160 bytes 255 heads, 63 sectors/track, 1279 cylinders, total 20551680 sectors Units =3D sectors of 1 * 512 =3D 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Disk /dev/sdb doesn't contain a valid partition table Disk /dev/md0: 10.5 GB, 10521337856 bytes 2 heads, 4 sectors/track, 2568686 cylinders, total 20549488 sectors Units =3D sectors of 1 * 512 =3D 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x000c3148 Device Boot Start End Blocks Id System /dev/md0p1 * 2048 718847 358400 83 Linux /dev/md0p2 718848 3790847 1536000 82 Linux swap / Solar= is /dev/md0p3 3790848 18470911 7340032 83 Linux /dev/md0p4 18470912 20549487 1039288 83 Linux =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D So, no partition tables on /dev/sda or /dev/sdb drives and of course no=20 partitions at all. The partitions were created on the /dev/md0 block devic= e. I then rebooted with a Ubuntu server CD and installed the OS in the=20 above filesystem. It seemed to have recognised the RAID1 array as /dev/md1= 27,=20 instead of /dev/md0. Trying to install GRUB on /dev/sda, or /dev/sdb, or /dev/md127p1 failed. T= he=20 only way to install GRUB and complete the Ubuntu server OS installation was= to=20 install it on /dev/md127, which it accepted. However, on rebooting it fail= ed=20 with: "FATAL: No boot medium found! System halted." Rebooting with sysrescueCD and selecting to scan and boot any linux OS it=20 could find, it picks up the RAID1 installation and it boots into it without= =20 any problem. This is what I can see now: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ~$ lsblk=20 NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 9.8G 0 disk =20 =E2=94=94=E2=94=80md0 9:0 0 9.8G 0 raid1=20 =E2=94=9C=E2=94=80md0p1 259:0 0 350M 0 md /boot =E2=94=9C=E2=94=80md0p2 259:1 0 1.5G 0 md [SWAP] =E2=94=9C=E2=94=80md0p3 259:2 0 7G 0 md / =E2=94=94=E2=94=80md0p4 259:3 0 1015M 0 md /home sdb 8:16 0 9.8G 0 disk =20 =E2=94=94=E2=94=80md0 9:0 0 9.8G 0 raid1=20 =E2=94=9C=E2=94=80md0p1 259:0 0 350M 0 md /boot =E2=94=9C=E2=94=80md0p2 259:1 0 1.5G 0 md [SWAP] =E2=94=9C=E2=94=80md0p3 259:2 0 7G 0 md / =E2=94=94=E2=94=80md0p4 259:3 0 1015M 0 md /home =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ~$ df -h -T =46ilesystem Type Size Used Avail Use% Mounted on /dev/md0p3 ext4 6.9G 1.2G 5.4G 18% / udev tmpfs 10M 8.0K 10M 1% /dev none tmpfs 146M 352K 146M 1% /run none tmpfs 5.0M 0 5.0M 0% /run/lock none tmpfs 730M 0 730M 0% /run/shm /dev/md0p1 ext2 329M 27M 285M 9% /boot /dev/md0p4 ext4 999M 18M 931M 2% /home =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ~$ cat /proc/mdstat=20 Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4= ]=20 [raid10]=20 md0 : active raid1 sda[0] sdb[1] 10274744 blocks super 1.2 [2/2] [UU] =20 unused devices: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ~$ sudo blkid=20 /dev/sr0: LABEL=3D"sysrcd-3.8.0" TYPE=3D"iso9660"=20 /dev/sda: UUID=3D"59195572-751a-3bd9-7771-6e5411b032c8"=20 UUID_SUB=3D"3acd1b2c-1c95-7c07-a8b2-8aa1b2a0a169" LABEL=3D"sysresccd:0"=20 TYPE=3D"linux_raid_member"=20 /dev/sdb: UUID=3D"59195572-751a-3bd9-7771-6e5411b032c8" UUID_SUB=3D"c63e97b= a-42cb- c4f8-550d-f1effae33d3f" LABEL=3D"sysresccd:0" TYPE=3D"linux_raid_member"=20 /dev/md0p1: UUID=3D"d9dbe2bc-0453-46e4-a5b0-779e55246004" TYPE=3D"ext2"=20 /dev/md0p2: UUID=3D"f1a41bba-d519-42d5-8b9d-19292da899bd" TYPE=3D"swap"=20 /dev/md0p3: UUID=3D"63d67a30-b4e9-4792-a081-cf1caae281ae" TYPE=3D"ext4"=20 /dev/md0p4: UUID=3D"d6dc0b67-cbd3-47ae-a886-34299f491279" TYPE=3D"ext4" =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ~$ sudo mdadm -Db /dev/md0 =20 ARRAY /dev/md0 metadata=3D1.2 name=3Dsysresccd:0=20 UUID=3D59195572:751a3bd9:77716e54:11b032c8 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ~$ sudo mdadm --detail /dev/md0 /dev/md0: Version : 1.2 Creation Time : Sat Oct 19 14:17:46 2013 Raid Level : raid1 Array Size : 10274744 (9.80 GiB 10.52 GB) Used Dev Size : 10274744 (9.80 GiB 10.52 GB) Raid Devices : 2 Total Devices : 2 Persistence : Superblock is persistent Update Time : Sun Oct 20 10:26:56 2013 State : clean=20 Active Devices : 2 Working Devices : 2 Failed Devices : 0 Spare Devices : 0 Name : sysresccd:0 UUID : 59195572:751a3bd9:77716e54:11b032c8 Events : 19 Number Major Minor RaidDevice State 0 8 0 0 active sync /dev/sda 1 8 16 1 active sync /dev/sdb =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D This is my /etc/mdadm/mdadm.conf: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ~$ cat /etc/mdadm/mdadm.conf=20 # mdadm.conf # # Please refer to mdadm.conf(5) for information about this file. # # by default (built-in), scan all partitions (/proc/partitions) and all # containers for MD superblocks. alternatively, specify devices to scan, us= ing # wildcards if desired. #DEVICE partitions containers # auto-create devices with Debian standard permissions CREATE owner=3Droot group=3Ddisk mode=3D0660 auto=3Dyes # automatically tag new arrays as belonging to the local system HOMEHOST # instruct the monitoring daemon where to send mail alerts MAILADDR root # definitions of existing MD arrays ARRAY /dev/md0 metadata=3D1.2 UUID=3D59195572:751a3bd9:77716e54:11b032c8 # This file was auto-generated on Sat, 19 Oct 2013 15:23:12 +0100 # by mkconf $Id$ =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Any ideas why the Ubuntu installation won't boot? PS. In case you ask: I'm trying with Ubuntu because the user would strugg= le=20 to look after a Gentoo system for this implementation. =2D-=20 Regards, Mick --nextPart9806522.cNFJDuS3ht Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQEcBAABAgAGBQJSY6hlAAoJELAdA+zwE4YerXQIAKW2Nu0tjTEwQ4/aJh/jgfLU nHYiQttVIs7kLvPI97+Hal3/4rJRT5bkFyEQWemO3F6Ge8hpBLdup94udnDOb3gT M2T7iHma3ainby4XHdBHhwuiYouDm4CaKL0vkUkQpmdrl8ylt8fihJRa/ty47fq8 mlp8foV7G8sPxtvK89hTEuMsqGRX/oXpr7wTLJC4gj93S2KeezHI1ELevM2mc7hi QDYIDOdPz5dZAa4gDG1PUCj8db1aGKkSh2AcPnqWHFdWXL4tvWkn6WEHmRyiEhYw xaOm0UHGVMGv431iXVZ1gC/OmI/vJtei3H/VhSHjPNbz7s58YhK+RqEboJpecsQ= =eYwS -----END PGP SIGNATURE----- --nextPart9806522.cNFJDuS3ht--