1 (edited by kuba144 2011-04-10 15:16:06)

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

Hi, i was changing my NTFS partition size and i've got this error:
i found this topic: http://gparted-forum.surf4.info/viewtopic.php?id=13777

1) I have problem with my ntfs partition sda5
2) I use GParted 0.6.2
3) My fdisk -l -u looks like that:

Dysk /dev/sda: 500.1 GB, bajtów: 500107862016
głowic: 255, sektorów/ścieżkę: 63, cylindrów: 60801, w sumie sektorów: 976773168
Jednostka = sektorów, czyli 1 * 512 = 512 bajtów
Rozmiar sektora (logiczny/fizyczny) w bajtach: 512 / 512
Rozmiar we/wy (minimalny/optymalny) w bajtach: 512 / 512
Identyfikator dysku: 0x000bdcd7

Urządzenie Rozruch   Początek      Koniec   Bloków   ID  System
/dev/sda1   *          63   104856254    52428096    7  HPFS/NTFS
/dev/sda2       104858269   910770175   402955953+   5  Rozszerzona
/dev/sda3       910770176   915232767     2231296   82  Linux swap / Solaris
/dev/sda4       915232768   976771071    30769152   83  Linux
/dev/sda5       104858271   910768798   402955264    7  HPFS/NTFS
kuba@kuba-desktop:~$ sudo parted /dev/sda5 unit s print

gives me

Błąd: /dev/sda5: nierozpoznana etykieta dysku   

that means:

Error: /dev/sda5: unrecognized disk label

and error from gparted:

GParted 0.6.2

Biblioteka libparted 2.3
Sprawdzanie i naprawianie systemu plików (ntfs) na /dev/sda5  00:00:02    ( BŁĄD )
         
kalibracja /dev/sda5  00:00:00    ( UDANE )
         
ścieżka: /dev/sda5
początek: 104858271
koniec: 910768798
rozmiar: 805910528 (384.29 GiB)
sprawdzanie błędów systemu plików na /dev/sda5 i naprawianie w miarę możliwości  00:00:02    ( BŁĄD )
         
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: 413887279616 bytes (413888 MB)
Current device size: 412626190336 bytes (412627 MB)
ERROR: Current NTFS volume size is bigger than the device size!
Corrupt partition table or incorrect device partitioning?

========================================

please help me, i really don't know what i supouse to do

thanks

and sorry for my english, as you can see i'm from poland smile

edit: ok, now i messed up. I found magic solve by using testdisk. I did what i read and now Gparted dosen't see my partitions at all. I think i damaged partition table, look at my fdisk now please:

Dysk /dev/sda: 500.1 GB, bajtów: 500107862016
głowic: 255, sektorów/ścieżkę: 63, cylindrów: 60801
Jednostka = cylindrów, czyli 16065 * 512 = 8225280 bajtów
Rozmiar sektora (logiczny/fizyczny) w bajtach: 512 / 512
Rozmiar we/wy (minimalny/optymalny) w bajtach: 512 / 512
Identyfikator dysku: 0x000bdcd7

Urządzenie Rozruch   Początek      Koniec   Bloków   ID  System
/dev/sda1   *           1        6527    52428096    7  HPFS/NTFS
/dev/sda2            6528       56847   404186796+   7  HPFS/NTFS
/dev/sda3           56847       56971     1000440   82  Linux swap / Solaris
/dev/sda4           56971       60802    30775689    f  W95 Rozsz. (LBA)
/dev/sda5           56971       60802    30769152   83  Linux

is there any way to fix it?

2

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

Would you be able to provide the output from the following two commands?

fdisk -l -u

where one of the options is a lower case "L" and not the number one.

parted /path-to-your-device unit s print

where /path-to-your-device is something like /dev/sda.

Also if I am to help you please do not make any further partition changes while we work to resolve the problem.

3 (edited by kuba144 2011-04-10 18:16:56)

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

This is fdisk -l -u:

Dysk /dev/sda: 500.1 GB, bajtów: 500107862016
głowic: 255, sektorów/ścieżkę: 63, cylindrów: 60801, w sumie sektorów: 976773168
Jednostka = sektorów, czyli 1 * 512 = 512 bajtów
Rozmiar sektora (logiczny/fizyczny) w bajtach: 512 / 512
Rozmiar we/wy (minimalny/optymalny) w bajtach: 512 / 512
Identyfikator dysku: 0x000bdcd7

Urządzenie Rozruch   Początek      Koniec   Bloków   ID  System
/dev/sda1   *          63   104856254    52428096    7  HPFS/NTFS
/dev/sda2       104858271   913231863   404186796+   7  HPFS/NTFS
/dev/sda3       913231872   915232751     1000440   82  Linux swap / Solaris
/dev/sda4       915232752   976784129    30775689    f  W95 Rozsz. (LBA)
/dev/sda5       915232768   976771071    30769152   83  Linux

sudo parted /dev/sda unit s print gives me:

Błąd: Nie można mieć partycji poza dyskiem!   

that means like:
Error: You can't have partition outside the disk

Thanks for help smile

4

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

The problem appears to be that the extended partition sda4 is larger than the whole disk device.
976,773,168 total sectors on disk
976,784,129 end sector of sda4

To fix this problem we will need a copy of the Master Boot Record.

You can capture the Master Boot Record in a file with the following command:

NOTE:  Be extra careful to type this command in properly, otherwise loss of data could result.

dd if=/dev/sda of=sda-kuba144.mbr bs=512 count=1

where sda-kuba144.mbr is the name of the file that will need to be uploaded.

Then upload this files to a media sharing site, such as mediafire or filefactory, and post the link to this file in this forum post.

5

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

Here you go!

http://www.filesonic.com/file/579102014/sda-kuba144.mbr

6

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

To fix this problem we will reduce the size of the extended partition sda4 to fit within the physical size of the disk drive.

The change I have made to the file is from a length of 61,551,378 sectors:
000001F0   FF FF 0F FE  FF FF F0 57  8D 36 12 33  AB 03 55 AA
To a new length of 61,540,416 sectors:
000001F0   FF FF 0F FE  FF FF F0 57  8D 36 40 08  AB 03 55 AA

NOTE:  I chose to use a value one sector less than the total number of sectors on the disk just to be on the safe side.

To apply this change:

1) Download the new MBR: sda-kuba144_new.mbr

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

dd if=sda-kuba144_new.pbr of=/dev/sda bs=512 count=1

3) Reboot the computer

4) Check that the file system is recognized in GParted

When the partition table is recognized by GParted, then we can move onto the next step of the problem with the NTFS file system being too large.

7

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

Yay! I can see my partition in Gparted now, but there is a ext4 partition in extended space. Before this problem only big ntfs partition was in extended space.

Ok, what i suposue to do now?

8 (edited by gedakc 2011-04-12 01:28:06)

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

Okay now that one problem is solved, let's see what we have now.

From a quick look at the before partition table, and the partition table after using testdisk, it would appear that testdisk re-ordered your partitions to be in disk order.  That is likely why the linux partition is now inside the extended partition.  If your partitions are mounted by label or by UUID, then likely no problem will be caused by this change.

Would you be able to provide the output from the following two commands?

fdisk -l -u

where one of the options is a lower case "L" and not the number one.

parted /path-to-your-device unit s print

where /path-to-your-device is something like /dev/sda.

It might be useful to run a "Partition --> Check" on each of the file systems to see if any further problems remain.

9 (edited by kuba144 2011-04-13 00:09:21)

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

fdisk -l -u:

Dysk /dev/sda: 500.1 GB, bajtów: 500107862016
głowic: 255, sektorów/ścieżkę: 63, cylindrów: 60801, w sumie sektorów: 976773168
Jednostka = sektorów, czyli 1 * 512 = 512 bajtów
Rozmiar sektora (logiczny/fizyczny) w bajtach: 512 / 512
Rozmiar we/wy (minimalny/optymalny) w bajtach: 512 / 512
Identyfikator dysku: 0x000bdcd7

Urządzenie Rozruch   Początek      Koniec   Bloków   ID  System
/dev/sda1   *          63   104856254    52428096    7  HPFS/NTFS
/dev/sda2       104858271   913231863   404186796+   7  HPFS/NTFS
/dev/sda3       913231872   915232751     1000440   82  Linux swap / Solaris
/dev/sda4       915232752   976773167    30770208    f  W95 Rozsz. (LBA)
/dev/sda5       915232768   976771071    30769152   83  Linux

and

kuba@kuba-desktop:~$ sudo parted /dev/sda unit s print
Model: ATA SAMSUNG HD502HJ (scsi)
Dysk /dev/sda: 976773168s
Rozmiar sektora (logiczny/fizyczny): 512B/512B
Tablica partycji: msdos

Numer  Początek    Koniec      Rozmiar     Typ       System plików   Flaga
 1     63s                104856254s  104856192s  primary   ntfs            ładowalna
 2     104858271s  913231863s  808373593s  primary   ntfs
 3     913231872s  915232751s  2000880s    primary   linux-swap(v1)
 4     915232752s  976773167s  61540416s   extended                  lba
 5     915232768s  976771071s  61538304s   logical   ext4

Hm, i checked everything by clicking Partition -> Check and everything looks alright but when i want to trun the swap on i get that:

swapon: /dev/sda3: found swap signature: version 1, page-size 4, same byte order
swapon: /dev/sda3: pagesize=4096, swapsize=1024458752, devsize=1024450560
swapon: /dev/sda3: last_page 0x3d100000 is larger than actual size of swapspace

The cause of all this problems was that i wanted to resize my swap from 1GB to 2GB, maybe becouse that it dosen't work
swapon: /dev/sda3: swapon failed: Zły argument
means that swapon: /dev/sda3: swapon failed: Bad Argument

10

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

One option to address the problem with swap is to reformat the swap partition (sda3).  This will apply a new UUID to the swap partition so you will need to edit /etc/fstab as root to place the new UUID in the entry where swap is mounted/enabled.

11

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

Ok, now it works.

Can I safetly resize my partitions now? smile

12

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

You should be able to safely resize your partitions.  Be sure to use the latest GParted Live (currently version 0.8.0-5).

13

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

Ok.

Thank you so much, you were really helpfull smile