1 (edited by cross731_1 2011-09-20 18:59:49)

Topic: [SOLVED] Failed to expand NTFS partition using GParted 0.5.2

Hello,

I'm seeking the forum's help. I attempted to expand my partition to fill the entire drive, but it wasn't able to complete. I used GParted 0.5.2 with the following Saved Details:

GParted 0.5.2

Libparted 2.2

Move /dev/sdc1 to the left and grow it from 899.51 GiB to 931.51 GiB  03:46:39    ( ERROR )
       
calibrate /dev/sdc1  00:00:01    ( SUCCESS )
       
path: /dev/sdc1
start: 67110912
end: 1953519615
size: 1886408704 (899.51 GiB)
calculate new size and position of /dev/sdc1  00:00:00    ( SUCCESS )
       
requested start: 0
requested end: 1953520064
requested size: 1953520065 (931.51 GiB)
new start: 63
new end: 1953520064
new size: 1953520002 (931.51 GiB)
check file system on /dev/sdc1 for errors and (if possible) fix them  00:00:04    ( SUCCESS )
       
ntfsresize -P -i -f -v /dev/sdc1
       
ntfsresize v2.0.0 (libntfs 10:0:0)
Device name : /dev/sdc1
NTFS volume version: 3.1
Cluster size : 4096 bytes
Current volume size: 965841252864 bytes (965842 MB)
Current device size: 965841256448 bytes (965842 MB)
Checking for bad sectors ...
Checking filesystem consistency ...
Accounting clusters ...
Space in use : 872789 MB (90.4%)
Collecting resizing constraints ...
Estimating smallest shrunken size supported ...
File feature Last used at By inode
$MFT : 276587 MB 0
Multi-Record : 965842 MB 133469
$MFTMirr : 1 MB 1
Sparse : 861843 MB 292
Ordinary : 957191 MB 191154
You might resize at 872788164608 bytes or 872789 MB (freeing 93053 MB).
Please make a test run using both the -n and -s options before real resizing!
move partition to the left  00:00:00    ( SUCCESS )
       
old start: 67110912
old end: 1953519615
old size: 1886408704 (899.51 GiB)
new start: 63
new end: 1886408766
new size: 1886408704 (899.51 GiB)
move file system to the left    ( EXECUTING )
       
perform read-only test  02:56:30    ( SUCCESS )
       
using internal algorithm
read 1886408704 sectors
finding optimal blocksize
       
read 65536 sectors using a blocksize of 128 sectors  00:00:00    ( SUCCESS )
       
65536 of 65536 read
0.32 seconds
read 65536 sectors using a blocksize of 256 sectors  00:00:01    ( SUCCESS )
       
65536 of 65536 read
0.285 seconds
read 65536 sectors using a blocksize of 512 sectors  00:00:00    ( SUCCESS )
       
65536 of 65536 read
0.301 seconds
read 65536 sectors using a blocksize of 1024 sectors  00:00:00    ( SUCCESS )
       
65536 of 65536 read
0.31 seconds
read 65536 sectors using a blocksize of 2048 sectors  00:00:00    ( SUCCESS )
       
65536 of 65536 read
0.308 seconds
read 65536 sectors using a blocksize of 4096 sectors  00:00:01    ( SUCCESS )
       
65536 of 65536 read
0.309 seconds
read 65536 sectors using a blocksize of 8192 sectors  00:00:00    ( SUCCESS )
       
65536 of 65536 read
0.302 seconds
read 65536 sectors using a blocksize of 16384 sectors  00:00:00    ( SUCCESS )
       
65536 of 65536 read
0.301 seconds
read 65536 sectors using a blocksize of 32768 sectors  00:00:01    ( SUCCESS )
       
65536 of 65536 read
0.301 seconds
read 65536 sectors using a blocksize of 65536 sectors  00:00:00    ( SUCCESS )
       
65536 of 65536 read
0.319 seconds
optimal blocksize is 256 sectors (128.00 KiB)
read 1885753344 sectors using a blocksize of 256 sectors  02:56:27    ( SUCCESS )
       
1885753344 of 1885753344 read
1886408704 sectors read
perform real move  00:50:04    ( ERROR )
       
using internal algorithm
copy 1886408704 sectors
finding optimal blocksize
       
copy 65536 sectors using a blocksize of 64 sectors  00:00:04    ( SUCCESS )
       
65536 of 65536 copied
4.258 seconds
copy 65536 sectors using a blocksize of 128 sectors  00:00:05    ( SUCCESS )
       
65536 of 65536 copied
4.426 seconds
copy 65536 sectors using a blocksize of 256 sectors  00:00:03    ( SUCCESS )
       
65536 of 65536 copied
3.012 seconds
copy 65536 sectors using a blocksize of 512 sectors  00:00:03    ( SUCCESS )
       
65536 of 65536 copied
2.97 seconds
copy 65536 sectors using a blocksize of 1024 sectors  00:00:02    ( SUCCESS )
       
65536 of 65536 copied
1.921 seconds
copy 65536 sectors using a blocksize of 2048 sectors  00:00:02    ( SUCCESS )
       
65536 of 65536 copied
2.567 seconds
copy 65536 sectors using a blocksize of 4096 sectors  00:00:01    ( SUCCESS )
       
65536 of 65536 copied
1.022 seconds
copy 65536 sectors using a blocksize of 8192 sectors  00:47:42    ( SUCCESS )
       
65536 of 65536 copied
2861.4 seconds
copy 65536 sectors using a blocksize of 16384 sectors  00:02:02    ( ERROR )
       
0 of 65536 copied
Error while reading block at sector 67635200
122.239 seconds
524288 sectors copied
roll back last transaction  00:00:00    ( ERROR )
       
using internal algorithm
copy 524288 sectors
finding optimal blocksize
       
copy 65536 sectors using a blocksize of 64 sectors  00:00:00    ( ERROR )
       
0 of 65536 copied
Error while reading block at sector 524287
0.001 seconds
0 sectors copied
check file system on /dev/sdc1 for errors and (if possible) fix them  00:00:00    ( ERROR )
       
ntfsresize -P -i -f -v /dev/sdc1
       
ntfsresize v2.0.0 (libntfs 10:0:0)
Error reading bootsector: Input/output error.
Failed to startup volume: Input/output error.
ERROR(5): Opening '/dev/sdc1' as NTFS failed: Input/output error
NTFS is inconsistent. Run chkdsk /f on Windows then reboot it TWICE!
The usage of the /f parameter is very IMPORTANT! No modification was
and will be made to NTFS by this software until it gets repaired.
rollback last change to the partition table  00:00:00    ( ERROR )
       
move partition to the right  00:00:00    ( ERROR )
       
old start: 63
old end: 1886408766
old size: 1886408704 (899.51 GiB)
libparted messages    ( INFO )
       
Input/output error during read on /dev/sdc
Error fsyncing/closing /dev/sdc: Input/output error
Input/output error during read on /dev/sdc
/dev/sdc: unrecognised disk label
========================================

The output of command

fdisk -l -u

Disk /dev/sda: 60.0 GB, 60022480896 bytes
255 heads, 63 sectors/track, 7297 cylinders, total 117231408 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xed76f4ea

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048   117227519    58612736    7  HPFS/NTFS

Disk /dev/sdb: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x7ca2f4d4

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *          63    92213099    46106518+   7  HPFS/NTFS
/dev/sdb2        92213100  1043614529   475700715    7  HPFS/NTFS
/dev/sdb3      1043614530  1465144064   210764767+   7  HPFS/NTFS

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x15017ae3

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *          63  1886416559   943208248+   7  HPFS/NTFS

Disk /dev/sdd: 60.0 GB, 60022480896 bytes
255 heads, 63 sectors/track, 7297 cylinders, total 117231408 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x9c675949

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1   *        2048   117210239    58604096    7  HPFS/NTFS

Disk /dev/sde: 2056 MB, 2056257536 bytes
5 heads, 4 sectors/track, 200806 cylinders, total 4016128 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1   *        1456     4016127     2007336    b  W95 FAT32

And the output of command

parted /dev/sdc1 unit s print

Model: Unknown (unknown)
Disk /dev/sdc1: 1886416497s
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number  Start  End          Size         File system  Flags
1      0s     1886416496s  1886416497s  ntfs

I'm going to clone the disk before proceeding to prevent further damage. I realize that I should have done this before resizing (lesson learned).

I hope this can be solved. What are your thoughts? Thanks for your time.

2

Re: [SOLVED] Failed to expand NTFS partition using GParted 0.5.2

First, thanks for saving and posting the gparted details log file.  This file makes it much easier to diagnose problems.   smile

As to what the problem is, the following line contains the key:

Error while reading block at sector 67635200

Basically it appears that a bad sector was encountered while trying to copy the partition.  This can occur due to a loose connection to the hard drive, or else a hard drive that his beginning to fail.

Also, GParted 0.5.2 is fairly old and many bugs have been fixed since this version.  I would advise using the latest version for any future partition editing operations.

The end result is that only a portion of the partition was moved to the left (the portion up to sector 67635200), and that the remainder of the partition was left in it's original location.

To try to fix the problem you would need to copy that front portion of the partition back to it's original location, being careful not to loose any sectors in the process.  Basically this means that you would need to copy the missing front partition starting at it's tail and finishing up with it's head.  Hopefully that makes sense.

3

Re: [SOLVED] Failed to expand NTFS partition using GParted 0.5.2

Thanks gedakc. If I understand correctly, I need to copy sectors 0 - 67635200 to 67110912 - 134,346,112. Am I correct? Can I do this with GParted or would you recommend another program? The partition table in the drive is a mess. I initially tried to expand the partition to occupy the first 32GB.

4

Re: [SOLVED] Failed to expand NTFS partition using GParted 0.5.2

Since the first sectors on the drive contain the partition table, you would need to copy from sector 63 through 67635199 to the partition starting at 67110912.

Sector 63 is arrived at from the following portion of the log file:

requested start: 0
requested end: 1953520064
requested size: 1953520065 (931.51 GiB)
new start: 63
new end: 1953520064
new size: 1953520002 (931.51 GiB)

You can confirm if sector 63 holds the header for the NTFS partition table by looking for "NTFS" in the following hexdump (note 63 * 512 = 32256):

hexdump -C -v -s 32256 -n 512 /dev/sdc

You will also need to ensure that the partition table is adjusted to the correct boundaries too.  The GParted program will not help with these tasks.  Command line tools such as "dd" and "fdisk" will permit you to perform these duties.

Best wishes to you on this endeavour.

Of course if you have a backup, then restoring from backup would be your easiest option.

5

Re: [SOLVED] Failed to expand NTFS partition using GParted 0.5.2

Thanks to your help I was able to recover my hard drive. I appreciate your support. I would like to give back to the community by posting my solution, but I am unsure whether or not considering it may not relate to the title of the post and the solution does not involve GParted and I don't want to break the rules. Please advise.

6

Re: [SOLVED] Failed to expand NTFS partition using GParted 0.5.2

We would appreciate if you do post a solution, or tutorial on how to fix this type of problem.   smile

If the solution is specific to your problem only, then do feel free to post the solution in this thread.

If you have a tutorial, or would simply like to have the solution posted in a separate post, then feel free to create a new post in either the GParted, Live Media, or Documentation forums.  You can always add a link from this post to the solution post for others reading this thread.

I look forward to reading your solution.