From owner-freebsd-current@FreeBSD.ORG Thu Jul 12 23:28:11 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BEB5616A421 for ; Thu, 12 Jul 2007 23:28:11 +0000 (UTC) (envelope-from joao.barros@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.173]) by mx1.freebsd.org (Postfix) with ESMTP id 48C7D13C447 for ; Thu, 12 Jul 2007 23:28:10 +0000 (UTC) (envelope-from joao.barros@gmail.com) Received: by ug-out-1314.google.com with SMTP id o4so512123uge for ; Thu, 12 Jul 2007 16:28:10 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=RDIVxHZmJnOfazbRJFa8fg+k32bJ9lAteSJymbRhmqw5DUWKZeQCnaPrg3k5r7+zFbW41gIWGJBVL1mYz9IlhXeuIgzx2FMGrSda1rAwFjOA/i9SjLrgaff/mSR5QLfhDVwjhH+mCOMDcggoEdDi/Y80T2bK+2+olAVGUNJhTVY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=IlC/B39VIYoU3wXnibWM5Ui7iz7PLpZvPTRfUhy4Lpj/E81ImO649OG7cMGJ/bfmoRpLHSqxNCbPQwhIWHKFhhjVc+F13KMFUy67KgsZc968XUYJrOL0kc2oYF2QM/GwWzCusFmn147fZO3NxiPdKG+dkLgWHrNEUZ3224ylBI4= Received: by 10.78.204.20 with SMTP id b20mr338807hug.1184282889437; Thu, 12 Jul 2007 16:28:09 -0700 (PDT) Received: by 10.78.187.16 with HTTP; Thu, 12 Jul 2007 16:28:09 -0700 (PDT) Message-ID: <70e8236f0707121628v7821be44w285b6070dff473c1@mail.gmail.com> Date: Fri, 13 Jul 2007 00:28:09 +0100 From: "Joao Barros" To: "Steven Schlansker" In-Reply-To: <4696B0DF.8030909@berkeley.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4696B0DF.8030909@berkeley.edu> Cc: freebsd-current@freebsd.org Subject: Re: Removing an accidentally incorrect vdev from a ZFS pool X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jul 2007 23:28:11 -0000 On 7/12/07, Steven Schlansker wrote: > Hello everyone, > I've been using ZFS on -CURRENT for a few weeks now with quite decent > results. I'm really glad that this apparently awesome filesystem is > available, and want to register my thanks for everyone who put work into > it :) > > That being said, I've just run into a little snag. I wanted to extend > my zpool from 3 drives to 6 drives. > > My first hope was that I could automagically extend the RAIDZ. My hope > was to extend the vdev to be a raidz1 with 6 devices, and then restripe > it to raidz2. That would have been pretty neat, and a great way to > manage drives. After reading the man pages and not finding that > functionality, I found many mailing list posts with everyone chatting > about exactly that. I hope the functionality finds its way into 7.0. > I'd add it myself, but I tried to read the ZFS code and a good > percentage off it flew over my non-filesystem-geek programmer's head :) > > So then I settled on the next-best thing - adding another raidz1 vdev > with the three new drives. Not quite as flexible, but still adequate. > > I checked the dmesg to find my drives - ad12, ad16, ad19. I ran > sudo zpool add universe raidz1 ad12 ad16 ad19, and then checked zfs list > to find my brand new double-sized zfs.... huh? It only grew by 40G? > That's strange. Maybe the zpool grew... nope. About here is where I > started to panic a bit. Checked the dmesg... oops! it was ad18, not 19... > > Anyway, my questions now are: > Am I correct in concluding there is no way to reshape a raidz1 to a > raidz2? Is this functionality planned? > > I now need to remove this broken vdev from my array. I haven't added > any data, so there shouldn't even be any data at all on it. However all > the remove/delete options to zpool seem to exclusively work on mirrors > and hot spares. I really need to get this vdev off the zfs - it's > entirely useless. How can I do that? I've already taken out the > accidental drive - I want to try to recover the old filesystem off of > it. Lucky it wasn't too important, though it'd be nice to have. Now i > have an array stuck permanently degraded. > > On a related note, perhaps zpool should do a bit of sanity checking. I > know the Linux md tools require you to 'force' array creation if the > drives differ by +/- 5% or thereabouts. I just created a 400G/400G/40G > raidz, which is a totally stupid array layout. Maybe it should try to > catch it. (Yes, I should have caught it, but it's easy to miss the > extra digit when you see 4xxxxx and 4xxxx next to each other, especially > when they don't line up) > > Thank you so much for any advice anyone can offer! > > Steven Schlansker There is still no way to expand a raidz. The way ZFS was created makes this a difficult task. Still the ZFS developers say they are working on that. Removing a device from a raidz is not supported as well. Again it's being worked on. I can't say if for sure about raidz to raidz2 being supported, but I guess it isn't. Everything else I pretty much learned a couple of months ago in Sun's online docs and forum which I recommend you do browse. As for new features hitting 7.0 I wouldn't get my hopes up, new features come from Sun, not FreeBSD developers. You might see some small updates and/or fixes for 7.0 but that's it. My words, don't take them for granted :> -- Joao Barros