Topic: Error growing partition because of ext4 FS grow error
Hi, I dual boot W11 and a debian-based linux distro, I just tried to expand the extented partition (/dev/sda5) (linux) but I got an error in the "grow file system" step and my partition ended up like THIS which shows 17.01GB of unallocated space in sda5, I googled this and find similar cases that were fixed by running "sudo e2fsck --cc /dev/sda5" and then checking the partition in gparted, (which i did but i keep getting the same error message), I run "sudo e2fsck -f /dev/sda5" too before resizing but I get the same error; this is the log after performing a check in the partition:
CHECK
GParted 1.3.1
configuration --enable-libparted-dmraid --enable-online-resize
libparted 3.4
========================================
Device: /dev/sda
Model: ATA WDC WDS500G2B0A-
Serial: 183302A001D6
Sector size: 512
Total sectors: 976773168
Heads: 255
Sectors/track: 2
Cylinders: 1915241
Partition table: msdos
Partition Type Start End Flags Partition Name File System Label Mount Point
/dev/sda1 Primary 2048 277133627 boot ntfs
/dev/sda2 Primary 277135360 278468607 msftres ntfs
/dev/sda3 Primary 278468608 817381375 ntfs Disco local
/dev/sda4 Extended 817381376 976773119 lba extended
/dev/sda5 Logical 817383424 957911039 ext4
/dev/sda6 Logical 957913088 976773119 linux-swap
========================================
Device: /dev/sdb
Model: Kingston DataTraveler 3.0
Serial: none
Sector size: 512
Total sectors: 60437492
Heads: 255
Sectors/track: 2
Cylinders: 118504
Partition table: none
Partition Type Start End Flags Partition Name File System Label Mount Point
/dev/sdb Unpartitioned 0 60437491 iso9660 GParted-live
========================================
Check and repair file system (ext4) on /dev/sda5 00:00:07 ( ERROR )
calibrate /dev/sda5 00:00:00 ( SUCCESS )
path: /dev/sda5 (partition)
start: 817383424
end: 957911039
size: 140527616 (67.01 GiB)
check file system on /dev/sda5 for errors and (if possible) fix them 00:00:07 ( SUCCESS )
e2fsck -f -y -v -C 0 '/dev/sda5' 00:00:07 ( SUCCESS )
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
1068111 inodes used (32.60%, out of 3276800)
8047 non-contiguous files (0.8%)
1335 non-contiguous directories (0.1%)
# of inodes with ind/dind/tind blocks: 0/0/0
Extent depth histogram: 884786/1104
11124960 blocks used (84.88%, out of 13106952)
0 bad blocks
1 large file
728106 regular files
145120 directories
0 character device files
0 block device files
3 fifos
8024 links
194872 symbolic links (182209 fast symbolic links)
1 socket
------------
1076126 files
e2fsck 1.46.2 (28-Feb-2021)
grow file system to fill the partition 00:00:00 ( ERROR )
resize2fs -p '/dev/sda5' 00:00:00 ( ERROR )
resize2fs 1.46.2 (28-Feb-2021)
Please run 'e2fsck -f /dev/sda5' first.
if i try to shrink the partition i get:
GParted 1.3.1
configuration --enable-libparted-dmraid --enable-online-resize
libparted 3.4
========================================
Device: /dev/sda
Model: ATA WDC WDS500G2B0A-
Serial: 183302A001D6
Sector size: 512
Total sectors: 976773168
Heads: 255
Sectors/track: 2
Cylinders: 1915241
Partition table: msdos
Partition Type Start End Flags Partition Name File System Label Mount Point
/dev/sda1 Primary 2048 277133627 boot ntfs
/dev/sda2 Primary 277135360 278468607 msftres ntfs
/dev/sda3 Primary 278468608 817381375 ntfs Disco local /mnt/tmp
/dev/sda4 Extended 817381376 976773119 lba extended
/dev/sda5 Logical 817383424 957911039 ext4
/dev/sda6 Logical 957913088 976773119 linux-swap
========================================
Device: /dev/sdb
Model: Kingston DataTraveler 3.0
Serial:
Sector size: 512
Total sectors: 60437492
Heads: 255
Sectors/track: 2
Cylinders: 118504
Partition table: none
Partition Type Start End Flags Partition Name File System Label Mount Point
/dev/sdb Unpartitioned 0 60437491 iso9660 GParted-live
========================================
Shrink /dev/sda5 from 67.01 GiB to 50.00 GiB 00:00:08 ( ERROR )
calibrate /dev/sda5 00:00:00 ( SUCCESS )
path: /dev/sda5 (partition)
start: 817383424
end: 957911039
size: 140527616 (67.01 GiB)
check file system on /dev/sda5 for errors and (if possible) fix them 00:00:08 ( SUCCESS )
e2fsck -f -y -v -C 0 '/dev/sda5' 00:00:08 ( SUCCESS )
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
1068111 inodes used (32.60%, out of 3276800)
8047 non-contiguous files (0.8%)
1335 non-contiguous directories (0.1%)
# of inodes with ind/dind/tind blocks: 0/0/0
Extent depth histogram: 884786/1104
11124960 blocks used (84.88%, out of 13106952)
0 bad blocks
1 large file
728106 regular files
145120 directories
0 character device files
0 block device files
3 fifos
8024 links
194872 symbolic links (182209 fast symbolic links)
1 socket
------------
1076126 files
e2fsck 1.46.2 (28-Feb-2021)
shrink file system 00:00:00 ( ERROR )
resize2fs -p '/dev/sda5' 52428800K 00:00:00 ( ERROR )
resize2fs 1.46.2 (28-Feb-2021)
Please run 'e2fsck -f /dev/sda5' first.
as extra info, I shrinked the swap partition and then tried to expand sd5 again but it failed and only added the unallocted space to sda5, is there a way to fix this?
PS: I still can boot to linux without any issues