From owner-freebsd-questions@FreeBSD.ORG Sat May 11 15:39:16 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2DA3D4C8 for ; Sat, 11 May 2013 15:39:16 +0000 (UTC) (envelope-from paul@kraus-haus.org) Received: from mail-ve0-x231.google.com (mail-ve0-x231.google.com [IPv6:2607:f8b0:400c:c01::231]) by mx1.freebsd.org (Postfix) with ESMTP id DFBD0D7D for ; Sat, 11 May 2013 15:39:15 +0000 (UTC) Received: by mail-ve0-f177.google.com with SMTP id jw11so4647194veb.22 for ; Sat, 11 May 2013 08:39:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:subject:mime-version:content-type:from:in-reply-to:date :cc:content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=1Bedo8SEuxGa0v0+61ZRuRYi4+kITu/PGlyyW//N+s0=; b=gTHUBTMbSSoiogzGHvx0L4cj7wnDE1h+hl2ZNFut8Tt70VSFYCCGBDk8CGDwVJ4tM3 dGVKJR4L92Er9qku1Rhxzn+COUVxaFOtN3S3we0CArkDwmFaLWluXPQfFfT2469bEyTA XGPROGHN8eSdW8u3zJW2p5r3BRemj51MB8gr7hboGMXwapj7wB9P/k7jsdsE/ryNbh1w hzoAETvNk5B0npRJAtRgh6L3VrFQgDeDoNrXDmba4v45EBytjVVj4lmWUQKYyD4nruUy JL/jLWLFJpVJbzGifHyKJej7NSLyNGnbnLzITTayfz2hpnN5dcqRuMtZRrnx19dHRSiE rrrQ== X-Received: by 10.58.243.102 with SMTP id wx6mr4483633vec.26.1368286755426; Sat, 11 May 2013 08:39:15 -0700 (PDT) Received: from [192.168.2.99] ([96.236.21.119]) by mx.google.com with ESMTPSA id 13sm6266694vdg.4.2013.05.11.08.39.13 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 11 May 2013 08:39:14 -0700 (PDT) Subject: Re: Tell me how to increase the virtual disk with ZFS? Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Content-Type: text/plain; charset=iso-8859-1 From: Paul Kraus In-Reply-To: Date: Sat, 11 May 2013 11:39:12 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: References: <43529.1368277152.10278121996412321792@ffe11.ukr.net> To: Alexander Yerenkow X-Mailer: Apple Mail (2.1503) X-Gm-Message-State: ALoCoQm6yYUFRTeaisLdgY+TXbOBq4LNZY7sjnGVeH5Mtsu/iG59u9vuWSHjSqPtU0Y2EHdu14Ub Cc: freebsd-fs@freebsd.org, Vladislav Prodan , freebsd-questions@freebsd.org, freebsd-current X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 May 2013 15:39:16 -0000 On May 11, 2013, at 11:13 AM, Alexander Yerenkow = wrote: 2013/5/11 Paul Kraus On May 11, 2013, at 10:03 AM, Alexander Yerenkow = wrote: >=20 > > There's no mature (or flexible, or "can do what I want" ) way to > > increase/decrease disk sizes in FreeBSD for now {ZFS,UFS}. > > Best and quickest way - to have twice spare space, copy data, create = new > > sufficient disk and copy back. >=20 > Is this a statement or a question ? If a statement, then it is = factually FALSE. If it is supposed to be a question, it does not ask = anything. >=20 > It was a statement, and luckily I was partially wrong, as Vladislav = did made what he wanted to. > However, last time I checked there were no such easy ways to decrease = zpools Correct, there is currently no way to decrease the size of a zpool. That = would require a defragmentation utility, which is on the roadmap as part = of the bp_rewrite code enhancement (and has been for many, many years = :-) > or increase/decrease UFS partitions. > Or grow mirrored ZFS as easily as single zpool. This one I do not understand. I have grown mirrored zpools many times. = Let's say you have a 2-way mirror of 1 TB drives. You can do one of two = things to grow the zpool: 1) add another pair of drives (of any size) as another top level vdev = mirror device (you *can* use a different type of top level vdev, raidZ, = simple, etc, but that is not recommended for both redundancy and = performance predictability reasons). 2) swap out one of the 1 TB drives for a 2 TB (zpool replace), you can = even offline one of the halves of the mirror to do this (but remember = that you are vulnerable to a failure of the remaining drive during the = resolver period), let the zpool resolver, then swap out the other 1 TB = drive for a 2 TB. If the auto expand property is set, then once the = resolver finishes you have doubled your net capacity. > Or (killer one) remove added by mistake vdev from zpool ;) Don't make that mistake. Seriously. If you are managing storage you need = to be double checking every single command you issue if you care about = your data integrity. You could easily make the same complaint about = issuing an 'rm -rf' in the wrong directory (I know people who have done = that). If you are using snapshots you may be safe, if not your data is = probably gone. On the other hand, depending on where in the tree you added the vdev, = you may be able to remove it. If it is a top level vdev, then you have = just changed the configuration of the zpool. While very not supported, = you just might be able, using zdb and rolling back to a TXG before you = added the device, remove the vdev. A good place to ask that question and = have the discussion would be the ZFS discuss list at illumos (the list = discussion is not limited to illumos, but covers all aspects of ZFS on = all platforms). Archives here: = http://www.listbox.com/member/archive/182191/sort/time_rev/=20 > Of course I'm not talking about real hw, rather virtual one. Doesn't matter to ZFS, whether a drive is a physical, a partition, or a = virtual disk you perform the same operations. > If you happen to point me somewhere to have such task solved I'd be = much appreciated. See above :-) Some of your issues I addressed above, others are not = there (and may never be). -- Paul Kraus Deputy Technical Director, LoneStarCon 3 Sound Coordinator, Schenectady Light Opera Company