From owner-freebsd-fs@FreeBSD.ORG Sun Nov 4 03:23:46 2012 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0977B7C0 for ; Sun, 4 Nov 2012 03:23:46 +0000 (UTC) (envelope-from fjwcash@gmail.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id 6E6448FC08 for ; Sun, 4 Nov 2012 03:23:45 +0000 (UTC) Received: by mail-lb0-f182.google.com with SMTP id b5so4325700lbd.13 for ; Sat, 03 Nov 2012 20:23:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Hwr1/YFr7+qCpS/5sOUte1HKdVVxw8Z7+CGZWRhPaq8=; b=RqqtApbs4gdJg2jNoQR3v2TeMRiK9Qt3Xf+BNhY0dw9xx8CZ5xSLECSXBfBBnd4pwo VesxLhwQ9fBfADOgOu/34nqNsJ0mVIdXVQAhm9F8VPEhnaUKfBpDUBG2lC4QGVkEzVyq DkYS/MmBnF/eHl/cSiska6/OxL/m65l8YtPpS2QJJPXRvPSQ1kUIelwaW2LTeadzitqB Bkmmle7FAzrx0LqnWVq1PcJs07Ov9PV1DXjwLC7EIhRoHJFilyl33oFEJ5ugHTdtspYO J9byxmWczNF3caHuzmxKqRUmp+f20sLnBlPpy+PfMeClekUVETH2ZEnsL3gIrfOx7zej KP9w== MIME-Version: 1.0 Received: by 10.152.124.83 with SMTP id mg19mr5678284lab.6.1351999424060; Sat, 03 Nov 2012 20:23:44 -0700 (PDT) Received: by 10.114.24.66 with HTTP; Sat, 3 Nov 2012 20:23:43 -0700 (PDT) Received: by 10.114.24.66 with HTTP; Sat, 3 Nov 2012 20:23:43 -0700 (PDT) In-Reply-To: <50955FB1.2070800@cyberfoxfire.com> References: <50955FB1.2070800@cyberfoxfire.com> Date: Sat, 3 Nov 2012 20:23:43 -0700 Message-ID: Subject: Re: Convert standalone zpool to RAID1 with data in place From: Freddie Cash To: Fox F Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-fs@freebsd.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Nov 2012 03:23:46 -0000 You don't. At least, not in that order. Or, at least not with the ZFS-native tools. You can create a pool with 2 separate single-disk vdevs, and data will be striped across them. Similar to RAID0, there will be no redundancy to the pool. zpool create poolname disk1 disk2 Later, you can convert the single-disk vdevs to mirrors, thus turning the pool into a RAID10: zpool attach poolname disk1 disk3 zpool attach poolname disk2 disk4 Or, you can create a pool with a single mirror vdev: zpool create poolname mirror disk1 disk2 Later, you can add another mirror vdev to the pool, and data will be striped across the two vdevs, similar to a RAID10: zpool add poolname mirror disk3 disk4 If you are truly hell bent on doing things in the other order (mirror on top of two stripesets), then you have to use gstripe(8) to create the stripesets, and then add those to the pool. The following is from memory, so it may not be perfectly correct: gstripe label stripe1 disk1 disk2 gstripe label stripe2 disk3 disk4 zpool create poolname mirror stripe/stripe1 stripe/stripe2 On Nov 3, 2012 11:17 AM, "Fox F" wrote: > > Hello, > > My intention is to have a zpool with two drives (1TB and 2TB) striped. I suppose I'd create it as such: > > zpool create zp_test disk1 disk2 > > I would then create a zfs filesystem on that zpool and add data to it. > > Then, I would want to mirror this data on another identical striped vdev. > > The question is, what is the order of operations for creating the second striped vdev and adding it as a mirror to the first one, and how do I do that in such a way that the data on disk1/2 gets mirrored to the new addition? > > I hope I am making sense. > > -F > _______________________________________________ > freebsd-fs@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org"