From owner-freebsd-current@FreeBSD.ORG Sat May 11 15:39:16 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 8DCDC4C9 for ; Sat, 11 May 2013 15:39:16 +0000 (UTC) (envelope-from paul@kraus-haus.org) Received: from mail-vc0-f181.google.com (mail-vc0-f181.google.com [209.85.220.181]) by mx1.freebsd.org (Postfix) with ESMTP id 4CA81D7E for ; Sat, 11 May 2013 15:39:15 +0000 (UTC) Received: by mail-vc0-f181.google.com with SMTP id hr11so4369752vcb.26 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=FMZkLCGlhJAoz3PNPiQOSZlM9qxs5p9YeZMr3ybg23N8M/AF7uQTeaLfqR52VOPCAH 3MTG0UoXlCpLYeY3g6z+DTitRjWRoxPMXPYWfWgb4EKirzC0mOJqUwnYpe/vVwm3KMIN j7Acnf3dfShrJCIX/iAf8qXnx0xFERD1Iwk4OcixyHP2iaVmGEa4ps2lCjmqyyvcb7wK /AC8l023mzkTALrfNVn+eohMxLEDxDmEDMF0j4WnlYhSMbtP112n62oxtLdYs0ORGzQg T3abrRl08/iSsSB9LRzeKiDoji5IuEduiitg7zxvOM2hDSetZAiMIzu/1O3z+hcvTngj d9Gw== 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: ALoCoQkTr/hqE898aXCvhVOfFr87hdBAUvcn8k9V4JrFMFM/9Yz1Y4Pm91En2VM3ROau9g46WCQz X-Mailman-Approved-At: Sat, 11 May 2013 17:12:17 +0000 Cc: freebsd-fs@freebsd.org, Vladislav Prodan , freebsd-questions@freebsd.org, freebsd-current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 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: 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