From owner-freebsd-fs@freebsd.org Sat Oct 1 04:42:27 2016 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6852BC04B8B for ; Sat, 1 Oct 2016 04:42:27 +0000 (UTC) (envelope-from citrin@citrin.ru) Received: from hz.citrin.ru (hz.citrin.ru [88.198.212.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D5F8676 for ; Sat, 1 Oct 2016 04:42:26 +0000 (UTC) (envelope-from citrin@citrin.ru) Received: from [IPv6:2601:18a:c301:8eee:e07a:e3b6:a7ad:cc68] (unknown [IPv6:2601:18a:c301:8eee:e07a:e3b6:a7ad:cc68]) (Authenticated sender: citrin@citrin.ru) by hz.citrin.ru (Postfix) with ESMTPSA id 0D37B2874D1 for ; Sat, 1 Oct 2016 04:42:22 +0000 (UTC) To: "freebsd-fs@freebsd.org" From: Anton Yuzhaninov Subject: UFS: unaligned read from GELI with 8k sectorsize Message-ID: Date: Sat, 1 Oct 2016 00:42:09 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrin.ru; s=s0; t=1475296943; bh=b7iK9Hnd4NWHi9pFfWD6F/rtfynbeZC8BJomI41WyCk=; h=To:From:Subject:Message-ID:Date:MIME-Version:Content-Type:Content-Transfer-Encoding; b=HlNNTW2dJzWi4xBuyDTLUJqINymVjO9ehss17i8T8EmmazBfCP/0gtEt3G27R/BhxeO0CobF0rPDofKopAKHe8xPHzvzXA3xjwPr9WJCENiroEtPCW+4ZvDEn+zdERhYjxT0WITWMJeRyB/lhfsHLGCgjXuO9KMj0aq4zILs1kA= X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Oct 2016 04:42:27 -0000 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.