I have a 2.7 TiB HDD I was originally using for my media library that I wanted to also use to host my programming work so I can access it from two different linux installs on the same machine. Using KDE Partition Manager I edited my partitions to shrink the existing media library and it was taking a long time (half an hour for a couple percentage points) so I let it run overnight, Coming home from work the next day I see that KDE Partition manager has thrown an error while attempting to shrink the disk after working for 7 hours and the two partitions exist on the drive but they're now both unmouunted and of an unknown filesystem type, presumably making my data lost. What happened that caused an error this bad? is my data recoverable? Generally at a loss here, thanks a lot in advance.
#[SOLVED] Shrank a partition overnight and woke up to an error effecting the whole hard drive.
43 messages · Page 1 of 1 (latest)
yeah KDE Partition Manager sucks at erroring out gracefully
Broke my NTFS partition once
oh! okay
I was hoping to stay in the kde software suite but I guess not, is there a better one you recommend? either gui or cli?
GParted
It's a GUI for parted
It's I think GTK based so it looks off place but it works
And can reliably resize NTFS and such
Ok but to fix this damage
What filesystem was the drive on before you shrunk it?
btrfs but I didn't make any manual backups
Can you run the following command (which will list all your block devices) and explain which one is the disc in question?
lsblk -f
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
sda
└─sda1
sdb
├─sdb1
└─sdb2 ntfs DCB60DE4B60DBFCE
sdc
├─sdc1 vfat FAT32 BOOT D4EA-E688 273.6M 9% /boot/efi
├─sdc2 swap 1 Swap 6097bff4-8e3b-4067-a349-ce740dc18297 [SWAP]
├─sdc3 ext4 1.0 930ec6b6-1e89-48db-9f22-329442d3201b 40G 51% /
└─sdc4 ext4 1.0 20f71f3e-7608-4f22-8e07-1ddaae117e74 0 95% /home
sr0
A friend helped me poke around a lot with the dedicated btrfs tools and unfortunately the only thing that's worked so far is using a utility like testdisk to manually recover files
which disc is the problem
How many hours ago did this happen?
This happened overnight last night I imagine around 7 in the morning today was when it finished
Can you upload the logs for the last 48 hours?
journalctl -S -48h | gzip - > logs.gz
sorry for the slow responses I ended up just using the disk recovery tool to get the files I need but I can pull up the logs to see if there's anything obvious about what happened with kde partition manager
.What is the approximate time you started shrinking the file system?
midnight between 7/22/23 and 7/23/23 EST
Window manager crashed at midnight
Jul 23 01:02:41 quinndeavorOS systemd-coredump[59050]: Process 801 (kwin_x11) of user 1000 dumped core.
Is it related?
No idea
This is after
Jul 22 23:37:25 quinndeavorOS partitionmanager[46444]: "Partition ‘/dev/sda1’ has the same position and size after resize/move. Ignoring operation.
and
Jul 22 23:45:47 quinndeavorOS partitionmanager[46444]: "Applying operations..."
Interesting. I unfortunately ended up doing my repartitions did some chmod stuff and got myself into emergency mode
If the crash happens while you're asleep and the shrinking is still in progress, this is probably the cause.
Ahh okay. Any particular reason why kde would crash like that?
I have no idea, as I'm not familiar with the source code at all.
Next, you may want to consider backing up before this type of operation.
And run the commands in a tty instead of relying on the kde partition manager if kwin is unstable.
I got it it was very silly
thought I made a drive btrfs but I forgot and actually made it ext4
If you really need your data PhotoRec might be the only way
It's pretty good at reading absolutely obliterated filesystems
I was able to recover all the data with testdisk yesterday but thank you!
smu1zel received a thank you cookie!
[SOLVED] Shrank a partition overnight and woke up to an error effecting the whole hard drive.
marking this as solved
Yeah photorec is a sister product of that