luks cannot create small volumes < 8M

Bug #1875885 reported by francis cagney
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cryptsetup (Ubuntu)
New
Undecided
Unassigned

Bug Description

I wanted to create a new luks image file, or actually increase the size of one that had overflowed.
Each time I get the error message:

Requested offset is beyond real size of device /work/e/tmp/codes.cryp.

There is a suggestion this happens if you already have a luks drive mounted that is larger. I had nothing mounted through mapper.

I successfully created my volume on 16.04, and 18.04. It fails on 20.04 after clean boot, and one device mount "sudo mount /dev/sda10 /work". I also mount /opt, and /big in my fstab

I believe all versions have already been gathered.

#!/bin/sh
dd if=/dev/zero of=codes.cryp bs=1024 count=8000 # 4M volume
sudo cryptsetup -vy luksFormat codes.cryp
sudo cryptsetup luksOpen /work/e/tmp/codes.cryp codes
sudo mkfs.ext4 /dev/mapper/codes
sudo cryptsetup luksClose codes

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: cryptsetup 2:2.2.2-3ubuntu2
ProcVersionSignature: Ubuntu 5.4.0-28.32-generic 5.4.30
Uname: Linux 5.4.0-28-generic x86_64
ApportVersion: 2.20.11-0ubuntu27
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: ubuntu:GNOME
Date: Wed Apr 29 15:56:38 2020
InstallationDate: Installed on 2020-04-26 (3 days ago)
InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Release amd64 (20200423)
SourcePackage: cryptsetup
UpgradeStatus: No upgrade log present (probably fresh install)
cmdline: BOOT_IMAGE=/boot/vmlinuz-5.4.0-28-generic root=UUID=ea9a06e5-2ffa-4a3a-9ff9-096ea28d78f7 ro quiet splash vt.handoff=7
crypttab: # <target name> <source device> <key file> <options>

Revision history for this message
francis cagney (irishbeast12345) wrote :
Revision history for this message
francis cagney (irishbeast12345) wrote :

Here is my "df -h" after mounting an 800M old volume, and the one created on 16.04 4.7M just now

Filesystem Size Used Avail Use% Mounted on
udev 3.8G 0 3.8G 0% /dev
tmpfs 785M 2.2M 783M 1% /run
/dev/sda8 46G 17G 27G 38% /
tmpfs 3.9G 26M 3.9G 1% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/sda9 1.9G 1.2G 571M 68% /opt
/dev/sda2 96M 33M 64M 34% /boot/efi
/dev/sda11 270G 210G 47G 82% /big
tmpfs 785M 44K 785M 1% /run/user/1000
/dev/sda10 4.5G 1.9G 2.4G 45% /work
/dev/mapper/proj 803M 278M 468M 38% /proj
/dev/mapper/codes 4.7M 60K 4.2M 2% /home/francis/e/codes

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.