1 (edited by andycivil 2021-06-21 01:00:47)

Topic: [Solved] All I did was resize into unallocated space...

I don't know if mine is the same issue as the 'sticky'. Please tell me, if it is.

I had bought myself a M.2 drive and moved my Linux Mint on to it by moving partitions. So, I had a EFI boot partition, and my Linux Mint (Ext 4) and unallocated space. Working fine. But, inevitably I ran out of space.

So, I set to expanding my partition to take over the unallocated space. Seems simple enough, expanding to the right and all. I know the partition is active because of the lock icon, so I boot up a brand new ISO on a USB of GParted. Technically, it's gparted-live-1.3.0-1-amd64.

The expand works OK, but I get an error. The result is, Used + Free space ≠ Total space. FSCK fails. However, the partition is still working (using it right now, thank God). But I'd like to fix it, especially because I want the space.

I tried to save the "details' from the live USB, but I don't know how you're supposed to do that because you can't save it anywhere. None of my disks would mount, it was always greyed out. All of the possible places to save it were volatile, so it was imprisoned inside my live USB. I gave up and took a screen shot with my phone (sorry). Oh, and the network wasn't working either.

I will try to find out how to post the screen shot.

The bottom line is, the final error tells me to run e2fsck -f first,  but that command had just been run with that option anyway. If I try to run it separately in a terminal window, it doesn't help.

I can follow somewhat geeky instructions, please link me to which instructions are appropriate for me.

2

Re: [Solved] All I did was resize into unallocated space...

Error screenshot:
fsck error jpg

3

Re: [Solved] All I did was resize into unallocated space...

That is indeed odd that the run of e2fsck completed successfully, but immediately after the resize2fs command indicated that the file system still needed to be fixed.

For future reference for saving the GParted log file see GParted Live Manual - Saving GParted Details

As I understand it, the current situation is that the partition has been grown, but the file system has not been grown.  If the start of the partition was not moved then it makes sense that all of the data is still easily accessible in the file system.

Can you try booting GParted Live, select the partition, choose Partition -> Check, and then Apply the operation?

If that doesn't work then we should gather some more details to try to troubleshoot the issue.  (Ideally save the gparted_details.htm log file and post it in this thread).

4

Re: [Solved] All I did was resize into unallocated space...

Thank you for answering. I did try using the select/check/apply thing, it "didn't work". (I'm sorry, I know that's such an unhelpful answer, I will try to get a more specific note of /how/ it didn't work, shortly. The short answer is that it went through the process OK, but announced that error in much the same way as the screenshot ^^^^.)

I will also try to get and post the full error details.

My plan is, to try to reverse the resize operation and hit the old size perfectly so that fsck is happy. When I've done that, I will try to use CloneZilla to clone my system onto a spare SSD that I have. If I succeed in booting off the SSD, then I will have that as a backup and I'll be ready to reformat my NVME and use CloneZilla again, to clone it back.

Meanwhile, beyond fetching the full error details, if there's anything I can do to, in some way help with diagnosing the bug here, I will be happy to try.

5

Re: [Solved] All I did was resize into unallocated space...

Update! My problem solved itself. I was going to try to adjust the partition size back to what it was, but the moment I changed it at all, everything "just worked". I tried several different sizes, no errors. My theory is that it's something to do with calculating the size of the entire disk. It was only when I expanded the partition to leave zero space at the end, that it failed. Surely it has to be something to do with an alignment error, or the disk size isn't a whole number of cylinders, or something daft like that? After all, there are no actual cylinders... I'm thinking that there's some kind of assumption that GParted makes, which is no longer valid with solid state drives. This is a Lexar NM610 NVMe SSD by the way. I"ll try to see if I can find its parameters in some way.

6

Re: [Solved] All I did was resize into unallocated space...

Thanks for reporting back that you were able to resolve the issue.  If you ever discover what actually happened then we'd appreciate an update so that we can investigate the root cause.

7 (edited by andycivil 2021-06-23 04:38:56)

Re: [Solved] All I did was resize into unallocated space...

I tried to re-create the problem on an unused SSD. I don't have a spare NVMe, nor even any socket to plug it in to. I copied the boot partition so faithfully, that my PC actually booted off it... to my surprise. I know, because the /boot/efi partition on the unused [sic] SSD was the one with the lock icon. Sadly, I was unable to make the {alleged} bug manifest itself.

I am reluctant to play with the working NVMe too much, but at the moment there's a small unallocated space at the end. I believe that if I tried to expand the partition to absorb all the space, it would fail again. The thing is, then what? What data could I collect that might help find the 'root cause'? I don't think the "details" would help much, because essentially all that matters is in that screenshot that I posted earlier.

8

Re: [Solved] All I did was resize into unallocated space...

Thanks for trying to recreate the issue.  If the problem is widespread the most likely someone else will report it and then that case can be investigated further.  If the problem is a strange one-off occurrence then at least you now have a working solution.