1

Topic: [SOLVED] logical ext4 resize to left fails on growing the filesystem

Hi,
i used Gparted Live 1.3.0 to expand a logical ext4 partition to the left and it failed with

grow file system to fill the partition  00:00:00    ( ERROR )
        
resize2fs -p '/dev/sdc5'  00:00:00    ( ERROR )
        
resize2fs 1.46.2 (28-Feb-2021)
Please run 'e2fsck -f /dev/sdc5' first.

before the operation I had the following partition layout and the goal was to expand sdc5 to the left to consume empty space.

Device:    /dev/sdc
Model:    ATA M4-CT256M4SSD2
Serial:    00000000123409138F0C
Sector size:    512
Total sectors:    500118192
 
Heads:    255
Sectors/track:    2
Cylinders:    980623
 
Partition table:    msdos
 
Partition    Type            Start                 End            Flags        File System    Label
/dev/sdc1    Primary    2048                 206847    boot        ntfs            System Reserved    
/dev/sdc4    Extended    206848          500117503            extended        
/dev/sdc5    Logical    382386176     475019263            ext4        
/dev/sdc6    Logical    475021312     500117503            linux-swap    

after the failed operation

sudo parted /dev/sdc unit s print
Model: ATA M4-CT256M4SSD2 (scsi)
Disk /dev/sdc: 500118192s
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start            End               Size             Type         File system     Flags
 1           2048s          206847s        204800s       primary    ntfs                boot
 4           206848s       500117503s  499910656s  extended
 5           208896s       475019263s  474810368s  logical      ext4
 6           475021312s  500117503s  25096192s   logical      linux-swap(v1)

what I have tried so far:

sudo e2fsck -f /dev/sdc5 
e2fsck 1.46.2 (28-Feb-2021)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sdc5: 584179/2899968 files (0.6% non-contiguous), 10502126/11579136 blocks

and

user@debian:~$ sudo e2fsck -cc /dev/sdc5 
e2fsck 1.46.2 (28-Feb-2021)
Checking for bad blocks (non-destructive read-write test)
Testing with random pattern: done                                                 
/dev/sdc5: Updating bad block inode.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/sdc5: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sdc5: 584179/2899968 files (0.6% non-contiguous), 10502126/11579136 blocks
user@debian:~$ 

while I think I tried multiple times running the "Check" from the Gparted GUI without success.
Trying it one last time as i write this post, "Check" does solve the issue.

I can provide the gparted_details.htm if this could help rootcausing the issue.
(my experience seemed similar to http://gparted-forum.surf4.info/viewtopic.php?id=18000)

Thanks for maintaining this fantastic tool!