New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
systemd-homed: Getting "New partition doesn't fit into backing storage, refusing" #22255
Comments
I have a similar issue with a homed on a dedicated drive
As soon I upgrade my systemd to 250 or above, that same execution causes me to have this log output:
I checked the pam.d configurations after noticing the sddm-helper and pam activity coming up unlike the first home activation and there was no difference in pam.d configurations that relate to sddm login. After noticing this I did a freshly installed kvm machine of Manjaro and Arch Linux with newest packages to both of which I provided two 20G disks and made a RAID1 out of them as
The user creation on both was done via:
I also tried making the home using the device |
Same issue here, seems to be related with btrfs. If i run below command with systemd version
Used distro
Linux kernel version
CPU architecture
Steps to reproduce
journalctl -xeu systemd-homed
homectl inspect foo
|
Hello! I found a workaround on my x64 Arch Linux box. I simply added the btrfs module to my initcpio (mkinitcpio in my case). |
Unfortunately this does not work on my x64 Arch setup... former /etc/mkinitcpio.conf
Tried adding 'btrfs' hook as well as 'btrfs' module and 'btrfs' and 'btrfsck' binaries instead (which is more or less what btrfs hook does in install section). Nothing helped. Still user 'foo' is not able to login with its home directory decrypted... |
I doubt any delay in btrfs module loading is the issue for myself as my root filesystem is btrfs . |
Hi, |
Here it is. Looking back, I think my partitions needed to be created with the module loaded by mkinitcpio.
Edit:Almost forgot to mention - my homed backing devices are ZFS ZVols. |
Yesterday I updated my openSUSE Tumbleweed and since then I am having the exact same issue. My home is on a dedicated SSD (256GB, /dev/sdb, Luks, Btrfs). Before the update (everything was working fine):
After the update (Error: New partition doesn't fit):
I have a snapshot from before and after the update. So I can compare this two if anyone needs more information... |
I also noticed a second issue which, I think, is related because it also only happened after the update. When I login with my guest user (10 GB, /home/guest.home, Luks, Btrfs) I get a warning that my / is full. Before I login with my guest account:
After I login with my guest account:
But its not full. I still can write on / . |
@heipa0 That can also be caused by LUKS discard settings. |
@jpalko Thanks for the link! homectl update --luks-discard=on guest indeed solved the issue with the guest account. However the posts mention that its not recommended and a bit risky. Do I need to worry? The main issue with my own home on the dedicated disk is not solved by that. |
@heipa0 I've had to leave it on for my LUKS image file home directories so that I don't keep bumping into the issue and thus far I've had no problems caused by it. The man page of homectl describes that the over-committing of the filesystem containing /home directory to be the main reason which you propably won't run into in a single user system. Let's however keep this thread on topic which remains present for my systems as well. |
This has broken my system after update to Fedora Workstation 36. (Of course, systemd-homed isn't really supported there.) As a workaround, I had to disable systemd-homed completely, switch to traditional /etc/passwd (add my user and group there), and mount the home dir manually, as root, before signing in: cryptsetup open /dev/sda1 home-linus
mount /dev/mapper/home-linus /mnt
mount -B /mnt/linus /home/linus |
I encountered the same issue on ArchLinux using a (external) disk with btrfs as the underlying filesystem having the current ArchLinux packages ( What fixed the problem for me was to disable the implicit $ homectl inspect $USERNAME
// ... other settings
Image Path: /dev/disk/by-uuid/c17e67a8-3b9a-48a9-9154-a5a311acb61f
Removable: yes
LUKS Discard: online=yes offline=yes
// ... other settings
Auto Resize: off If you also see this error in your logs (and using a dedicated block device for a given user) check if adjusting the affected home zone with the flag |
Great, works like a charm. Thanks alot |
I did bisect, the issue occurred since 2619100 commit. |
I found something suspicious. systemd/src/home/homework-luks.c Lines 3219 to 3234 in 9ca1efb
The h->disk_size variable in my system has UINT64_MAX . It looks like a default value when --disk-size option was not used. So it need to be handled separately if h->disk_size == UNIT64_MAX I think. @poettering @yuwata
|
If the backing storage is LUKS2 on a block device, auto resize mode is enabled, and disk size is not specified, resize the partition to the maximum expandable size. Fixes: systemd#22255, systemd#23967
If the backing storage is LUKS2 on a block device, auto resize mode is enabled, and disk size is not specified, resize the partition to the maximum expandable size. Fixes: systemd#22255, systemd#23967
If the backing storage is LUKS2 on a block device, auto resize mode is enabled, and disk size is not specified, resize the partition to the maximum expandable size. Fixes: systemd#22255, systemd#23967
If the backing storage is LUKS2 on a block device, auto resize mode is enabled, and disk size is not specified, resize the partition to the maximum expandable size. Fixes: systemd#22255, systemd#23967
If the backing storage is LUKS2 on a block device, auto resize mode is enabled, and disk size is not specified, resize the partition to the maximum expandable size. Fixes: systemd#22255, systemd#23967
If the backing storage is LUKS2 on a block device, auto resize mode is enabled, and disk size is not specified, resize the partition to the maximum expandable size. Fixes: systemd#22255, systemd#23967
If the backing storage is LUKS2 on a block device, auto resize mode is enabled, and disk size is not specified, resize the partition to the maximum expandable size. Fixes: systemd#22255, systemd#23967
This commit enable homework-luks to create a user home partition on an existing partition. This allows us to have multiple user home partitions on a single disk, or share user home partitions with the system partitions. This commit address systemd#15273 for "vanilla" partitions Partitions on LVM have not been tested. This works by getting the parent block device of the selected partition, and if it has a GPT partition table, edit the partition table entry and format the partition as a per-user home partition. Testing: ``` $ sudo mkosi --force build [...] $ truncate -s 16G ./mkosi.output/arch~rolling/image.raw && sfdisk -a ./mkosi.output/arch~rolling/image.raw <<EOF label: gpt device: /dev/sda unit: sectors sector-size: 512 /dev/sda3 : size=8G, uuid=$(systemd-id128 new -u), name=test EOF $ sudo mkosi qemu [...] [root@archlinux ~]# NEWPASSWORD=APassword111 homectl create user1 --storage=luks --image-path=/dev/sda3 --fs-type=ext4 # Testing with ext4 because of systemd#22255 [root@archlinux ~]# homectl activate user1 [root@archlinux ~]# su user1 [user1@archlinux root]$ cd [user1@archlinux ~]$ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS sda 8:0 0 16G 0 disk ├─sda1 8:1 0 256M 0 part ├─sda2 8:2 0 3G 0 part / └─sda3 8:3 0 8G 0 part └─home-user1 254:0 0 8G 0 crypt /home/user1 ```
This commit enable homework-luks to create a user home partition on an existing partition. This allows us to have multiple user home partitions on a single disk, or share user home partitions with the system partitions. This commit address systemd#15273 for "vanilla" partitions Partitions on LVM have not been tested. This works by getting the parent block device of the selected partition, and if it has a GPT partition table, edit the partition table entry and format the partition as a per-user home partition. Testing: ``` $ sudo mkosi --force build [...] $ truncate -s 16G ./mkosi.output/arch~rolling/image.raw && sfdisk -a ./mkosi.output/arch~rolling/image.raw <<EOF label: gpt device: /dev/sda unit: sectors sector-size: 512 /dev/sda3 : size=8G, uuid=$(systemd-id128 new -u), name=test EOF $ sudo mkosi qemu [...] [root@archlinux ~]# NEWPASSWORD=APassword111 homectl create user1 --storage=luks --image-path=/dev/sda3 --fs-type=ext4 # Testing with ext4 because of systemd#22255 [root@archlinux ~]# homectl activate user1 [root@archlinux ~]# su user1 [user1@archlinux root]$ cd [user1@archlinux ~]$ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS sda 8:0 0 16G 0 disk ├─sda1 8:1 0 256M 0 part ├─sda2 8:2 0 3G 0 part / └─sda3 8:3 0 8G 0 part └─home-user1 254:0 0 8G 0 crypt /home/user1 ```
This commit enable homework-luks to create a user home partition on an existing partition. This allows us to have multiple user home partitions on a single disk, or share user home partitions with the system partitions. This commit address systemd#15273 for "vanilla" partitions Partitions on LVM have not been tested. This works by getting the parent block device of the selected partition, and if it has a GPT partition table, edit the partition table entry and format the partition as a per-user home partition. Testing: ``` $ sudo mkosi --force build [...] $ truncate -s 16G ./mkosi.output/arch~rolling/image.raw && sfdisk -a ./mkosi.output/arch~rolling/image.raw <<EOF label: gpt device: /dev/sda unit: sectors sector-size: 512 /dev/sda3 : size=8G, uuid=$(systemd-id128 new -u), name=test EOF $ sudo mkosi qemu [...] [root@archlinux ~]# NEWPASSWORD=APassword111 homectl create user1 --storage=luks --image-path=/dev/sda3 --fs-type=ext4 # Testing with ext4 because of systemd#22255 [root@archlinux ~]# homectl activate user1 [root@archlinux ~]# su user1 [user1@archlinux root]$ cd [user1@archlinux ~]$ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS sda 8:0 0 16G 0 disk ├─sda1 8:1 0 256M 0 part ├─sda2 8:2 0 3G 0 part / └─sda3 8:3 0 8G 0 part └─home-user1 254:0 0 8G 0 crypt /home/user1 ```
This commit enable homework-luks to create a user home partition on an existing partition. This allows us to have multiple user home partitions on a single disk, or share user home partitions with the system partitions. This commit address systemd#15273 for "vanilla" partitions Partitions on LVM have not been tested. This works by getting the parent block device of the selected partition, and if it has a GPT partition table, edit the partition table entry and format the partition as a per-user home partition. Testing: ``` $ sudo mkosi --force build [...] $ truncate -s 16G ./mkosi.output/arch~rolling/image.raw && sfdisk -a ./mkosi.output/arch~rolling/image.raw <<EOF label: gpt device: /dev/sda unit: sectors sector-size: 512 /dev/sda3 : size=8G, uuid=$(systemd-id128 new -u), name=test EOF $ sudo mkosi qemu [...] [root@archlinux ~]# NEWPASSWORD=APassword111 homectl create user1 --storage=luks --image-path=/dev/sda3 --fs-type=ext4 # Testing with ext4 because of systemd#22255 [root@archlinux ~]# homectl activate user1 [root@archlinux ~]# su user1 [user1@archlinux root]$ cd [user1@archlinux ~]$ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS sda 8:0 0 16G 0 disk ├─sda1 8:1 0 256M 0 part ├─sda2 8:2 0 3G 0 part / └─sda3 8:3 0 8G 0 part └─home-user1 254:0 0 8G 0 crypt /home/user1 ```
This commit enable homework-luks to create a user home partition on an existing partition. This allows us to have multiple user home partitions on a single disk, or share user home partitions with the system partitions. This commit address systemd#15273 for "vanilla" partitions Partitions on LVM have not been tested. This works by getting the parent block device of the selected partition, and if it has a GPT partition table, edit the partition table entry and format the partition as a per-user home partition. Testing: ``` $ sudo mkosi --force build [...] $ truncate -s 16G ./mkosi.output/arch~rolling/image.raw && sfdisk -a ./mkosi.output/arch~rolling/image.raw <<EOF label: gpt device: /dev/sda unit: sectors sector-size: 512 /dev/sda3 : size=8G, uuid=$(systemd-id128 new -u), name=test EOF $ sudo mkosi qemu [...] [root@archlinux ~]# NEWPASSWORD=APassword111 homectl create user1 --storage=luks --image-path=/dev/sda3 --fs-type=ext4 # Testing with ext4 because of systemd#22255 [root@archlinux ~]# homectl activate user1 [root@archlinux ~]# su user1 [user1@archlinux root]$ cd [user1@archlinux ~]$ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS sda 8:0 0 16G 0 disk ├─sda1 8:1 0 256M 0 part ├─sda2 8:2 0 3G 0 part / └─sda3 8:3 0 8G 0 part └─home-user1 254:0 0 8G 0 crypt /home/user1 ```
This commit enable homework-luks to create a user home partition on an existing partition. This allows us to have multiple user home partitions on a single disk, or share user home partitions with the system partitions. This commit address systemd#15273 for "vanilla" partitions Partitions on LVM have not been tested. This works by getting the parent block device of the selected partition, and if it has a GPT partition table, edit the partition table entry and format the partition as a per-user home partition. Testing: ``` $ sudo mkosi --force build [...] $ truncate -s 16G ./mkosi.output/arch~rolling/image.raw && sfdisk -a ./mkosi.output/arch~rolling/image.raw <<EOF label: gpt device: /dev/sda unit: sectors sector-size: 512 /dev/sda3 : size=8G, uuid=$(systemd-id128 new -u), name=test EOF $ sudo mkosi qemu [...] [root@archlinux ~]# NEWPASSWORD=APassword111 homectl create user1 --storage=luks --image-path=/dev/sda3 --fs-type=ext4 # Testing with ext4 because of systemd#22255 [root@archlinux ~]# homectl activate user1 [root@archlinux ~]# su user1 [user1@archlinux root]$ cd [user1@archlinux ~]$ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS sda 8:0 0 16G 0 disk ├─sda1 8:1 0 256M 0 part ├─sda2 8:2 0 3G 0 part / └─sda3 8:3 0 8G 0 part └─home-user1 254:0 0 8G 0 crypt /home/user1 ```
If the backing storage is LUKS2 on a block device, auto resize mode is enabled, and disk size is not specified, resize the partition to the maximum expandable size. Fixes: systemd#22255, systemd#23967
If the backing storage is LUKS2 on a block device, auto resize mode is enabled, and disk size is not specified, resize the partition to the maximum expandable size. Fixes: systemd#22255, systemd#23967 (cherry picked from commit 5bfc4de) (cherry picked from commit d682e09) (cherry picked from commit aca5356)
This commit enable homework-luks to create a user home partition on an existing partition. This allows us to have multiple user home partitions on a single disk, or share user home partitions with the system partitions. This commit address systemd#15273 for "vanilla" partitions Partitions on LVM have not been tested. This works by getting the parent block device of the selected partition, and if it has a GPT partition table, edit the partition table entry and format the partition as a per-user home partition. Testing: ``` $ sudo mkosi --force build [...] $ truncate -s 16G ./mkosi.output/arch~rolling/image.raw && sfdisk -a ./mkosi.output/arch~rolling/image.raw <<EOF label: gpt device: /dev/sda unit: sectors sector-size: 512 /dev/sda3 : size=8G, uuid=$(systemd-id128 new -u), name=test EOF $ sudo mkosi qemu [...] [root@archlinux ~]# NEWPASSWORD=APassword111 homectl create user1 --storage=luks --image-path=/dev/sda3 --fs-type=ext4 # Testing with ext4 because of systemd#22255 [root@archlinux ~]# homectl activate user1 [root@archlinux ~]# su user1 [user1@archlinux root]$ cd [user1@archlinux ~]$ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS sda 8:0 0 16G 0 disk ├─sda1 8:1 0 256M 0 part ├─sda2 8:2 0 3G 0 part / └─sda3 8:3 0 8G 0 part └─home-user1 254:0 0 8G 0 crypt /home/user1 ```
If the backing storage is LUKS2 on a block device, auto resize mode is enabled, and disk size is not specified, resize the partition to the maximum expandable size. Fixes: systemd#22255, systemd#23967 (cherry picked from commit 5bfc4de) (cherry picked from commit d682e09)
If the backing storage is LUKS2 on a block device, auto resize mode is enabled, and disk size is not specified, resize the partition to the maximum expandable size. Fixes: systemd#22255, systemd#23967 (cherry picked from commit 5bfc4de)
systemd version the issue has been seen with
Used distribution
Linux kernel version used (
uname -a
)CPU architecture issue was seen on
Expected behaviour you didn't see
Unexpected behaviour you saw
Steps to reproduce the problem
Additional program output to the terminal or log subsystem illustrating the issue
The text was updated successfully, but these errors were encountered: