1 (edited by zebra11 2010-10-12 22:35:01)

Topic: SOLVED ERROR: Current NTFS volume size is bigger than the device size!

Hello,

Was trying the shrink my sda5 data partition when this occurred.

GParted 0.6.2

Libparted 2.3
Check and repair file system (ntfs) on /dev/sda5  00:00:00    ( ERROR )
        
calibrate /dev/sda5  00:00:00    ( SUCCESS )
        
path: /dev/sda5
start: 152135613
end: 236695551
size: 84559939 (40.32 GiB)
check file system on /dev/sda5 for errors and (if possible) fix them  00:00:00    ( ERROR )
        
ntfsresize -P -i -f -v /dev/sda5
        
ntfsresize v2.0.0 (libntfs 10:0:0)
Device name : /dev/sda5
NTFS volume version: 3.1
Cluster size : 4096 bytes
Current volume size: 44358902272 bytes (44359 MB)
Current device size: 43294688768 bytes (43295 MB)
ERROR: Current NTFS volume size is bigger than the device size!
Corrupt partition table or incorrect device partitioning?

========================================
fdisk -l -u

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 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: 0x8317c4d7

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63   152123390    76061664    7  HPFS/NTFS
/dev/sda3       152135611   312580095    80222242+   f  W95 Ext'd (LBA)
/dev/sda5       152135613   236695551    42279969+   7  HPFS/NTFS
/dev/sda6       242388783   304429055    31020136+   7  HPFS/NTFS
/dev/sda7       236697600   242384895     2843648   83  Linux
/dev/sda8       306466816   312580095     3056640   83  Linux
/dev/sda9       304449536   306446335      998400   82  Linux swap / Solaris

Partition table entries are not in disk order



parted /dev/sda unit s print

Model: ATA ST9160827AS (scsi)
Disk /dev/sda: 312581808s
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start       End         Size        Type      File system     Flags
1      63s         152123390s  152123328s  primary   ntfs            boot
3      152135611s  312580095s  160444485s  extended                  lba
5      152135613s  236695551s  84559939s   logical   ntfs
7      236697600s  242384895s  5687296s    logical   ext4
6      242388783s  304429055s  62040273s   logical   ntfs
9      304449536s  306446335s  1996800s    logical   linux-swap(v1)
8      306466816s  312580095s  6113280s    logical   ext4

dd if=/dev/sda of=zebra11.MBR bs=512 count=1
dd if=/dev/sda of=zebra11.PBR bs=512 count=1 skip=152135613

    *   zebra11.MBR
      http://www.filefactory.com/file/b3ea82c/n/zebra11.MBR
    * zebra11.PBR
      http://www.filefactory.com/file/b3ea82d/n/zebra11.PBR

Kindly help.

2

Re: SOLVED ERROR: Current NTFS volume size is bigger than the device size!

Prior to using GParted 0.6.2 to generate the gparted_details.htm log file, did you try to resize your /dev/sda5 partition with any other software, Live CD's, or GParted versions?

If so, which software, Live CD, or version(s) did you first try?


Now on to resolving the size issue for /dev/sda5....

Since you were trying to shrink the partition, we will decrease the NTFS volume size to fit within the partition.

The change I have made to the file is from a length of 86,638,481 sectors:
00000020   00 00 00 00  80 00 80 00  91 FF 29 05  00 00 00 00
To a new length of 84,559,938 sectors:
00000020   00 00 00 00  80 00 80 00  42 48 0A 05  00 00 00 00

Note:  The NTFS volume size is always 1 sector less than the total number of sectors in the partition table entry because the NTFS backup sector is not considered part of the NTFS volume.

To apply this change:

1) Download the new NTFS PBR: sda5-zebra11-new.pbr

2) Load the new NTFS PBR on your hard disk.
NOTE:  Be extra careful when entering the commands.  Data loss could result otherwise.

dd if=sda5-zebra1_new.pbr of=/dev/sda bs=512 count=1 seek=152135613

3) Reboot the computer

4) Check that the file system is recognized in GParted

5) If all seems fine then I would advise booting into Windows and running "chkdsk /f /r" multiple times, until there are no more faults.

3

Re: SOLVED ERROR: Current NTFS volume size is bigger than the device size!

I tried to resize with Ubuntu 10.10 (from Ubuntu 10.10 USB install from release version CD, not sure what version that is as ubuntu removes it after installing to disk so i had to download from repository)
Googled and found threads on the forum.
Then got the log files to post.

Followed your directions.
After I rebooted into Ubuntu, Gparted still showed errors but not the original one.
Booted into windows safe mode command prompt, ran chkdsk, amazingly it showed no errors. Ran it a couple more times, still no error.
Booted into Ubuntu and ran Gparted.. no errors.
Seems like windows 7 fixed the remaining errors automatically for me when i booted into safe mode.

Anyway, thanks a ton! that was my main data partition that i resized.. generally a no no for me yikes .. but wanted to try 10.10 with unity so far looks good.

4

Re: SOLVED ERROR: Current NTFS volume size is bigger than the device size!

ok I rebooted into the USB install and confirm version of GParted I used
GParted 0.6.2
Libparted 2.3

uname -r : 2.6.35-22-generic

5

Re: SOLVED ERROR: Current NTFS volume size is bigger than the device size!

Thanks zebra11 for the confirmation on the Live CD and versions that you used.

I am glad to hear that your data is accessible again.  smile

Thanks also for editing your initial post to prefix SOLVED in front of the title.

6

Re: SOLVED ERROR: Current NTFS volume size is bigger than the device size!

Had the same problem again on resize of ntfs drive.
This time I fixed it using the tutorial.
But I'm concerned that this is turning out to be a repeatable problem for me.
Is there a way for me to update to version 0.6.4? How do I do that, as the repository only shows 0.6.2 and download does not give me something with which I can install on ubuntu 10.10 instead it either the source code or live cd. I was unable to compile the source code successfully.

7

Re: SOLVED ERROR: Current NTFS volume size is bigger than the device size!

The easiest solution might be to use the GParted Live CD.  It has all the necessary packages included.

The problem you experienced can randomly occur when using GParted with newer GNU/Linux kernels (2.6.31+), udev (138+), and parted (1.8.8.+ up to 2.2 inclusive).  Upgrading both Parted (to v2.3) and GParted (to v0.6.4) should fix the problem.

If the problem still recurs, then please let us know so that we can investigate further.