From owner-freebsd-stable@FreeBSD.ORG Thu Aug 22 08:23:22 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 03146DE5 for ; Thu, 22 Aug 2013 08:23:22 +0000 (UTC) (envelope-from trond@fagskolen.gjovik.no) Received: from smtp.fagskolen.gjovik.no (smtp.fagskolen.gjovik.no [IPv6:2001:700:1100:1:200:ff:fe00:b]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6794A2854 for ; Thu, 22 Aug 2013 08:23:21 +0000 (UTC) Received: from mail.fig.ol.no (localhost [127.0.0.1]) by mail.fig.ol.no (8.14.7/8.14.7) with ESMTP id r7M8NH9O017735 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 22 Aug 2013 10:23:17 +0200 (CEST) (envelope-from trond@fagskolen.gjovik.no) Received: from localhost (trond@localhost) by mail.fig.ol.no (8.14.7/8.14.7/Submit) with ESMTP id r7M8NHrL017732; Thu, 22 Aug 2013 10:23:17 +0200 (CEST) (envelope-from trond@fagskolen.gjovik.no) X-Authentication-Warning: mail.fig.ol.no: trond owned process doing -bs Date: Thu, 22 Aug 2013 10:23:17 +0200 (CEST) From: =?ISO-8859-1?Q?Trond_Endrest=F8l?= Sender: Trond.Endrestol@fagskolen.gjovik.no To: Michael BlackHeart Subject: Re: ZFS pool with 4k sector size In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) Organization: Fagskolen Innlandet OpenPGP: url=http://fig.ol.no/~trond/trond.key MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="2055831798-1197101647-1377159797=:90799" X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=unavailable version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on mail.fig.ol.no Cc: freebsd-stable X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Aug 2013 08:23:22 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --2055831798-1197101647-1377159797=:90799 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT On Thu, 22 Aug 2013 11:40+0400, Michael BlackHeart wrote: > Hello, > I'd like to know what is the best way to convert my pool from 512b sector > size to 4k sector size. > > Hardware: 2 x2Tb WD Green with 4k physical sector size > > Model Family: Western Digital Caviar Green (AF, SATA 6Gb/s) > Device Model: WDC WD20EARX-00PASB0 > Serial Number: WD-WCAZA8280575 > LU WWN Device Id: 5 0014ee 206032063 > Firmware Version: 51.0AB51 > User Capacity: 2 000 398 934 016 bytes [2,00 TB] > Sector Sizes: 512 bytes logical, 4096 bytes physical > Device is: In smartctl database [for details use: -P show] > ATA Version is: ATA8-ACS (minor revision not indicated) > SATA Version is: SATA 3.0, 3.0 Gb/s (current: 3.0 Gb/s) > Local Time is: Thu Aug 22 11:33:16 2013 MSK > SMART support is: Available - device has SMART capability. > SMART support is: Enabled > > They're running in a mirror > > pool: storage > state: ONLINE > scan: resilvered 48K in 0h0m with 0 errors on Thu Jul 25 19:18:01 2013 > config: > > NAME STATE READ WRITE CKSUM > storage ONLINE 0 0 0 > mirror-0 ONLINE 0 0 0 > ada3 ONLINE 0 0 0 > ada7 ONLINE 0 0 0 > > zdb info > > storage: > version: 5000 > name: 'storage' > state: 0 > txg: 1292269 > pool_guid: 18442220950447532371 > hostid: 708219113 > hostname: 'diablo.miekoff.local' > vdev_children: 1 > vdev_tree: > type: 'root' > id: 0 > guid: 18442220950447532371 > create_txg: 4 > children[0]: > type: 'mirror' > id: 0 > guid: 4289294206539029185 > metaslab_array: 33 > metaslab_shift: 34 > ashift: 9 > asize: 2000394125312 > is_log: 0 > create_txg: 4 > children[0]: > type: 'disk' > id: 0 > guid: 16348588566764560218 > path: '/dev/ada3' > phys_path: '/dev/ada3' > whole_disk: 1 > DTL: 95 > create_txg: 4 > children[1]: > type: 'disk' > id: 1 > guid: 7655198429866445090 > path: '/dev/ada7' > phys_path: '/dev/ada7' > whole_disk: 1 > DTL: 97 > create_txg: 4 > features_for_read: > > As you see ashift is 9 (512b). > > I know a common solution with gnop and export-mport pool, but how should I > manage mirror this way? Should I create a mirror on gnop-ed devices and > then export-import? I'm afraid you're out of luck. You need to backup the data somehow, recreate the pool with ashift=12, and restore the data. A better option would be to buy a couple of new drives, assuming you can connect them to the current system, create a new mirrored pool with ashift=12, and transfer the data using a recursive set of snapshots on the current pool and a ZFS send stream sent to the new pool. -- +-------------------------------+------------------------------------+ | Vennlig hilsen, | Best regards, | | Trond Endrestøl, | Trond Endrestøl, | | IT-ansvarlig, | System administrator, | | Fagskolen Innlandet, | Gjøvik Technical College, Norway, | | tlf. mob. 952 62 567, | Cellular...: +47 952 62 567, | | sentralbord 61 14 54 00. | Switchboard: +47 61 14 54 00. | +-------------------------------+------------------------------------+ --2055831798-1197101647-1377159797=:90799--