UFS: unaligned read from GELI with 8k sectorsize
citrin at citrin.ru
Sat Oct 1 04:42:27 UTC 2016
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
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.
More information about the freebsd-fs