-
Notifications
You must be signed in to change notification settings - Fork 21
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
"Device size is not sufficient" when resizing f2fs partition #109
Comments
I ran into the same problem with release 9. I tried using GParted after flashing again and it failed the same way. When I tried to |
I can reproduce this with releases 7 and 8 as well. |
Well this is interesting. Flashing release 9 to my 128 GB microSD card and enlarging the partition & filesystem in GParted worked. When I mount that partition, |
After researching different filesystems and discussion on Matrix, I think the best solution for this would be to switch to btrfs for the root filesystem. f2fs is a mess due to incompatibilities between filesystems manipulated by different kernel versions: |
Found a fix for it! My best guess is that the f2fs-tools on F34 and newer are somehow incompatible to these F2FS filesystems. On F33 resizing works as expected. Here's how you do the resize from a F33 container running any Fedora host that has podman installed: sudo podman run --rm --device="/dev/<F2FS PARTITION>:/dev/f2fspart:rwm" --entrypoint '["/bin/bash", "-c"]' fedora:33 "dnf -y install f2fs-tools && resize.f2fs /dev/f2fspart" Make sure you replace Edit 2021.05.18: Fixed the entrypoint to make it an actual oneliner... |
Thanks for sharing that workaround. IMO that confirms that F2FS is a bad filesystem to use unless maybe you're an Android device manufacturer that intends to never update the kernel. It would be better to switch these scripts to btrfs. |
I dunno... eMMC doesn't have integrated wear-leveling electronics, so it's a good idea if the FS is flash aware to the point where it does wear leveling on its own. Does BTRFS do something like that? I'm not sure, haven't found anything yet... |
I believe btrfs should be fairly flash friendly, as a COW filesystem. |
Downgrading f2fs-tools from 1.14.0-2 to 1.14.0-1 worked for me, as suggested here. |
Flashed Release 9 onto a 32GB SD card. System boots and is functional, though as noted in the release notes, the partition is not automatically resized.
However, while I am able to successfully resize the partition using parted, I'm unable to resize the filesystem itself:
To eliminate the SD Card itself as a problem, I flashed the image to the Internal 32GB eMMC of my Pinephone Beta using jumpdrive over usb, but encountered the same issue as above (but with different device names)
To eliminate my computer's tools (Fedora 34), I booted this fedora image via SD and attempted to resize the internal emmc filesystem, encountering the same issue.
Noting that both SD and EMMC are 32GB, I attempted with various partition sizes via parted, instead of setting the end to 100%, I attempted 90% and 80% as well. Both failed, but with a higher "More segment needed" as the partition was made smaller.
It looks like resize.f2fs might be favouring large filesystems, either by design or by some settings at filesystem create time. There does not seem to be a tune.f2fs to attempt changing any settings, and I've well exhausted my f2fs knowledge.
My current assumption is that using a >32 GB SD card would probably resize correctly, but would like some confirmation before I order one.
The text was updated successfully, but these errors were encountered: