From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-x22c.google.com (mail-we0-x22c.google.com [IPv6:2a00:1450:400c:c03::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.server123.net (Postfix) with ESMTPS for ; Mon, 16 Feb 2015 09:31:31 +0100 (CET) Received: by mail-we0-f172.google.com with SMTP id k48so27718404wev.3 for ; Mon, 16 Feb 2015 00:31:31 -0800 (PST) Message-ID: <54E1AADE.7080600@gmail.com> Date: Mon, 16 Feb 2015 09:31:26 +0100 From: Milan Broz MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [dm-crypt] btrfs and "requested offset is beyond real size of device" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jay Sullivan , dm-crypt@saout.de On 02/15/2015 11:43 PM, Jay Sullivan wrote: > Hi, > > I don't know if this belongs on the btrfs, GRUB, or LUKS mailing > list, but it is a cryptsetup error, so I figure maybe someone here > can help me understand what this error means. > > *What I'm doing* > > I'm trying to set up a system with a btrfs /boot partition, and a few > encrypted btrfs-over-LUKS partitions. Nothing special, except that > I'm using btrfs for all of my partitions. > > *The Problem* > > I did get the setup "working", I'm able to successfully boot into it. > Here's the weird part: it only successfully boots about half of the > time. > > The other half of the time, I see this error just after I > successfully enter my password: > > requested offset is beyond real size of device Hi, this means that reporeted device size is for some reason smaller than LUKS data starting offset (payload) in header. Unfortunately exactly this code was changed, so it would be nice to reproduce it with new cryptsetup (1.6.6 ideally). > When this happens, it continues to fail when it prompts me again for > my password, until I reboot. It seems to fall into this issue about > 50% of the boots. ok, this is strange. I would say some udev script interfering here locking the device or so... Does your system use cryptsetup directly or systemd-cryptsetup to activate partition? > The culprit seems to be when the /boot partition is btrfs. If I use > ext4 as /boot, everything works fine and dandy. > > This should be reproducible on any machine, I've tried several times > on different machines to rule out hardware. I can give complete > instructions to reproduce if someone wants it, but before I go > through the effort, has anyone heard of this behavior before? Does > anyone have any insight on why this may be happening, especially why > it only happens sometimes. > > I'm using Ubuntu 14.10's LiveCD to install the operating system, > where cryptsetup's version says 1.6.1, and btrfs's version is > 3.14.1. Please can you describe exactly how to reproduce it? How the partition table looks like (MBR or GPT?) and how is the devices mapped? (Paste lsblk output from correctly booted system). What is in /etc/cryptab and fstab and on kernel boot line? (Do you always use underlying partition for dmcrypt with btrfs on top of it?) Maybe it would be better to create new issue here just to track debug data https://code.google.com/p/cryptsetup/issues/list Thanks, Milan