Ext 4 file system trouble - gparted taking hours

Using TestDisk to repair the filesystem
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf
Locked
Message
Author
Voidnwarranties
Posts: 3
Joined: 25 Sep 2018, 02:45

Ext 4 file system trouble - gparted taking hours

#1 Post by Voidnwarranties »

So let me tell ya from the beginning

I had 2 450GB partitions on a 1 TB drive. I emptied out one of the partitions and then decided to delete the empty partition, extend the other partition using Gparted.

I didn't realize the laptop was not plugged in - I came back a while later and the laptop was off. Not sure where/when everything was at when it stopped.

Fired up the laptop and the single, larger partition shows up - but it won't mount. In gparted - I did a check partition and it cooks and cooks and doesn't seem to be doing anything.
The command Gparted is running is: e2fsck -f -y -v -C 0 '/dev/sdb2'

But after 6 minutes it just doesn't seem to be doing anything.

iostat results in this:
avg-cpu: %user %nice %system %iowait %steal %idle
10,73 0,06 1,44 1,06 0,00 86,72

Device tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sda 12,64 464,35 199,95 2563425 1103800
sdb 3,91 85,52 0,72 472113 3996

I don't know what this means - but it doesn't look like it is working very hard at all.

The info on the disk is somewhat important so I don't want to just reformat and start over.
I was reading about TestDisk but don't know exactly how to use it correctly given my situation.
Thanks in advance for your help!

Frank

User avatar
cgrenier
Site Admin
Posts: 5432
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France
Contact:

Re: Ext 4 file system trouble - gparted taking hours

#2 Post by cgrenier »

Run "dmesg", do you see error message (IO error / bad sectors / USB reset / ...) ?
If it's the case, there are bad sectors and you should clone the disk using ddrescue to a new empty disk as described in https://www.cgsecurity.org/testdisk.pdf

If there is no error, try TestDisk, Advanced, select the partition you want to recover files from, List.
If you are lucky, you will be able to copy your files.

Voidnwarranties
Posts: 3
Joined: 25 Sep 2018, 02:45

Re: Ext 4 file system trouble - gparted taking hours

#3 Post by Voidnwarranties »

Okay - I hate to ask - but I just want to be extra careful

This is the result of the Dmesg

[ 3714.528222] usb 2-1.2: new high-speed USB device number 3 using ehci-pci
[ 3714.638228] usb 2-1.2: New USB device found, idVendor=1376, idProduct=3070
[ 3714.638234] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 3714.638238] usb 2-1.2: Product: Hammer Morespace
[ 3714.638242] usb 2-1.2: Manufacturer:
[ 3714.638245] usb 2-1.2: SerialNumber: 5354463630354D483154484C
[ 3714.707997] usb-storage 2-1.2:1.0: USB Mass Storage device detected
[ 3714.708295] scsi host4: usb-storage 2-1.2:1.0
[ 3714.708402] usbcore: registered new interface driver usb-storage
[ 3714.713094] usbcore: registered new interface driver uas
[ 3715.741572] scsi 4:0:0:0: Direct-Access Hammer Morespace 1.03 PQ: 0 ANSI: 4
[ 3715.742315] sd 4:0:0:0: Attached scsi generic sg2 type 0
[ 3715.744548] sd 4:0:0:0: [sdb] 1953525168 512-byte logical blocks: (1.00 TB/932 GiB)
[ 3715.745777] sd 4:0:0:0: [sdb] Write Protect is off
[ 3715.745783] sd 4:0:0:0: [sdb] Mode Sense: 21 00 00 00
[ 3715.746925] sd 4:0:0:0: [sdb] No Caching mode page found
[ 3715.746936] sd 4:0:0:0: [sdb] Assuming drive cache: write through
[ 3715.773470] sdb: sdb1 sdb2 sdb3 sdb4
[ 3715.778049] sd 4:0:0:0: [sdb] Attached SCSI disk
[ 3726.105477] EXT4-fs (sdb2): mounted filesystem with ordered data mode. Opts: (null)


So I'd say there are no errors.

I presume when I run testdisk to restore the data - I will be asked where to put the data and it should be on another drive?

Sorry - just want to be extra careful.

Thanks so much!

User avatar
cgrenier
Site Admin
Posts: 5432
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France
Contact:

Re: Ext 4 file system trouble - gparted taking hours

#4 Post by cgrenier »

Yes, it's best if the destination is another disk, it must be at least another partition.

Voidnwarranties
Posts: 3
Joined: 25 Sep 2018, 02:45

Re: Ext 4 file system trouble - gparted taking hours

#5 Post by Voidnwarranties »

Thanks - that took a long time and I learned it is better to copy sections at a time.

One other note - I ran into (what looks like a common problem) that after copied the file is owned by ROOT so it can't be viewed or deleted by USER.

Google quickly led me to posts about changing ownership.
Quick answer - open the file location in terminal

sudo chown -R $USER: $HOME

And of course enter your root password.

It took a bit to run but it seemed to solve everything.
Thanks so much!
(keys to help others searching for similar answers: restored files won't play. X on files restored. can't open. don't have permission)

Locked