Geli sector size > 8192 completely breaks.

Andrew B lightmoogle at hotmail.com
Sat Feb 2 03:03:25 PST 2008


I've been trying to get GELI working in a number of ways, and it seems whenever I change the sector size to 16384 or higher, I can't run newfs on the resultant encrypted volume.

Using dd with sector size 16384 gives me the greatest performance for the sector size I'm willing to have. It's very close to the maximum transfer rate of my drive. Nevertheless, using a sector size of 16K makes it so I can't run newfs:
# geli init -s 16384 /dev/ad4; geli attach /dev/ad4
Enter passphrase:
# newfs /dev/ad4.eli 
# newfs /dev/stripe/raids.eli 
/dev/stripe/raids.eli: 715404.8MB (1465149120 sectors) block size 16384, fragment size 16384
        using 797 cylinder groups of 898.39MB, 57497 blks, 14400 inodes.
newfs: can't read old UFS1 superblock: read error from block device: Invalid argument

As you can see, it's detecting the sector size of the device in the block and fragment size. I'm not sure why the error occurs, and it occurs _only_ on sector sizes larger than 8192 (I've only tried powers of 2).

In testing, I've created a stripe across multiple 16384 geli devices with 16384 sector size, same issue; I've also done it with a geom_RAID5 device on top.. same issue still. Interestingly, I'm not able to _seek_ with the 16k sector size.
# dd if=/dev/stripe/raids.eli of=/dev/null  bs=1m seek=16384M
dd: /dev/null: Inappropriate ioctl for device

I can "skip" as that reads in the data and merely discards it, or I can start from zero and read. The ioctl error also applies with the 8192, 4096 and probably other sector sizes.

I'm a bit confused, then.. it seems like without setting it higher that 8192, I lose a bit of performance. Setting it higher, however, causes newfs to fail. dd continues to work like a champ, however. Is this proper behavior for geli? (I.e. man page is lacking an upper bound on sector size.) Or alternatively, is there a bug in geli somewhere? or is something else going on and I'm just too tired at the moment to comprehend it?

6.2-RELEASE-p10 FreeBSD 6.2-RELEASE-p10 #1: i386

I do get _fairly_ good transfer -- the parent device yields 50.3MB/s, while the GELI device yields 46MB/s with a 16384 sector size, or 43MB/s with an 8192 sector size. This is with a 1.5GHz via C7 and the padlock module compiled in. During those tests, dd showed 2% CPU; top showed .5% user, 26% system, 4% interrupt, on average. Not bad, I'd say, for a 12watt processor :-)

-DrkShadow
lightmoogle at hotmail.com
_________________________________________________________________
Connect and share in new ways with Windows Live.
http://www.windowslive.com/share.html?ocid=TXT_TAGHM_Wave2_sharelife_012008


More information about the freebsd-geom mailing list