From owner-freebsd-fs@FreeBSD.ORG Mon Nov 5 18:28:47 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 9723BAFA for ; Mon, 5 Nov 2012 18:28:47 +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 4EAA88FC12 for ; Mon, 5 Nov 2012 18:28:46 +0000 (UTC) Received: by mail-oa0-f54.google.com with SMTP id n9so7641533oag.13 for ; Mon, 05 Nov 2012 10:28:46 -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:content-transfer-encoding :x-gm-message-state; bh=WsffhnYqPAXnChH4MCDzGR4qp0PCsbMsD8j7RPYGhcE=; b=XAszzl6pHp83w52ZdZia0uYuY+sGRNg316Jguks3GztSTO/MKGprStkZPWdJnF0ltN Y0Fltlq7I1J4seaNy3wjnGE127aK6iAqQEstdBlXIwMGRWLCM4acyaJ0tmTSVXJ4LMcn 0PussTSq7S0p/nniEp7Cma+ghp5RCeGu3ly7JmzHNkrX5cCLdxPYoFYBxItxOpLNOquU GJlIJjByI9UnATj5lNSYvw0UIe4BCK7hq1+A8Va/hLNvrwkxRjAG7PpbG7JTELT2zE7t yA1oduME4PASAMYJiG1WfKFIvAVVBpM+Fo1SE8Q3s+GJY2RkNc0Xy4hyI7CH1ULzgUM8 XjZg== Received: by 10.182.131.37 with SMTP id oj5mr8414871obb.54.1352140126216; Mon, 05 Nov 2012 10:28:46 -0800 (PST) Received: from [10.99.99.9] ([67.11.63.242]) by mx.google.com with ESMTPS id zn9sm18351099obb.23.2012.11.05.10.28.44 (version=SSLv3 cipher=OTHER); Mon, 05 Nov 2012 10:28:45 -0800 (PST) Message-ID: <50980559.3050306@cyberfoxfire.com> Date: Mon, 05 Nov 2012 12:28:41 -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: Steven Hartland Subject: Re: Convert standalone zpool to RAID1 with data in place References: <50955FB1.2070800@cyberfoxfire.com> <5097FB86.9050008@cyberfoxfire.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQlq62FWLQR1DZb/DD6R7xKXj2h2O5ctz0u0BaUpmhHpKH5dgnhUtrPxZS4fFicozQ8o24b1 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 18:28:47 -0000 On 11/5/2012 11:53 AM, Steven Hartland wrote: > ----- Original Message ----- From: "Fox F" > >> 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? > > Yes off hand you want "zpool attach mypool disk1 disk2" more details in > "man zpool" > > Regards > Steve > > ================================================ > This e.mail is private and confidential between Multiplay (UK) Ltd. > and the person or entity to whom it is addressed. In the event of > misdirection, the recipient is prohibited from using, copying, > printing or otherwise disseminating it or any information contained in > it. > In the event of misdirection, illegible or incomplete transmission > please telephone +44 845 868 1337 > or return the E.mail to postmaster@multiplay.co.uk. > Alright, I think I got it! "zpool attach" adds a new device to an existing one as a mirror, whereas "zpool add" adds it as a stripe. For example, # zpool create mypool disk1 I now have a single vdev pool. # zpool add mypool disk2 I now have a striped two-disk pool. # zpool attach mypool disk1 disk3 Now, I have the following: mypool mirror-0 disk1 disk3 disk2 FINALLY, if I want to add disk4, I would say, # zpool attach mypool disk2 disk4 which would give mypool mirror-0 disk1 disk3 mirror-1 disk2 disk4 Which would give me what I need. So to Freddie, this is exactly what you recommended, and fortunately will work for my circumstances. I guess what confused me was how attach vs. add work, and the resulting disk layout. Now, after some testing on my server, I see how it all works. Thanks for the education.