From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Rk4aG-0002tN-JV for garchives@archives.gentoo.org; Mon, 09 Jan 2012 02:03:36 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 769C221C036; Mon, 9 Jan 2012 02:03:27 +0000 (UTC) Received: from oproxy6-pub.bluehost.com (oproxy6-pub.bluehost.com [67.222.54.6]) by pigeon.gentoo.org (Postfix) with SMTP id 709AB21C033 for ; Mon, 9 Jan 2012 02:02:20 +0000 (UTC) Received: (qmail 2025 invoked by uid 0); 9 Jan 2012 02:02:19 -0000 Received: from unknown (HELO box347.bluehost.com) (69.89.31.147) by cpoproxy3.bluehost.com with SMTP; 9 Jan 2012 02:02:19 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lotussevencars.com; s=default; h=Mime-Version:Content-Transfer-Encoding:Content-Type:References:In-Reply-To:Date:To:Reply-To:From:Subject:Message-ID; bh=KIQSfNI/xUd5m55i4ZGUOLYuEwrR+h3QEqvWVkVdlHw=; b=W12nzwIH7ON6FwbK6qwrPRINxz2HJLN7F8+Pd+bvpdvKEldXAPp05z0vRVK8jDMIDgq6BcQ3YxBhZp+cn5/P6kZDO9aeBvJoGr/dx0Ok+HT7xet4UZt42STPDR4bgAe4; Received: from adsl-68-221-20-57.rmo.bellsouth.net ([68.221.20.57] helo=[192.168.1.65]) by box347.bluehost.com with esmtpsa (SSLv3:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1Rk4Z0-0000tH-Tt for gentoo-user@lists.gentoo.org; Sun, 08 Jan 2012 19:02:19 -0700 Message-ID: <1326056536.15344.3.camel@office-desktop.gateway.2wire.net> Subject: Re: [gentoo-user] How to get raid From: Jeff Cranmer To: gentoo-user@lists.gentoo.org Date: Sun, 08 Jan 2012 16:02:16 -0500 In-Reply-To: <1326053001.4443.19.camel@laptop.limeyworld> References: <1325645839.4553.13.camel@laptop.limeyworld> <4308091.7xnRLljmXt@localhost> <1325825050.5380.30.camel@laptop.limeyworld> <3847798.qPIUxmf7eF@localhost> <1325891080.4278.1.camel@laptop.limeyworld> <1325949066.4278.9.camel@laptop.limeyworld> <1325956808.4278.15.camel@laptop.limeyworld> <4F09E10A.6080505@gmail.com> <1326053001.4443.19.camel@laptop.limeyworld> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.2.2 Content-Transfer-Encoding: 7bit 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 X-Identified-User: {793:box347.bluehost.com:lotussev:lotussevencars.com} {sentby:smtp auth 68.221.20.57 authed with jeff@lotussevencars.com} X-Archives-Salt: 07281c3f-9ba6-41af-8245-48b618187ec1 X-Archives-Hash: 651b1566bb2fbc817f19f50cbb7dc9b9 On Sun, 2012-01-08 at 15:03 -0500, Jeff Cranmer wrote: > On Sun, 2012-01-08 at 12:31 -0600, Paul Hartman wrote: > > > > > > What is going on here? > > > > (I didn't read this whole thread, sorry if I'm repeating someone else's > > advice) > > > > kernel autodetection only works on old superblock version 0.90, you're > > using 1.2. Not a big deal, we use mdadm to do it. > > > > Define your arrays in /etc/mdadm.conf and start /etc/init.d/mdadm in > > your boot runscripts with "rc-update add mdadm boot", it will bring up > > the array at boot time. > > > > In my mdadm.conf i have a line like this: > > > > ARRAY /dev/md1 metadata=1.01 name=black:1 > > UUID=8e653e72:9d5df6ba:bb66ea8b:02f1c317 > > > > (might be word-wrapped, should be all one line) > > > > That's all that was needed to bring it up automatically at boot time. > > > > Also AFAIR there was a "gotcha" about the hostname stored in the array's > > metadata must match your machine's hostname or else mdadm auto-assemble > > won't accept it (to protect you in case you're plugging disks from > > another machine for recovery, you don't want it to use them as your main > > drives), so in that case you must specify it explicitly or set the AUTO > > parameter in mdadm.conf to accept this condition. If you created the > > array from within a LiveCD or on another machine, the hostname might not > > match your system. > > > > See the mdadm manpage for more info. > > mdadm was added to the default level, not boot. > My /etc/mdadm.conf file has two active lines > DEVICE /dev/sd[bcd]1 > ARRAY dev/md0 metadata=1.2 spares=1 name=office-desktop:0 > devices=/dev/sdb1,dev/sdc1,/dev/sdd1 > > It looks like I'm having trouble with a faulty /dev/sdc1, so what I'd > like to do is wipe out the existing array and try starting a RAID1 array > just with sdb1 and sdd1. > > I got rid of the old array by using the commands > mdadm --manage --fail /dev/md0 > mdadm --manage --stop /dev/md0 > > I then used mdadm --verbose --create /dev/md0 --level=1 > --raid-devices=2 /dev/sdb1 /dev/sdd1 > > The result of this command was > dadm: /dev/sdb1 appears to be part of a raid array: > level=raid5 devices=3 ctime=Sat Jan 7 08:16:00 2012 > mdadm: partition table exists on /dev/sdb1 but will be lost or > meaningless after creating array > mdadm: Note: this array has metadata at the start and > may not be suitable as a boot device. If you plan to > store '/boot' on this device please ensure that > your boot-loader understands md/v1.x metadata, or use > --metadata=0.90 > mdadm: /dev/sdd1 appears to be part of a raid array: > level=raid5 devices=3 ctime=Sat Jan 7 08:16:00 2012 > mdadm: size set to 1465136400K > Continue creating array? y > mdadm: Defaulting to version 1.2 metadata > mdadm: array /dev/md0 started. > > The results of cat /proc/mdstat are > Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] > [raid4] [multipath] > md0 : active raid1 sdd1[1] sdb1[0] > 1465136400 blocks super 1.2 [2/2] [UU] > [>....................] resync = 2.1% (31838144/1465136400) > finish=269.7min speed=88551K/sec > > unused devices: > > Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] > [raid4] [multipath] > md0 : active raid1 sdd1[1] sdb1[0] > 1465136400 blocks super 1.2 [2/2] [UU] > [>....................] resync = 2.1% (31838144/1465136400) > finish=269.7min speed=88551K/sec > > unused devices: > > The results of mdadm --detail /dev/md0 are > /dev/md0: > Version : 1.2 > Creation Time : Sun Jan 8 14:47:43 2012 > Raid Level : raid1 > Array Size : 1465136400 (1397.26 GiB 1500.30 GB) > Used Dev Size : 1465136400 (1397.26 GiB 1500.30 GB) > Raid Devices : 2 > Total Devices : 2 > Persistence : Superblock is persistent > > Update Time : Sun Jan 8 14:48:54 2012 > State : active, resyncing > Active Devices : 2 > Working Devices : 2 > Failed Devices : 0 > Spare Devices : 0 > > Rebuild Status : 2% complete > > Name : office-desktop:0 (local to host office-desktop) > UUID : bfc16c6e:4e8cb910:96ff7ed2:6fec32bc > Events : 1 > > Number Major Minor RaidDevice State > 0 8 17 0 active sync /dev/sdb1 > 1 8 49 1 active sync /dev/sdd1 > > When I try to mount this drive, however, I get > mount: /dev/md0: can't read superblock > > What do I need to do to complete the process? > > Thanks > > Jeff > > > Success - I managed to get a raid1 device operating. I created the final filesystem by using mkfs.xfs -f /dev/md0, then waited for the rebuild to complete before rebooting the system. It appears to be created successfully. Now I'll try the same sequence with sdb and sdc to see if sdc is a good disk. If that works, I'll retry a raid5 array tomorrow night. Jeff