From owner-freebsd-fs@FreeBSD.ORG Sat May 15 23:41:53 2010 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 F14481065673 for ; Sat, 15 May 2010 23:41:52 +0000 (UTC) (envelope-from SamanKaya@netscape.net) Received: from imr-da06.mx.aol.com (imr-da06.mx.aol.com [205.188.169.203]) by mx1.freebsd.org (Postfix) with ESMTP id B4C808FC14 for ; Sat, 15 May 2010 23:41:52 +0000 (UTC) Received: from mtaout-da02.r1000.mx.aol.com (mtaout-da02.r1000.mx.aol.com [172.29.51.130]) by imr-da06.mx.aol.com (8.14.1/8.14.1) with ESMTP id o4FNflcP025244 for ; Sat, 15 May 2010 19:41:47 -0400 Received: from [172.16.0.66] (unknown [212.156.209.87]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mtaout-da02.r1000.mx.aol.com (MUA/Third Party Client Interface) with ESMTPSA id EA2C7E000121 for ; Sat, 15 May 2010 19:41:46 -0400 (EDT) Message-ID: <4BEF3137.4080203@netscape.net> Date: Sun, 16 May 2010 02:41:43 +0300 From: Kaya Saman User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.1.8) Gecko/20100227 Lightning/1.0b1 Thunderbird/3.0.3 MIME-Version: 1.0 To: freebsd-fs@freebsd.org References: <4BEF2F9C.7080409@netscape.net> In-Reply-To: <4BEF2F9C.7080409@netscape.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit x-aol-global-disposition: G X-AOL-SCOLL-SCORE: 0:2:465608704:93952408 X-AOL-SCOLL-URL_COUNT: 0 x-aol-sid: 3039ac1d33824bef313a05ff X-AOL-IP: 212.156.209.87 Subject: Re: Quick ZFS mirroring question for non-mirrored pool 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: Sat, 15 May 2010 23:41:53 -0000 Ok I think I've got what I want by using the 'attach' command: from here: http://prefetch.net/blog/index.php/2007/01/04/adding-a-mirror-to-a-device-in-a-zfs-pool/ rd1# zpool attach zpool1 /mnt/disk1 /mnt/disk3 rd1# zpool attach zpool1 /mnt/disk2 /mnt/disk4 rd1# zpool status zpool1 pool: zpool1 state: ONLINE scrub: resilver completed after 0h0m with 0 errors on Sun May 16 02:36:58 2010 config: NAME STATE READ WRITE CKSUM zpool1 ONLINE 0 0 0 mirror ONLINE 0 0 0 /mnt/disk1 ONLINE 0 0 0 /mnt/disk3 ONLINE 0 0 0 mirror ONLINE 0 0 0 /mnt/disk2 ONLINE 0 0 0 96.5K resilvered /mnt/disk4 ONLINE 0 0 0 15.3M resilvered errors: No known data errors which seems to be ok as data is still there post attachement: rd1# ls /zpool1 file.test and also space is ok being ~256MB: rd1# zpool list NAME SIZE USED AVAIL CAP HEALTH ALTROOT zpool1 246M 32.2M 214M 13% ONLINE - although not sure where 10MB went as all files in this pool are 128MB so I should get 256MB no?? On 05/16/2010 02:34 AM, Kaya Saman wrote: > Hi, > > I'm just exploring ZFS commands currently as I haven't used much of > ZFS even though I deal with BSD and Solaris/OpenSolaris on a daily > basis..... > > Basically what I am about to do is build a new server using FreeBSD > 8.0 x64 on a Mini-ITX system and unfortunately due to budget I won't > be able to get the extra 2 disks that I need so out of 4 disks overall > is 2. > > I just really wanted to ask after using these tutorials: > > http://wiki.freebsd.org/ZFSQuickStartGuide > > http://blog.thefrog.net/2008/04/zfs-on-freebsd.html > > http://flux.org.uk/howto/solaris/zfs_tutorial_01 > > if it's possible to add a mirror to a non-mirrored pool?? > > It's a bit hard to explain but taken from the last URL: > > I created 4 files using mkfile in /mnt called file1...4 > > Now I added the first 2 to a pool: zpool create zpool1 /mnt/disk1 > /mnt/disk2 > > and checked the status: > > zpool status zpool1 > pool: zpool1 > state: ONLINE > scrub: none requested > config: > > NAME STATE READ WRITE CKSUM > zpool1 ONLINE 0 0 0 > /mnt/disk1 ONLINE 0 0 0 > /mnt/disk2 ONLINE 0 0 0 > > errors: No known data errors > > > What I would like to do over time is add 2 more disks to this pool (in > real life, however for my demo they will be /mnt/disk3 and > /mnt/disk4). The real catch is that I would like disks 3 + 4 to be a > mirror of the first 2 disks..... > > Is this possible to start with without loosing any data and destroying > the pool? > > Or do I need to create another pool say zpool2 and mirror the pools?? > > So in RAID terms I guess would be something like disk1 and 2 in RAID 0 > with disks 3 + 4 in RAID 0 however, RAID0(1) in RAID 1 array with > RAID0(2)..... > > Perhaps is RAID 1+ 0 which I'm trying to achieve I don't know but > currently I'm not really getting anywhere with what I've tried and > managed to crash the kernel and make the system reboot already. > > From scratch it would be so easy as I could just use: zpool create > zpool1 mirror /mnt/disk1 /mnt/disk2 mirror /mnt/disk3 /mnt/disk4. > > Can anyone give me any advice?? > > Many thanks, > > Kaya > > _______________________________________________ > 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"