1 (edited by Tsupa 2017-11-19 14:40:11)

Topic: [SOLVED] gparted failed during NTFS partition resize

have a USB drive attached to my ubuntu laptop. I removed a couple of unused partitions (sdb1 and sdb2) and submitted the changes. Then I resized sdb3 (NTFS) to use the whole disk. Gparted told me that it will take about six hours.

After 30min I got an error:

Libparted Error
Input/output error during read on /dev/sdb"

And the syslog says:

Nov  4 16:04:41 Thinkpad kernel: [ 3662.996100] usb 2-2: reset high-speed USB device number 2 using ehci-pci
Nov  4 16:04:46 Thinkpad kernel: [ 3668.108090] usb 2-2: device descriptor read/64, error -110
Nov  4 16:05:01 Thinkpad kernel: [ 3683.324138] usb 2-2: device descriptor read/64, error -110
Nov  4 16:05:01 Thinkpad kernel: [ 3683.540073] usb 2-2: reset high-speed USB device number 2 using ehci-pci
Nov  4 16:05:07 Thinkpad kernel: [ 3688.652088] usb 2-2: device descriptor read/64, error -110
Nov  4 16:05:22 Thinkpad kernel: [ 3703.868123] usb 2-2: device descriptor read/64, error -110
Nov  4 16:05:22 Thinkpad kernel: [ 3704.084075] usb 2-2: reset high-speed USB device number 2 using ehci-pci
Nov  4 16:05:31 Thinkpad com.canonical.indicator.application[1980]: (process:2377): indicator-application-service-WARNING **: Application already exists, re-requesting properties.
Nov  4 16:05:32 Thinkpad kernel: [ 3714.492144] usb 2-2: device not accepting address 2, error -110
Nov  4 16:05:33 Thinkpad kernel: [ 3714.604102] usb 2-2: reset high-speed USB device number 2 using ehci-pci
Nov  4 16:05:43 Thinkpad kernel: [ 3725.012083] usb 2-2: device not accepting address 2, error -110
Nov  4 16:05:43 Thinkpad kernel: [ 3725.012199] usb 2-2: USB disconnect, device number 2
Nov  4 16:05:43 Thinkpad kernel: [ 3725.016397] sd 5:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
Nov  4 16:05:43 Thinkpad kernel: [ 3725.016404] sd 5:0:0:0: [sdb] tag#0 CDB: Write(10) 2a 00 02 38 3d b0 00 00 f0 00
Nov  4 16:05:43 Thinkpad kernel: [ 3725.016408] blk_update_request: I/O error, dev sdb, sector 37240240
Nov  4 16:05:43 Thinkpad kernel: [ 3725.016413] Buffer I/O error on dev sdb, logical block 37240240, lost async page write
Nov  4 16:05:43 Thinkpad kernel: [ 3725.016417] Buffer I/O error on dev sdb, logical block 37240241, lost async page write
Nov  4 16:05:43 Thinkpad kernel: [ 3725.016419] Buffer I/O error on dev sdb, logical block 37240242, lost async page write
Nov  4 16:05:43 Thinkpad kernel: [ 3725.016421] Buffer I/O error on dev sdb, logical block 37240243, lost async page write
Nov  4 16:05:43 Thinkpad kernel: [ 3725.016423] Buffer I/O error on dev sdb, logical block 37240244, lost async page write
Nov  4 16:05:43 Thinkpad kernel: [ 3725.016425] Buffer I/O error on dev sdb, logical block 37240245, lost async page write
Nov  4 16:05:43 Thinkpad kernel: [ 3725.016427] Buffer I/O error on dev sdb, logical block 37240246, lost async page write
Nov  4 16:05:43 Thinkpad kernel: [ 3725.016430] Buffer I/O error on dev sdb, logical block 37240247, lost async page write
Nov  4 16:05:43 Thinkpad kernel: [ 3725.016435] Buffer I/O error on dev sdb, logical block 37240248, lost async page write
Nov  4 16:05:43 Thinkpad kernel: [ 3725.016437] Buffer I/O error on dev sdb, logical block 37240249, lost async page write
Nov  4 16:05:43 Thinkpad kernel: [ 3725.033717] sd 5:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
Nov  4 16:05:43 Thinkpad kernel: [ 3725.033723] sd 5:0:0:0: [sdb] tag#0 CDB: Write(10) 2a 00 02 38 3e a0 00 00 f0 00
Nov  4 16:05:43 Thinkpad kernel: [ 3725.033727] blk_update_request: I/O error, dev sdb, sector 37240480

So for some reason it lost contact with the disk. I have tried to click on retry and cancel, but it keeps asking no matter how many times I press them. Then I checked with fdisk that sdb has indeed disappeared. I unplugged the disk and plugged it in again (to same USB port), but now it appears as sdc. Gparted refuses to continue as sdb is still missing.

Any ideas how to continue? Kill gparted process? Reboot the laptop? Can I somehow rename sdc to be sdb? I tried to use symlink (ln -s sdc sdb in /dev) but it doesn't help.

If I unplug it again, can i somehow remove the reference of sdb from OS so that the disk would appear as sdb when plugged in again? Then I could click retry in gparted.

The goal is not to loose the data on the sdb3 partition.

I posted this also to unix.stackexchange.com, hope you don't mind.

2

Re: [SOLVED] gparted failed during NTFS partition resize

Input/Output errors indicate a hardware failure.  It could be as simple as a loose cable, or as serious as a failing hard drive.

To recover your data you might investigate testdisk and photorec.

3

Re: [SOLVED] gparted failed during NTFS partition resize

In this case it was a broken USB 3.0 HDD enclosure. I switched the disk to another enclosure and attached it again, but Linux was unable to play with it. Then I attached it to a windows 7 laptop. chkdsk spent hours on fixing the filesystem. For a short while I thought it succeeded as it displayed all of the files, but unfortunately 9/10 of them were corrupted.

After reformatting I checked the disk again with chkdsk and the disk itself seems to be fine.

The data was lost but luckily i had working backups. You should always doublecheck your backups before modifying partitions...

4

Re: [SOLVED] gparted failed during NTFS partition resize

Thanks for reporting back with the cause of the issue (broken USB 3.0 HDD enclosure) and editing the initial post title to SOLVED.