I have a 500 GB hard drive that contained three partitions.
Primary partition:
- ~80 GB (ext4) (my system)
Extended partition:
- a swap partition of a few GB
- ~400 GB (ext4) (my data)
It was an old disk on which I no longer used the system, so I decided to delete the system partition and the swap partition and extend the data partition with GParted. (I'm running Debian 13)
Unfortunately, my PC froze after about 10 minutes (maybe 20 or 30) of the estimated 1 hour 40 minutes/1 hour 50 minutes... And now my partition is unusable. (Of course, I should have made a backup beforehand, but I didn't have a disk handy and I thought that enlarging the partition wouldn't be too much of a problem...)
I did a copy/clone of the affected disk to another old 2TB drive (which I got for this purpose) with ddrecue. (It's taking a long time.)
Code: Select all
sudo ddrescue -d -f /dev/sda /dev/sdc clone.log
GNU ddrescue 1.29
Press Ctrl-C to interrupt
ipos: 500106 MB, non-trimmed: 0 B, current rate: 24174 kB/s
opos: 500106 MB, non-scraped: 0 B, average rate: 26149 kB/s
non-tried: 0 B, bad-sector: 0 B, error rate: 0 B/s
rescued: 500106 MB, bad areas: 0, run time: 5h 18m 45s
pct rescued: 100.00%, read errors: 0, remaining time: n/a
time since last successful read: 0s
Copying non-tried blocks... Pass 1 (forwards)
Finished
So now I have :
Code: Select all
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 465,8G 0 disk => the disk with partition issue
├─sda2 8:2 0 1K 0 part
└─sda5 8:5 0 465,8G 0 part
sdb 8:16 0 465,8G 0 disk => my current system
├─sdb1 8:17 0 46,6G 0 part /
├─sdb2 8:18 0 1K 0 part
├─sdb5 8:21 0 12G 0 part [SWAP]
└─sdb6 8:22 0 407,2G 0 part /home
sdc 8:32 0 1,8T 0 disk => the clone of disk with issue
├─sdc2 8:34 0 1K 0 part
└─sdc5 8:37 0 465,8G 0 part
And if this is not possible maybe to get file from disk ?
(Initially I asked this question in french but maybe better to continue with english to reach more people)