Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Jun 2011 04:23:27 GMT
From:      Robert Simmons <rsimmons0@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/157722: unable to newfs a geli encrypted partition
Message-ID:  <201106090423.p594NR6s036279@red.freebsd.org>
Resent-Message-ID: <201106090430.p594UAON016771@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106090423.p594NR6s036279>