From owner-freebsd-fs@FreeBSD.ORG Tue Aug 27 15:16:18 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5E175AEC for ; Tue, 27 Aug 2013 15:16:18 +0000 (UTC) (envelope-from zeus@ibs.dn.ua) Received: from relay.ibs.dn.ua (relay.ibs.dn.ua [91.216.196.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C7CF42E7C for ; Tue, 27 Aug 2013 15:16:17 +0000 (UTC) Received: from ibs.dn.ua (relay.ibs.dn.ua [91.216.196.25]) by relay.ibs.dn.ua with ESMTP id r7RFBRSW024762 for ; Tue, 27 Aug 2013 18:11:27 +0300 (EEST) Message-ID: <20130827181127.24761@relay.ibs.dn.ua> Date: Tue, 27 Aug 2013 18:11:27 +0300 From: "Zeus Panchenko" To: cc: Subject: exictent zroot re-alignment to 4K Organization: I.B.S. LLC X-Mailer: MH-E 8.3.1; GNU Mailutils 2.99.98; GNU Emacs 24.0.93 X-Face: &sReWXo3Iwtqql1[My(t1Gkx; y?KF@KF`4X+'9Cs@PtK^y%}^.>Mtbpyz6U=,Op:KPOT.uG )Nvx`=er!l?WASh7KeaGhga"1[&yz$_7ir'cVp7o%CGbJ/V)j/=]vzvvcqcZkf; JDurQG6wTg+?/xA go`}1.Ze//K; Fk&/&OoHd'[b7iGt2UO>o(YskCT[_D)kh4!yY'<&:yt+zM=A`@`~9U+P[qS:f; #9z~ Or/Bo#N-'S'!'[3Wog'ADkyMqmGDvga?WW)qd=?)`Y&k=o}>!ST\ MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Zeus Panchenko List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 15:16:18 -0000 =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 hi all, please, I really need help ... recently I noticed that my netbook HDD has 4K phys sectors and I think it is worth to use that (is it really worth indeed?) I have FreeBSD 9-STABLE running well on it already but when it was installed, the alignment was not done properly ... =2D -------------------------------------------------------------------- what I have: > uname -a FreeBSD 9.1-STABLE #17 r250823: Mon May 20 19:39:19 EEST 2013 amd64 > smartctl -a /dev/ada0 Model Family: Western Digital Scorpio Black (AF) Device Model: WDC WD5000BPKT-60PK4T0 Serial Number: WD-WXJ1A61P0560 User Capacity: 500,107,862,016 bytes [500 GB] Sector Sizes: 512 bytes logical, 4096 bytes physical > gpart show ada0 =3D> 34 976773101 ada0 GPT (465G) 34 6 - free - (3.0k) 40 128 1 freebsd-boot (64k) 168 33554432 2 freebsd-swap (16G) 33554600 943218528 3 freebsd-zfs (449G) 976773128 7 - free - (3.5k) > zdb zroot: version: 5000 name: 'zroot' ... vdev_tree: ... children[0]: type: 'disk' id: 0 path: '/dev/ada0p3' phys_path: '/dev/ada0p3' whole_disk: 1 ashift: 9 ... > cat /boot/loader.conf ... vfs.root.mountfrom=3D"zfs:zroot" ...=20=20=20=20 =2D -------------------------------------------------------------------- what I am thinking about: 1. to backup whole zroot #> zfs send -r zroot@2align > file 2. to plug HDD (let it be detected as adaX) on other system and to: #> gpart destroy adaX #> gpart create -s gpt adaX #> gpart add -b 34 -s 94 -t freebsd-boot -l bootX adaX #> gpart add -s 4G -t freebsd-swap -l swapX adaX #> gpart add -a 1m -t freebsd-zfs -l diskX adaX #> gpart bootcode -b /path/to/backuped/pmbr -p /path/to/backuped/gptzfsboot= -i 1 adaX #> gnop create -S 4096 gtp/diskX #> zpool create zroot_z-hp gpt/diskX.nop #> cat file | zfs receive -v zroot_z-hp #> zpool export zroot_z-hp #> zpool import -f -o cachefile=3D/tmp/zpool.cache -o altroot=3D/mnt zroot_= z-hp #> zfs set mountpoint=3D/root zroot_z-hp #> cp /tmp/zpool.cache /mnt/root/boot/zfs/zpool.cache #> vi /mnt/root/boot/loader.conf s/zroot/zroot_z-hp/ #> zfs umount /mnt/root #> zfs set mountpoint=3Dlegacy zroot_z-hp #> zpool export zroot_z-hp #> gnop destroy gpt/disk0.nop #> zpool import -d /dev/gpt/diskX #> zpool export zroot_z-hp 3. return HDD to the netbook so, am I right, is it correct way to re-align to 4K an existent ZFS pool, will it work? is ZFS version have to be the same on both systems (the one to be aligned is shown as 5000 (after `zpool upgrade -a') while the one all that stuff to be performed at is 28)? =2D --=20 Zeus V. Panchenko jid:zeus@im.ibs.dn.ua IT Dpt., I.B.S. LLC GMT+2 (EET) =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlIcwZ4ACgkQr3jpPg/3oyorGgCghK0E/Gl9pAi73V2jFVRk77mU 784AnivFBHqy00i4t+qvTHM1vZdIWqFf =3DFsRY =2D----END PGP SIGNATURE-----