From owner-freebsd-fs@FreeBSD.ORG Tue Aug 21 16:11:26 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 72ED1106564A; Tue, 21 Aug 2012 16:11:26 +0000 (UTC) (envelope-from zeus@ibs.dn.ua) Received: from relay.ibs.dn.ua (relay.ibs.dn.ua [91.216.196.25]) by mx1.freebsd.org (Postfix) with ESMTP id AF9E78FC08; Tue, 21 Aug 2012 16:11:19 +0000 (UTC) Received: from ibs.dn.ua (relay.ibs.dn.ua [91.216.196.25]) by relay.ibs.dn.ua with ESMTP id q7LG7gj9054451; Tue, 21 Aug 2012 19:07:42 +0300 (EEST) Message-ID: <20120821190742.54449@relay.ibs.dn.ua> Date: Tue, 21 Aug 2012 19:07:42 +0300 From: Zeus Panchenko To: Organization: I.B.S. LLC X-Mailer: MH-E 8.2; GNU Mailutils 2.99.97; GNU Emacs 23.4.1 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\ Cc: freebsd-fs@FreeBSD.ORG Subject: `zpool create' fails on geli ... X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Zeus Panchenko List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2012 16:11:26 -0000 hi all, SYNOPSIS: `zpool create poolname device.eli' available on .eli device only after dd some random data to .eli first I am trying to get ZFS on GELI disk ... Here is the issue: #> uname -a FreeBSD 9.0-RELEASE #0 amd64 for /dev/ada2 I do: #> geli init -K /path/key -s 4096 -a hmac/sha256 -e aes-xts /dev/ada2 Enter new passphrase: Reenter new passphrase: Metadata backup can be found in /var/backups/ada2.eli and can be restored with the following command: # geli restore /var/backups/ada2.eli /dev/ada2 #> geli attach -k /path/key /dev/ada2 now I have .eli device #> ls -al /dev/*eli lrwxr-xr-x 1 root wheel 8 Aug 16 15:43 /dev/ad14.eli -> ada2.eli crw-r----- 1 root operator 0, 99 Aug 16 15:43 /dev/ada2.eli now I am trying to create zfs on it: > zpool create geliz /dev/ada2.eli cannot create 'geliz': one or more devices is currently unavailable `zpool create -f ...' gave the same result and in messages I have plenty rows like these: cat /var/log/messages ... GEOM_ELI: ada2.eli: 131072 bytes corrupted at offset 444539600896. GEOM_ELI: ada2.eli: 131072 bytes corrupted at offset 444539863040. GEOM_ELI: ada2.eli: 8192 bytes corrupted at offset 270336. GEOM_ELI: ada2.eli: 8192 bytes corrupted at offset 444539609088. GEOM_ELI: ada2.eli: 8192 bytes corrupted at offset 444539871232. GEOM_ELI: ada2.eli: 4096 bytes corrupted at offset 444540313600. GEOM_ELI: ada2.eli: 8192 bytes corrupted at offset 65536. GEOM_ELI: ada2.eli: 8192 bytes corrupted at offset 8192. GEOM_ELI: ada2.eli: 8192 bytes corrupted at offset 0. GEOM_ELI: ada2.eli: 8192 bytes corrupted at offset 262144. ... but after #> dd if=/dev/random of=/dev/ada2.eli bs=10m count=10 10+0 records in 10+0 records out 104857600 bytes transferred in 7.124000 secs (14718922 bytes/sec) I was able to do it! #> zpool create geliz /dev/ada2.eli pool was successfully created but pool status looks weird for me: #> zpool status geliz pool: geliz state: ONLINE status: One or more devices has experienced an unrecoverable error. An attempt was made to correct the error. Applications are unaffected. action: Determine if the device needs to be replaced, and clear the errors using 'zpool clear' or replace the device with 'zpool replace'. see: http://www.sun.com/msg/ZFS-8000-9P scan: none requested config: NAME STATE READ WRITE CKSUM geliz ONLINE 0 0 0 ada2.eli ONLINE 10 0 0 errors: No known data errors after `zscub' and `zpool clear' I have clean pool: #> zpool status geliz pool: geliz state: ONLINE scan: scrub repaired 0 in 0h0m with 0 errors on Thu Aug 16 16:36:44 2012 config: NAME STATE READ WRITE CKSUM geliz ONLINE 0 0 0 ada2.eli ONLINE 0 0 0 errors: No known data errors QUESTION: 1. Am I correct to think I really have correct ZFS over GELI set? 2. Why it was needed to dd? What am I missing here, please? may somebody explain that for me please ...? -- Zeus V. Panchenko jid:zeus@im.ibs.dn.ua IT Dpt., I.B.S. LLC GMT+2 (EET)