I'm trying to shrink a ext4 partition but I'm being unable at it. I've googled around and found no way to solve this, so here's my request for help.
This partition is on a 2nd spinning HDD I have for multimedia, so no system files here. Swapping is also off.
No, it's not mounted while I try to resize it. I always remember this metaphor: "You can't pick a carpet up to dust it off while you're standing on it!".
It's partitioned with the old ms-dos partition type, not GPT.
I'm on Mint 20.3 and the partition was created with it. I've tried with a Mint 21 live USB (including to give you the gparted printscreen in English since my OS is in Portuguese) and the results are the very same.
What I think it might be: Since I mostly keep videos here, I've formatted it with 512K cluster size, and that implies bigalloc. I think that's eventually what's keeping me from resizing.
So what I've noticed:
- Gparted shows no free space when the drive is dismounted. When it is mounted, it shows its free space. Also minimum space and maximum space are equal. Gparted gives me no ability to slide the thingy to manage my free space and the new partition size as it should be. (printscreen below)
https://imgur.com/OxMStz0
- The disk utility (gnome-disks) allows me to slide and select a new size within its possible range but when I click OK I get an error (printscreen below) stating that the new size is smaller than the minimum. I have 42GB free and I've failed trying to create room for a new partition from 10 to 42GB. I just need 10GB for this new partition.
https://imgur.com/tLWW5bB
Output from dumpe2fs -h /dev/sdb1:
Code: Select all
sudo dumpe2fs -h /dev/sdb1
dumpe2fs 1.45.5 (07-Jan-2020)
Filesystem volume name: Documentos
Last mounted on: /media/Documentos
Filesystem UUID: 98a503f8-dc86-4f64-943a-133713c63a0f
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery extent 64bit flex_bg sparse_super large_file huge_file dir_nlink extra_isize bigalloc metadata_csum
Filesystem flags: signed_directory_hash
Default mount options: user_xattr acl
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 100080
Block count: 37499648
Reserved block count: 0
Free blocks: 11321856
Free inodes: 99091
First block: 0
Block size: 4096
Cluster size: 524288
Group descriptor size: 64
Reserved GDT blocks: 15
Blocks per group: 4194304
Clusters per group: 32768
Inodes per group: 11120
Inode blocks per group: 695
Flex block group size: 16
Filesystem created: Tue May 3 21:17:16 2022
Last mount time: Fri Oct 7 04:29:24 2022
Last write time: Fri Oct 7 04:29:24 2022
Mount count: 1
Maximum mount count: -1
Last checked: Fri Oct 7 04:28:29 2022
Check interval: 0 (<none>)
Lifetime writes: 642 GB
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
Inode size: 256
Required extra isize: 32
Desired extra isize: 32
Journal inode: 8
Default directory hash: half_md4
Directory Hash Seed: 69668ddc-9a3e-40f4-aa3f-e3f80d8de363
Journal backup: inode blocks
Checksum type: crc32c
Checksum: 0x1cd24a1c
Journal features: journal_incompat_revoke journal_64bit journal_checksum_v3
Journal size: 1024M
Journal length: 262144
Journal sequence: 0x000e6ef6
Journal start: 1
Journal checksum type: crc32c
Journal checksum: 0xee7e3984
Would formatting it with GPT solve this issue?
Should I stop formatting partitions (where I store large files) with a different cluster size than default so it doesn't require bigallog? (bigalloc's ext4.wiki.kernel.org page info is from 2013, I'm sure it's more stable now than it was back then, or am I wrong?)
I have the spare room on another HDD to backup all the data and swipe this one clear if needed but that would be a time consuming solution. If formatting it with GPT would solve this, sure, but if I would have to move all the data to another disk, clean the disk, create a new partition the size I need and move all the data back each time I might need to readjust partition sizes, it just would not be practical at all...
Any hints?
As always, thanks guys!