Need help with resizing home partition

I succesfully resized my root partition with: Use the space from a u... | SailfishOS community wiki .
However I only added 20% of the free space to the root partition. I want to use the rest for /home.

So I did the same for home:

[root@XperiaXA2 mapper]# lvextend sailfish/home -l +100%Free
  /dev/mmcblk0rpmb: read failed after 0 of 4096 at 0: Input/output error
  Size of logical volume sailfish/home changed from 17.55 GiB (4494 extents) to 19.81 GiB (5072 extents).
  Logical volume sailfish/home successfully resized.

However resize2fs doesn’t work for /home:

[root@XperiaXA2 defaultuser]# resize2fs /dev/mapper/sailfish-home 
resize2fs 1.46.5 (30-Dec-2021)
resize2fs: Device or resource busy while trying to open /dev/mapper/sailfish-home
Couldn't find valid filesystem superblock.

Is this due to the LUKS encryption? Is there a way around this? Any help would be greatly appreciated.
(also, it seems like I will only gain 3GB, 700GB on / and 2.3GB on /home, from this. Wasn’t the unused partition system_a on the XA2 more like 10-12GB?)

Haven’t tried, but did you see this - More space for /home or /root with mininal effort - #7 by robang74 ?

1 Like

I used this guide some minutes ago and it worked flawlessly.
There´s a part for devices with encryption enabled (?>SFOS 3.3?).

Please note that there are three different guides referenced above in this discussion thread (“topic”). The first two referenced use an “unused” boot partition, which has two significant drawbacks:

  1. It is not applicable to all devices, only the ones with both, a system_a and a system_b partition.
  2. 1. […] This option has the drawback that if you want to reflash your device with SailfishOS, the flashing won’t work, you need to restore the partition first, e.g. by flashing Android.

The third guide referenced is a long outdated version (because nothing at can be updated since 2020-10-01) of this guide at GitLab (which is referenced at the end of the obsolete version at TJC!). It takes a few gigabytes from the user volume to amend the root volume and hence works on all devices (except for the original Jolla 1, which does shift space between user and root volume automatically).
Please stop referencing the outdated version of this guide at!
Do use this maintained version:


I´m sorry having referred to the old article, still had it in my bookmarks. Won´t do it again. Already updated my link. Thanks for pointing out. Greetings.

1 Like

I also did it once on my XA2.
(but reverted some time later as it was not possible anymore to clone my XA2 with dd on a backup device)

The gain was the same, approx 3GB.

If you want to use this trick on your home partition, I’guess you need to do it before encrypting. I have few knowledge but in a full experimental way, I’d reinstall sailfish without encryption, resize the partitions and try to enable encryption afterwards.
Or, try to do it live, but that’s hot. Not sure it’d work. Could even ruin the boot process.

Olf’s guide way is probably safer.