From owner-freebsd-questions@FreeBSD.ORG Wed Dec 8 10:08:13 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 70DA816A4CE for ; Wed, 8 Dec 2004 10:08:13 +0000 (GMT) Received: from mta10-winn.mailhost.ntl.com (mailhost.ntl.com [212.250.162.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9B05D43D62 for ; Wed, 8 Dec 2004 10:08:12 +0000 (GMT) (envelope-from scott@fishballoon.org) Received: from aamta06-winn.mailhost.ntl.com ([212.250.162.8]) by mta10-winn.mailhost.ntl.com with ESMTP <20041208100809.SIII28609.mta10-winn.mailhost.ntl.com@aamta06-winn.mailhost.ntl.com>; Wed, 8 Dec 2004 10:08:09 +0000 Received: from llama.fishballoon.org ([82.4.146.133]) by aamta06-winn.mailhost.ntl.com with ESMTP <20041208100809.BBEQ1456.aamta06-winn.mailhost.ntl.com@llama.fishballoon.org>; Wed, 8 Dec 2004 10:08:09 +0000 Received: from tuatara.fishballoon.org ([192.168.1.6]) by llama.fishballoon.org with esmtp (Exim 4.43 (FreeBSD)) id 1Cbyk1-000M6t-Fo; Wed, 08 Dec 2004 10:08:13 +0000 Received: (from scott@localhost) by tuatara.fishballoon.org (8.13.1/8.13.1/Submit) id iB8A95gE012738; Wed, 8 Dec 2004 10:09:05 GMT (envelope-from scott) Date: Wed, 8 Dec 2004 10:09:05 +0000 From: Scott Mitchell To: orville weyrich Message-ID: <20041208100905.GA12684@tuatara.fishballoon.org> References: <20041208054552.71553.qmail@web50708.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041208054552.71553.qmail@web50708.mail.yahoo.com> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 4.10-STABLE i386 cc: freebsd-questions@freebsd.org Subject: Re: Has anybody EVER successfully recovered VINUM? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Dec 2004 10:08:13 -0000 On Tue, Dec 07, 2004 at 09:45:51PM -0800, orville weyrich wrote: > I have been trying to figure out how to get VINUM to > recognize a new disk after a disk failure, and no luck > at all. > > I cannot find instructions in the official > documentation, nor in the FreeBSD Dairy. > > Lots of places tell how to build a VINUM system. > Nobody ever takls about how to recover from a disk > failure. > > Can someone PLEASE help me recover? I have already > posted complete information to this list, with no > answer. I will give a short version now and provide > more info if requested. Hi Orville, We have successfully replaced failed drives in Vinum RAID-5 volumes several times, on a couple of different machines. Obviously no guarantees that these steps will work for you, but this is what we did: 1. Pull the failed drive. The machines in question use Intel L440GX+ boards with hot-swap SCSI drive cages, so this was as simple as popping out the dead drive. 2. Plug in a new drive. The hardware and FreeBSD seemed quite happy with this, whether because the new drive was identical to the old one, or our SCSI layer is just smart enough to deal with this, I don't know. I've never had to replace a failed drive with a larger one, so I have no idea if this would work or not. 3. Clean any existing partition table and boot blocks off the new drive, just in case: # dd if=/dev/zero of=/dev/da0 bs=1k count=1 4. Put a default BSD disklabel on the new drive: # disklabel -w -r da0 auto 5. Edit the disklabel to add the Vinum partition: # disklabel -e -r da0 Just copy the 'c' partition line to 'a', change the partition type to 'vinum' and clear out the 'fsize' and 'bsize' fields. You can always check the disklabel on one of the other drives to see what it should look like. Of course this assumes you're dedidating the entire disk to the Vinum partition. If replacing the failed drive with a larger disk, adjust accordingly - the important thing is that the new partition is the same size as the old one. 6. Tell vinum to restart the failed subdisk: # vinum start raid.p0.s0 7. Wait ages while the new disk is 'revived'. I was quite impressed that the volume remained available with users accessing it throughout this procedure :-) To play it safe you might want to unmount the volume before starting. There was one instance where the machine was for some reason rebooted after the drive failure - vinum somehow completely forgot about that subdisk when it came back up. I *think* we fixed this by generating a new vinum config just for that subdisk, something like: drive d0 device /dev/da0a Once this was done vinum seemed happy to rebuild on the new drive. This procedure has worked for us several times, but I have no idea if it's the 'right' way to do this. Maybe we're just really lucky. So if you follow these instructions and end up trashing your disks, it's not my fault. I *really* recommend having a recent backup before starting, assuming the volume is still readable, just in case. Good luck! Scott -- =========================================================================== Scott Mitchell | PGP Key ID | "Eagles may soar, but weasels Cambridge, England | 0x54B171B9 | don't get sucked into jet engines" scott at fishballoon.org | 0xAA775B8B | -- Anon