SUMMARY I used kde partitionmanager today to resize my root ext4 partition on opensuse tw and It gave me an error saying something was wrong with superblocks, I thought It was fine, left the software and went back to my root (I was on opensuse tw kde liveusb) and It dropped me on a emergency shell. I went back to opensuse tw kde liveusb and figured out that It shrunk the partition (the same process cfdisk does) instead of check the filesystem firstly (with e2fsck), actually resizing (with resize2fs) and then use cfdisk to finalize. STEPS TO REPRODUCE 1. open partitionmanager 2. select the partition you want to shrink 3. right click it and select "resize/move" 4. put a value on "free space after", apply SOFTWARE/OS VERSIONS Linux/KDE Plasma: opensuse tumbleweed (available in About System) KDE Plasma Version: 5.18.4 KDE Frameworks Version: 5.69.0 Qt Version: 5.14.1
What actually gave you an error about wrong superblocks. Was it KDE Partition Manager while running after resize file system check? Were you resizing mounted partition? It should only be possible to grow ext4 mounted partition not shrink... (Unless you do something illegal like open partitionmanager, mount that partition using external tools, so that KPM is not aware that partition is mounted and then shrink it)
(In reply to Andrius Štikonas from comment #1) > What actually gave you an error about wrong superblocks. Was it KDE > Partition Manager while running after resize file system check? I don't get the second part of the answer. It was this: https://linux-cdn.softpedia.com/screenshots/KDE-Partition-Manager_1.png It didn't even took a second to output me a superblock error. > Were you resizing mounted partition? It should only be possible to grow ext4 > mounted partition not shrink... (Unless you do something illegal like open > partitionmanager, mount that partition using external tools, so that KPM is > not aware that partition is mounted and then shrink it) I resized it offline (used opensuse tw liveusb to do it)
(In reply to Leonardo from comment #2) > It didn't even took a second to output me a superblock error. > Hmm, so maybe it was found during initial file system check. Otherwise it would have taken much longer (shrinking needs to move data). I just tried the steps you mentioned, it worked fine for me. (everything was done in the right order File sytem check, shrink fs resize partitition, fs check again)
(In reply to Andrius Štikonas from comment #3) > (In reply to Leonardo from comment #2) > > It didn't even took a second to output me a superblock error. > > > Hmm, so maybe it was found during initial file system check. Otherwise it > would have taken much longer (shrinking needs to move data). > > I just tried the steps you mentioned, it worked fine for me. > (everything was done in the right order File sytem check, shrink fs resize > partitition, fs check again) Well... I just tried in virtualbox here too and It did work fine :/ Probably It was already borked then... sorry about it
Yeah, it could be that there was something bad already and fsck found it. By the way, if you are using live cd for resizing, it's probably a good idea to use newer version of KDE Partition Manager. OpenSuse's is quite old...