1 (edited by amiga 2010-10-23 12:37:42)

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

Hi everyone,

I was trying to Shrink /dev/sda5 and /dev/sda6  from 48.83 GiB to 48.64 GiB when the problem occurred.

GParted 0.5.1

Libparted 1.9.0

fdisk -l -u

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x6edabba9

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63    81931499    40965718+   7  HPFS/NTFS
/dev/sda2        81931500   286728119   102398310    f  W95 Ext'd (LBA)
/dev/sda3       286728120   287137719      204800   83  Linux
/dev/sda4       287137720   488392064   100627172+  8e  Linux LVM
/dev/sda5        81931563   183928184    50998311    7  HPFS/NTFS
/dev/sda6       184329873   286326494    50998311    7  HPFS/NTFS

Disk /dev/dm-0: 98.8 GB, 98813607936 bytes
255 heads, 63 sectors/track, 12013 cylinders, total 192995328 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x00000000

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 4227 MB, 4227858432 bytes
255 heads, 63 sectors/track, 514 cylinders, total 8257536 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x00000000

Disk /dev/dm-1 doesn't contain a valid partition table
parted /dev/sda unit s print
Model: ATA ST9250320AS (scsi)
Disk /dev/sda: 488397168s
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start       End         Size        Type      File system  Flags
 1      63s         81931499s   81931437s   primary   ntfs         boot
 2      81931500s   286728119s  204796620s  extended               lba
 5      81931563s   183928184s  101996622s  logical   ntfs
 6      184329873s  286326494s  101996622s  logical   ntfs
 3      286728120s  287137719s  409600s     primary   ext4
 4      287137720s  488392064s  201254345s  primary                lvm
dd if=/dev/sda of=amiga.mbr bs=512 count=1
dd if=/dev/sda of=amiga_sda5.pbr bs=512 count=1 skip=81931563
dd if=/dev/sda of=amiga_sda6.pbr bs=512 count=1 skip=184329873

files:

http://www.filefactory.com/file/b3f60hd/n/amiga_sda5.pbr
http://www.filefactory.com/file/b3f6112/n/amiga_sda6.pbr
http://www.filefactory.com/file/b3f60ga/n/amiga.mbr

btw: Is the mbr file useful? It seems that modifing pbr file is enough.

2

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

Are both partitions /dev/sda5 and /dev/sda6 experiencing the problem, or just one?

If so which one displays the "ERROR: Current NTFS volume size is bigger than the device size!" message?

3

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

gedakc wrote:

Are both partitions /dev/sda5 and /dev/sda6 experiencing the problem, or just one?

If so which one displays the "ERROR: Current NTFS volume size is bigger than the device size!" message?

Both partitions have problems.
I wanted to resize two partitions at first, but after first error occurred, I tried to resize another one. So two partition have problems.
Can you help me?
Thank you.

4

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

amiga wrote:

btw: Is the mbr file useful? It seems that modifing pbr file is enough.

It is often useful to look at the MBR not only to confirm partition values, but sometimes the MBR can be modified to increase the partition size to encompass the existing file system.


Now on to the problem at hand....  :-)

From looking at the NTFS PBR files for the two partitions, the problems are as follows:

/dev/sda5
101,996,622 sectors in size based on partition table
102,398,232 sectors in size based on NTFS PBR (too large)

/dev/sda6
101,996,622s sectors in size based on partition table
102,398,232 sectors in size based on NTFS PBR (too large)


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


For /dev/sda5

The change I have made to the file is from a length of 102,398,232 sectors:
00000020   00 00 00 00  80 00 80 00  18 79 1A 06  00 00 00 00
To a new length of 101,966,621 sectors:
00000020   00 00 00 00  80 00 80 00  4D 58 14 06  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: amiga_sda5_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=amiga_sda5_new.pbr of=/dev/sda bs=512 count=1 seek=81931563

For /dev/sda6

The change I have made to the file is from a length of 102,398,232 sectors:
00000020   00 00 00 00  80 00 80 00  18 79 1A 06  00 00 00 00
To a new length of 101,996,621 sectors:
00000020   00 00 00 00  80 00 80 00  4D 58 14 06  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:

3) Download the new NTFS PBR: amiga_sda6_new.pbr

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

dd if=amiga_sda6_new.pbr of=/dev/sda bs=512 count=1 seek=184329873

Now to complete the steps:

5) Reboot the computer

6) Check that the file system is recognized in GParted

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

5

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

After write pbr files to pbr, I can mount and access sda5 and sda6. But gparted-0.5.1 gave me informations as below:
http://lh4.ggpht.com/_LAO__aNTVhY/TMBJLFUbpPI/AAAAAAAAABI/y0xjjMKDw04/s640/sda5.png
and
http://lh6.ggpht.com/_LAO__aNTVhY/TMBKbv3f9yI/AAAAAAAAABY/Kc0QiYhQa7k/s640/sda6.png

If I used gparted-live-0.6.4.-1, I got same messages.

What should I do now?

6

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

'Just the last step to do now.   Boot into Windows and run "chkdsk /f /r" multiple times on each drive, until there are no more faults.

7

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

gedakc, thank you!

8

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

'Glad to hear that your problem is now resolved.  smile

And thank you for editing the initial post to prefix the title with SOLVED.