From owner-freebsd-fs@FreeBSD.ORG Mon Nov 5 17:46:52 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 1490E796 for ; Mon, 5 Nov 2012 17:46:52 +0000 (UTC) (envelope-from fox@cyberfoxfire.com) Received: from mail-oa0-f54.google.com (mail-oa0-f54.google.com [209.85.219.54]) by mx1.freebsd.org (Postfix) with ESMTP id BBAF58FC12 for ; Mon, 5 Nov 2012 17:46:51 +0000 (UTC) Received: by mail-oa0-f54.google.com with SMTP id n9so7580204oag.13 for ; Mon, 05 Nov 2012 09:46:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:x-gm-message-state; bh=0n7LcaHvZUeQL5+UbnP1sly6tRoMXPVLn04dArK9VnY=; b=Qiomo6j2UCZrywSitCwOSaDM9/O0JDtaJoCjDewfVkz8LUDUVNVuG03GAlcvik9oGb vw26g8OuVdQohbb6/jZ73YkwnrbSHoIcNsB+xA0jYNxMd2IA945voDIj0f80gRQZFhN6 FxiplONaNeGCV5szLPlM7v+q4vax3t94Tn7i8s5V7pyO2nXeRSaxhQzdErTJfry91d2g b1arJFQAXRkFbL4fKehMEgbB0sAtO2/NQaZld/hy1VDXL82JzAHx2oKYzEnEMmp/QFHc 6zdlfW3t0rSyQeSI+J/FScsvVQnefYL37Q33izByerLkbHvtnuCwFprIQ+zcKIRWBNRP EF3Q== Received: by 10.182.145.35 with SMTP id sr3mr8309238obb.98.1352137611084; Mon, 05 Nov 2012 09:46:51 -0800 (PST) Received: from [10.99.99.9] ([67.11.63.242]) by mx.google.com with ESMTPS id a7sm18274759obw.6.2012.11.05.09.46.49 (version=SSLv3 cipher=OTHER); Mon, 05 Nov 2012 09:46:50 -0800 (PST) Message-ID: <5097FB86.9050008@cyberfoxfire.com> Date: Mon, 05 Nov 2012 11:46:46 -0600 From: Fox F User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 MIME-Version: 1.0 To: Freddie Cash Subject: Re: Convert standalone zpool to RAID1 with data in place References: <50955FB1.2070800@cyberfoxfire.com> In-Reply-To: X-Gm-Message-State: ALoCoQkzkO5dLA4OoI8YpnotKAw+mn7gTrWeXUllFqnioqs16PlZgNACQMvDRB8i0Q3KdPNzAUw4 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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: Mon, 05 Nov 2012 17:46:52 -0000 On 11/3/2012 10:23 PM, Freddie Cash wrote: > > 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 > " > I did forget one point to have clarified. Forget the striping. Let's just assume two disks, 1 and 2. I only have disk1 on hand. So I create a zpool/zfs with it. # zpool create mypool disk1 # zfs create mypool/repository Then some data is put on the zfs. Now, I want to convert mypool to a mirror with disk2, while keeping the data on disk1 intact. Is there a way to do that?