Andrew Conway is a user on mastodon.me.uk. You can follow them or interact with them if you have an account anywhere in the fediverse. If you don't, you can sign up here.
Andrew Conway @mcnalu
Follow

Fellow Linux users: need to perform surgery on my laptop and first step involves resizing an existing ext4 partition ideally keeping its files. What's the fastest way? Command line methods are fine.

@dtluna @arunisaac @lohang thanks all. In the end I discovered that resize2fs can expand (but not shrink) a mounted filesystem, even a root one. So I used cfdisk to enlarge the partition, then rebooted and ran resize2fs on it. Job done. I was fully backed up though as it was a bit risky 😁

gparted (probably from a live disk) is one way to do it. When working on partitions with important data, I feel a little safer with a GUI.