From owner-freebsd-fs@FreeBSD.ORG Tue Aug 21 17:28:24 2012 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 250521065674 for ; Tue, 21 Aug 2012 17:28:24 +0000 (UTC) (envelope-from a@carniajeu.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id D84C58FC12 for ; Tue, 21 Aug 2012 17:28:23 +0000 (UTC) Received: by obbun3 with SMTP id un3so73990obb.13 for ; Tue, 21 Aug 2012 10:28:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:x-originating-ip:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :x-gm-message-state; bh=xyAc0Aqjg7DnkLezV/kMPYgv9Hbfy1WnXGBG3k4Vv4A=; b=WUxP14XSj0WteP+pkm4zDNtGCTZYas0beIOwSxyikV6oJ9wp79VgINIKflevQm2qwk 3TVT/+6zBxN3q1UEnYqpGMJQ5EdJfetIJjCYLbJl6hgEeQdn2GevVQ3LcLJ/pzHBcPUX 2LV3f2LSHUfp+cZ4iZGOhOWKG25Z6I7R4Ag3G+WZEFI1i55giUEuNacNQrXMjWMejaZC sjii6LL+GzSYmNGptS70dvig+djnGJK7HhyaVMH3jTrjcNNld6iSpB52U8HBpbIFA1E1 zHoBqtq0jdNnpQwN7fo5WFIxf1IGdVqL5QrLBL1eVdgf7uA+9tbBuyLoHEZ++4xGjVzN KydQ== MIME-Version: 1.0 Received: by 10.182.53.103 with SMTP id a7mr13473515obp.3.1345570103063; Tue, 21 Aug 2012 10:28:23 -0700 (PDT) Sender: a@carniajeu.com Received: by 10.182.114.35 with HTTP; Tue, 21 Aug 2012 10:28:22 -0700 (PDT) X-Originating-IP: [46.53.195.78] In-Reply-To: <20120821190742.54449@relay.ibs.dn.ua> References: <20120821190742.54449@relay.ibs.dn.ua> Date: Tue, 21 Aug 2012 20:28:22 +0300 X-Google-Sender-Auth: LmVeiTxU_UCTFYVrW0OeI0Mb8p8 Message-ID: From: Alaksiej Carniajeu To: Zeus Panchenko Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQncRrPko/LKo9Lb9QPXhlsIl75iqyeiSOCHUbajqGbEIdFs6YEc9TNS5bOTUWs/moNXnS6s Cc: freebsd-fs@freebsd.org, freebsd-geom@freebsd.org Subject: Re: `zpool create' fails on geli ... 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: Tue, 21 Aug 2012 17:28:24 -0000 Geli doesn't initialize checksums, when geli device is created. They will be calculated only on write. That's why these "XXX bytes corrupted" messages appeared. I believe it's better to fill your whole geli device with any data before use with ZFS, if integrity verification (-a) was enabled for it. On Tue, Aug 21, 2012 at 7:07 PM, Zeus Panchenko wrote: > 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) > _______________________________________________ > freebsd-geom@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-geom > To unsubscribe, send any mail to "freebsd-geom-unsubscribe@freebsd.org"