Bug 1979307

Summary: [f2fs-tools] Unable to resize f2fs partition on F34 for the pinephone, but it works on F33
Product: [Fedora] Fedora EPEL Reporter: camorris@redhat.co <camorris>
Component: f2fs-toolsAssignee: Eduardo Echeverria <echevemaster>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: epel8CC: echevemaster, garretr
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description camorris@redhat.co 2021-07-05 14:46:55 UTC
Description of problem:
[fedora-mobile]# rpm -qa | grep f2fs
f2fs-tools-1.14.0-2.fc34.x86_64


Version-Release number of selected component (if applicable):
f2fs-tools-1.14.0-2.fc34.x86_64

How reproducible:
Everytime

Steps to Reproduce:
## Using the pinephone in jumpmode to have access to EMMC disk
1. dd if=fedora.img of=/dev/sdd bs=1M status=progress 
2. resize partition to use maximum capacity instead of 4gb
3. resize.f2fs /dev/sda2

Actual results:
Error: Device size is not sufficient for F2FS volume, more segment needed =5023

Expected results:
Should works

Additional info:
See this github issue: https://github.com/nikhiljha/pp-fedora-sdsetup/issues/109

This workaround works: 
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"