From owner-freebsd-fs@FreeBSD.ORG Thu Dec 27 19:43:06 2007 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA66F16A418 for ; Thu, 27 Dec 2007 19:43:06 +0000 (UTC) (envelope-from johan@stromnet.se) Received: from core.stromnet.se (core.stromnet.se [83.218.84.131]) by mx1.freebsd.org (Postfix) with ESMTP id 4710313C442 for ; Thu, 27 Dec 2007 19:43:05 +0000 (UTC) (envelope-from johan@stromnet.se) Received: from localhost (unknown [83.218.84.135]) by core.stromnet.se (Postfix) with ESMTP id 59FB5D46F37 for ; Thu, 27 Dec 2007 20:26:18 +0100 (CET) X-Virus-Scanned: amavisd-new at stromnet.se Received: from core.stromnet.se ([83.218.84.131]) by localhost (core.stromnet.se [83.218.84.135]) (amavisd-new, port 10024) with ESMTP id BMcjXaLS8SH7 for ; Thu, 27 Dec 2007 20:26:13 +0100 (CET) Received: from [172.28.1.102] (90-224-172-102-no129.tbcn.telia.com [90.224.172.102]) by core.stromnet.se (Postfix) with ESMTP id D619AD46405 for ; Thu, 27 Dec 2007 20:26:13 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v753) Content-Transfer-Encoding: quoted-printable Message-Id: <5A6CFB06-4175-452F-BFC9-323C2023D2F6@stromnet.se> Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed To: freebsd-fs@freebsd.org From: =?ISO-8859-1?Q?Johan_Str=F6m?= Date: Thu, 27 Dec 2007 20:25:34 +0100 X-Mailer: Apple Mail (2.753) Subject: ZFS replace/expand problem X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Dec 2007 19:43:06 -0000 Hello list First of all, I want to thank everybody involved in writing and =20 porting ZFS to FreeBSD, its working (except for this problem) great =20 for me! Now to my problem. To sumarize it, I want to replace two mirrored =20 disk with bigger ones. Replace works well but the vdev doesnt expand =20 until i do export/import. Details follows: I currently have the following setup: back-1 /$ zpool status pool: tank state: ONLINE scrub: none requested config: NAME STATE READ WRITE CKSUM tank ONLINE 0 0 0 mirror ONLINE 0 0 0 ad14s1d ONLINE 0 0 0 ad16s1d ONLINE 0 0 0 mirror ONLINE 0 0 0 ad8 ONLINE 0 0 0 ad10s2 ONLINE 0 0 0 mirror ONLINE 0 0 0 ad12 ONLINE 0 0 0 ad10s1 ONLINE 0 0 0 The ad8/ad10/ad12 setup is kindof stupid, I know.. ad8 is a 80Gb and =20 ad10 is a 120Gb, and a10 200Gb.. But now I want to replace those two =20 mirrors with 4x 300GB (or rather 2x300 and 2x320). So my plan was to =20 do something like: zpool replace tank ad8 ad18 zpool replace tank ad10s2 ad20 where ad18 and ad20 are the two 300Gbs.. Then the same thing for ad12 =20= and ad10s1.. But before I did that i wanted to make sure that it =20 would actually expand as I'ev read, so i tried this first.. On ad18/ad20 I had ad*s1a, a 500MB partition, and ad*s1g a ~280Gb =20 partition. So i created a testtank with first ad*s1a: back-1 /$ zpool create testtank mirror /dev/ad18s1a /dev/ad20s1a back-1 /$ zpool list NAME SIZE USED AVAIL CAP HEALTH ALTROOT tank 878G 812G 65.1G 92% ONLINE - testtank 492M 111K 492M 0% ONLINE - back-1 /$ zpool status .. pool: testtank state: ONLINE scrub: none requested config: NAME STATE READ WRITE CKSUM testtank ONLINE 0 0 0 mirror ONLINE 0 0 0 ad18s1a ONLINE 0 0 0 ad20s1a ONLINE 0 0 0 errors: No known data errors back-1 /storage$ zpool replace testtank ad18s1a ad18s1g status now shows mirror ONLINE 0 0 0 replacing ONLINE 0 0 0 ad18s1a ONLINE 0 0 0 ad18s1g ONLINE 0 0 0 ad20s1a ONLINE 0 0 0 when that was done (and only ad18s1g was showing) i did back-1 /storage$ zpool replace testtank ad20s1a ad20s1g and then same replacing output as above (but for ad20) Okey, so now when this is done.. it should have expanded one would =20 think, right? back-1 /storage$ zpool list NAME SIZE USED AVAIL CAP HEALTH ALTROOT .. testtank 492M 218K 492M 0% ONLINE - Nope.. Waited a while, nothing happened.. Some googling gave me that =20 export/import could be done: back-1 /storage$ zpool export testtank back-1 /storage$ zpool import testtank back-1 /storage$ zpool list NAME SIZE USED AVAIL CAP HEALTH ALTROOT .. testtank 289G 132K 289G 0% ONLINE - Yey! Okey so it expands, but only after export/import.. Havent realy =20 found much docs about this but according to ppl in #opensolaris this =20 should not be necessary. Not a big deal in this test case, but doing it for my real tank will =20 require me to take the system down on an external boot medium (CD or =20 something) I guess, and then do zfs export/import there, and then =20 boot back up.. Any guidelines how to do this? Will doing import/export from a CD =20 (rescue shell I guess) work as I expect? Or what would be the =20 smartest way (the actual downtime isnt such a big deal as long as it =20 is quick and works). Thanks! -- Johan Str=F6m Stromnet johan@stromnet.se http://www.stromnet.se/