Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Oct 2016 00:42:09 -0400
From:      Anton Yuzhaninov <citrin@citrin.ru>
To:        "freebsd-fs@freebsd.org" <freebsd-fs@freebsd.org>
Subject:   UFS: unaligned read from GELI with 8k sectorsize
Message-ID:  <f84b069b-aeee-ff3c-d4f9-e2fe3caaddb1@citrin.ru>

next in thread | raw e-mail | index | archive | help
Hi all.

I'm trying to install FreeBSD with an encrypted root.

Main difference from commonly used configuration - I want to use geli 
with 8k sectorsize.

I've created a geli provider, made UFS with 64k block and 8k fragment, 
extracted files to this FS.

While booting from installed system kernel panics after entering geli 
passphrase:

g_vfs_done():ada1p6.eli:[READ(offset=21938548736, length=8192)]error = 22
vnode_page_generic_gatpager_done: I/O read error 5
inid died (signal 6, exit 0)
panic: Going nowhere without my init!

errno 22 is EINVAL and it probably returned because 21938548736 is not 
multiple of 8192 (geli sectorsize).

Why UFS tries to read with offset, which is not multiple of frag size? 
And why this error happens only while mounting geli as root? If I boot 
FreeBSD from a USB stick I can attach this geli, mount UFS and read all 
files without problem.

FreeBSD 11 / amd64.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f84b069b-aeee-ff3c-d4f9-e2fe3caaddb1>