From owner-freebsd-bugs@FreeBSD.ORG Thu Jun 9 04:30:10 2011 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9ADD106566C for ; Thu, 9 Jun 2011 04:30:10 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id A5F9F8FC16 for ; Thu, 9 Jun 2011 04:30:10 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p594UA5i016778 for ; Thu, 9 Jun 2011 04:30:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p594UAON016771; Thu, 9 Jun 2011 04:30:10 GMT (envelope-from gnats) Resent-Date: Thu, 9 Jun 2011 04:30:10 GMT Resent-Message-Id: <201106090430.p594UAON016771@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Robert Simmons Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A51F106566B for ; Thu, 9 Jun 2011 04:23:27 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 8B2468FC08 for ; Thu, 9 Jun 2011 04:23:27 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p594NRlI036286 for ; Thu, 9 Jun 2011 04:23:27 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id p594NR6s036279; Thu, 9 Jun 2011 04:23:27 GMT (envelope-from nobody) Message-Id: <201106090423.p594NR6s036279@red.freebsd.org> Date: Thu, 9 Jun 2011 04:23:27 GMT From: Robert Simmons To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: misc/157722: unable to newfs a geli encrypted partition X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jun 2011 04:30:11 -0000 >Number: 157722 >Category: misc >Synopsis: unable to newfs a geli encrypted partition >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Jun 09 04:30:10 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Robert Simmons >Release: 8.2-RELEASE >Organization: >Environment: FreeBSD 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Thu Feb 17 02:41:51 UTC 2011 root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 >Description: newfs unable to create filesystem on a fresh geli encrypted provider. If you create a BSD scheme partition inside a geli encrypted provider like so: geli init -b -v -a hmac/sha512 -e aes-cbc -l 256 -s 4096 /dev/ad0p1 geli attach /dev/ad0p1 gpart create -s BSD ad0p1.eli gpart add -s 1g -t freebsd-ufs ad0p1.eli then you try to newfs, you get an error: # newfs -U /dev/ad0p1.elia newfs: can't read old UFS1 superblock: read error from block device: Invalid argument >How-To-Repeat: geli init -b -v -a hmac/sha512 -e aes-cbc -l 256 -s 4096 /dev/ad0p1 geli attach /dev/ad0p1 gpart create -s BSD ad0p1.eli gpart add -s 1g -t freebsd-ufs ad0p1.eli newfs -U /dev/ad0p1.elia >Fix: The workaround for this bug is to dd data to the provider before using newfs: dd if=/dev/random of=/dev/ad0p1.elia bs=8m After that, newfs works as it should. >Release-Note: >Audit-Trail: >Unformatted: