Topic: [SOLVED ]Logical Drive and Other Partition Error:
I have had to stop doing investigation myself on my corrupt /dev/sda5 partition due to time constraints. The /dev/sda1 partition has also has some flash warning 's in the logs you will se below.
This image shot is the entire drives partitions from GParted Version 0.5.1.
Furthermore, the properties of /dev/sda5 showing the ERROR s as well:
Here is the log in order of when they were created ( since I never changed them AFIAK, the modified metadata should show it's in chronological order.
Modified: Friday 29 Oct 2010 6:57:15 PM
Accessed Sat 30 Oct 2010 3:31:42 PM
GParted 0.5.1
Libparted 2.2
Move /dev/sda5 to the right and shrink it from 100.04 GiB to 97.23 GiB 00:00:08 ( ERROR )
calibrate /dev/sda5 00:00:00 ( SUCCESS )
path: /dev/sda5
start: 20971503
end: 230761439
size: 209789937 (100.04 GiB)
calculate new size and position of /dev/sda5 00:00:00 ( SUCCESS )
requested start: 26844678
requested end: 230757659
requested size: 203912982 (97.23 GiB)
new start: 26844615
new end: 230757659
new size: 203913045 (97.23 GiB)
check file system on /dev/sda5 for ]ERRORs and (if possible) fix them 00:00:02 ( SUCCESS )
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: 107412447744 bytes (107413 MB)
Current device size: 107412447744 bytes (107413 MB)
Checking for bad sectors ...
Checking filesystem consistency ...
Accounting clusters ...
Space in use : 1685 MB (1.6%)
Collecting resizing constraints ...
Estimating smallest shrunken size supported ...
File feature Last used at By inode
$MFT : 3236 MB 0
$MFTMirr : 53707 MB 1
Sparse : 1865 MB 3020
Ordinary : 53710 MB 10
You might resize at 3235221504 bytes or 3236 MB (freeing 104177 MB).
Please make a test run using both the -n and -s options before real resizing!
shrink file system 00:00:04 ( SUCCESS )
run simulation 00:00:03 ( SUCCESS )
ntfsresize -P --force /dev/sda5 -s 104403479039 --no-action
ntfsresize v2.0.0 (libntfs 10:0:0)
Device name : /dev/sda5
NTFS volume version: 3.1
Cluster size : 4096 bytes
Current volume size: 107412447744 bytes (107413 MB)
Current device size: 107412447744 bytes (107413 MB)
New volume size : 104403472896 bytes (104404 MB)
Checking filesystem consistency ...
Accounting clusters ...
Space in use : 1685 MB (1.6%)
Collecting resizing constraints ...
Needed relocations : 0 (0 MB)
Schedule chkdsk for NTFS consistency check at Windows boot time ...
Resetting $LogFile ... (this might take a while)
Updating $BadClust file ...
Updating $Bitmap file ...
Updating Boot record ...
The read-only test run ended successfully.
real resize 00:00:01 ( SUCCESS )
ntfsresize -P --force /dev/sda5 -s 104403479039
ntfsresize v2.0.0 (libntfs 10:0:0)
Device name : /dev/sda5
NTFS volume version: 3.1
Cluster size : 4096 bytes
Current volume size: 107412447744 bytes (107413 MB)
Current device size: 107412447744 bytes (107413 MB)
New volume size : 104403472896 bytes (104404 MB)
Checking filesystem consistency ...
Accounting clusters ...
Space in use : 1685 MB (1.6%)
Collecting resizing constraints ...
Needed relocations : 0 (0 MB)
Schedule chkdsk for NTFS consistency check at Windows boot time ...
Resetting $LogFile ... (this might take a while)
Updating $BadClust file ...
Updating $Bitmap file ...
Updating Boot record ...
Syncing device ...
Successfully resized NTFS on device '/dev/sda5'.
You can go on to shrink the device for example with Linux fdisk.
IMPORTANT: When recreating the partition, make sure that you
1) create it at the same disk sector (use sector as the unit!)
2) create it with the same partition type (usually 7, HPFS/NTFS)
3) do not make it smaller than the new NTFS filesystem size
4) set the bootable flag for the partition if it existed before
Otherwise you won't be able to access NTFS or can't boot from the disk!
If you make a mistake and don't have a partition table backup then you
can recover the partition table by TestDisk or Parted's rescue mode.
shrink partition from 100.04 GiB to 97.23 GiB 00:00:01 ( SUCCESS )
old start: 20971503
old end: 230761439
old size: 209789937 (100.04 GiB)
new start: 20971503
new end: 224884547
new size: 203913045 (97.23 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: 107412447744 bytes (107413 MB)
Current device size: 104403479040 bytes (104404 MB)
ERROR: Current NTFS volume size is bigger than the device size!
Corrupt partition table or incorrect device partitioning?
grow file system to fill the partition 00:00:01 ( ERROR )
run simulation 00:00:01 ( ERROR )
ntfsresize -P --force /dev/sda5 --no-action
ntfsresize v2.0.0 (libntfs 10:0:0)
Device name : /dev/sda5
NTFS volume version: 3.1
Cluster size : 4096 bytes
Current volume size: 107412447744 bytes (107413 MB)
Current device size: 104403479040 bytes (104404 MB)
ERROR: Current NTFS volume size is bigger than the device size!
Corrupt partition table or incorrect device partitioning?
========================================
Modified " 11::25::59 AM
Accessed Sat 30 2010 2:55:27 PM
GParted 0.5.1
Libparted 2.2
Check and repair file system (ntfs) on /dev/sda5 00:00:00 ( ERROR )
calibrate /dev/sda5 00:00:00 ( SUCCESS )
path: /dev/sda5
start: 20971503
end: 224884547
size: 203913045 (97.23 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: 107412447744 bytes (107413 MB)
Current device size: 104403479040 bytes (104404 MB)
ERROR: Current NTFS volume size is bigger than the device size!
Corrupt partition table or incorrect device partitioning?
========================================
gparted details.htm
Modified " " 4: 32:39 PM
Accessed sat 30 10/20/10 3:32:40 PM
GParted 0.5.1
Libparted 2.2
Move /dev/sda1 to the right and shrink it from 10.00 GiB to 9.82 GiB 00:00:17 ( ERROR )
calibrate /dev/sda1 00:00:00 ( SUCCESS )
path: /dev/sda1
start: 63
end: 20971439
size: 20971377 (10.00 GiB)
calculate new size and position of /dev/sda1 00:00:00 ( SUCCESS )
requested start: 369495
requested end: 20964824
requested size: 20595330 (9.82 GiB)
new start: 369495
new end: 20964824
new size: 20595330 (9.82 GiB)
check file system on /dev/sda1 for ERRORs and (if possible) fix them 00:00:03 ( SUCCESS )
ntfsresize -P -i -f -v /dev/sda1
ntfsresize v2.0.0 (libntfs 10:0:0)
Device name : /dev/sda1
NTFS volume version: 3.1
Cluster size : 4096 bytes
Current volume size: 10737345024 bytes (10738 MB)
Current device size: 10737345024 bytes (10738 MB)
Checking for bad sectors ...
Checking filesystem consistency ...
Accounting clusters ...
Space in use : 10142 MB (94.5%)
Collecting resizing constraints ...
Estimating smallest shrunken size supported ...
File feature Last used at By inode
$MFT : 10056 MB 0
Multi-Record : 10738 MB 30115
$MFTMirr : 5369 MB 1
Compressed : 10734 MB 30578
Ordinary : 10738 MB 6541
You might resize at 10141523968 bytes or 10142 MB (freeing 596 MB).
Please make a test run using both the -n and -s options before real resizing!
shrink file system 00:00:11 ( ERROR )
run simulation 00:00:11 ( ERROR )
ntfsresize -P --force /dev/sda1 -s 10544808959 --no-action
ntfsresize v2.0.0 (libntfs 10:0:0)
Device name : /dev/sda1
NTFS volume version: 3.1
Cluster size : 4096 bytes
Current volume size: 10737345024 bytes (10738 MB)
Current device size: 10737345024 bytes (10738 MB)
New volume size : 10544804352 bytes (10545 MB)
Checking filesystem consistency ...
Accounting clusters ...
Space in use : 10142 MB (94.5%)
Collecting resizing constraints ...
Needed relocations : 45879 (188 MB)
Schedule chkdsk for NTFS consistency check at Windows boot time ...
Resetting $LogFile ... (this might take a while)
Relocating needed data ...
ERROR: Extended record needed (1032 > 1024), not yet supported!
Please try to free less space.
check file system on /dev/sda1 for ERRORs and (if possible) fix them 00:00:03 ( SUCCESS )
ntfsresize -P -i -f -v /dev/sda1
ntfsresize v2.0.0 (libntfs 10:0:0)
Device name : /dev/sda1
NTFS volume version: 3.1
Cluster size : 4096 bytes
Current volume size: 10737345024 bytes (10738 MB)
Current device size: 10737345024 bytes (10738 MB)
Checking for bad sectors ...
Checking filesystem consistency ...
Accounting clusters ...
Space in use : 10142 MB (94.5%)
Collecting resizing constraints ...
Estimating smallest shrunken size supported ...
File feature Last used at By inode
$MFT : 10056 MB 0
Multi-Record : 10738 MB 30115
$MFTMirr : 5369 MB 1
Compressed : 10734 MB 30578
Ordinary : 10738 MB 6541
You might resize at 10141523968 bytes or 10142 MB (freeing 596 MB).
Please make a test run using both the -n and -s options before real resizing!
grow file system to fill the partition 00:00:00 ( SUCCESS )
run simulation 00:00:00 ( SUCCESS )
ntfsresize -P --force /dev/sda1 --no-action
ntfsresize v2.0.0 (libntfs 10:0:0)
Device name : /dev/sda1
NTFS volume version: 3.1
Cluster size : 4096 bytes
Current volume size: 10737345024 bytes (10738 MB)
Current device size: 10737345024 bytes (10738 MB)
New volume size : 10737340928 bytes (10738 MB)
Nothing to do: NTFS volume size is already OK.
real resize 00:00:00 ( SUCCESS )
ntfsresize -P --force /dev/sda1
ntfsresize v2.0.0 (libntfs 10:0:0)
Device name : /dev/sda1
NTFS volume version: 3.1
Cluster size : 4096 bytes
Current volume size: 10737345024 bytes (10738 MB)
Current device size: 10737345024 bytes (10738 MB)
New volume size : 10737340928 bytes (10738 MB)
Nothing to do: NTFS volume size is already OK.
========================================
Here is the last bit of requested command line code I add:
root@###:~# parted /dev/sda unit s print
Model: ATA WDC WD1600BB-22F (scsi)
Disk /dev/sda: 312581808s
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 63s 20971439s 20971377s primary ntfs boot
[i][*][/*]So my real partion sda1 size is 20971377s -1 = 20971376s
[/i]
2 20971501s 312580095s 291608595s extended lba
[i][*][/*]So my real partion sda2 size is 291608595s -1 = 291608594s[/i]
5 20971503s 224884547s 203913045s logical ntfs
[i][*][/*]So my real partion sda5 size is 203913045s -1 = 203913044s[/i]
6 230762496s 236761087s 5998592s logical linux-swap(v1)
7 236763136s 250761215s 13998080s logical ext4
8 250763264s 312580095s 61816832s logical ext4
root@###:~# 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: 0xdd5bdd5b
Device Boot Start End Blocks Id System
/dev/sda1 * 63 20971439 10485688+ 7 HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2 20971501 312580095 145804297+ f W95 Ext'd (LBA)
/dev/sda5 20971503 224884547 101956522+ 7 HPFS/NTFS
/dev/sda6 230762496 236761087 2999296 82 Linux swap / Solaris
/dev/sda7 236763136 250761215 6999040 83 Linux
/dev/sda8 250763264 312580095 30908416 83 Linux
To conclude, I am not sure if reversing what i did would be the best option!
Thanks
-Chris O.