1 (edited by cooler 2007-03-02 17:20:56)

Topic: Lost data after using gparted on NTFS partition

Hello all,

I've got some serious problems after using gparted on NTFS partiton. I've had two NTFS partitions
on my Samsung SP2504C hard drive (15 GB and 220 GB) Below is what I wanted to do:

1. Shrink the second partition from 220 GB to 200 GB & move it to the right
2. Move the 15 GB partition to the right
3. Create a new NTFS partiton at the beginning.

Everything went (theoretically) OK. No errors appeared.

Now, my system partition won't boot (it can be easily fixed, data OK) but what is more interesting,
confusing and really making me mad is that the big, 200 GB partition, is corrupted. I can see in
Windows Explorer or by mounting it by ntfs-3g the whole structure of files and directories, although
about 90 percent of my data cannot be read. For instance, when I try to view some plain text files,
there are some strange binary things inside. None of my pictures are working either. Some files can
be read, but the filename doesn't match the contents.

Can you help me? I've trusted the gparted FAQ that it is safe. It was not.
I would really, really appreciate to get my whole data back.

Waiting for an answer. Thanks in advance.
Used app version: 0.3.4 from sysresccd.org

2

Re: Lost data after using gparted on NTFS partition

cooler wrote:

I've trusted the gparted FAQ that it is safe. It was not.
I would really, really appreciate to get my whole data back.

But you surely pointed out this line too :

Of course you have to realize I cannot give any guarantees, so you should probably make a backup of important data before toying with your partitions.

wink

cooler wrote:

Used app version: 0.3.4 from sysresccd.org

So you could search for some help on the sysrecuecd forum, i think wink


Nevertheless, i gonna try to give you some help. After all, i can try to do that too smile

Tell me : Did you reboot your win twice or did you try to access to your data ***before*** the two reboots mentioned in documentation ?

Larry
GParted-project Admin
Former GParted-LiveCD maintainer (2007)

3

Re: Lost data after using gparted on NTFS partition

Of course you have to realize I cannot give any guarantees,
so you should probably make a backup of important data before toying with your partitions.

I know, I should have done a backup. I didn't, cause I hopefully thought it will ran without problems.

So you could search for some help on the sysrecuecd forum, i think wink

Maybe you are right, but will they now something more than people here? I'll try.

Nevertheless, i gonna try to give you some help. After all, i can try to do that too smile

Tell me : Did you reboot your win twice or did you try to access to your data ***before*** the two reboots mentioned in documentation

Yes, I did the reboots. Windows was checking both partitions several times (more than two), but
he thinks everything is OK. Most of the files are corrupted, like I described above.

Now I'm trying OnTrack EasyRecovery...

4

Re: Lost data after using gparted on NTFS partition

Well, this is really bad, indeed .

cooler wrote:

1. Shrink the second partition from 220 GB to 200 GB & move it to the right
2. Move the 15 GB partition to the right
3. Create a new NTFS partiton at the beginning.

I dont really understand what the 15go partition is ?
The problem sounds like some overlaping.

Larry
GParted-project Admin
Former GParted-LiveCD maintainer (2007)

5

Re: Lost data after using gparted on NTFS partition

Well, this is really bad, indeed.

I know...

cooler wrote:

1. Shrink the second partition from 220 GB to 200 GB & move it to the right
2. Move the 15 GB partition to the right
3. Create a new NTFS partiton at the beginning.

I dont really understand what the 15go partition is ?
The problem sounds like some overlaping.

So, a simple graph illustration what I've done...
http://www.cooler.v1.pl/cooler/graph.JPG

6

Re: Lost data after using gparted on NTFS partition

yes i think this come from overlaping.
Did you write something in the new partition ? I hope you didnt
I think i would delete the new partition, and then restore run testdisk to restore partition table.

But i wonder about dat.

FIRSt, could you please post the noutput of the following command :
fdisk /dev/yourdevice
parted /dev/your_device
I wonder if the partition has been resized, or only the file system .....

Larry
GParted-project Admin
Former GParted-LiveCD maintainer (2007)

7

Re: Lost data after using gparted on NTFS partition

Did you write something in the new partition ? I hope you didnt

After shrinking that big partition, gparted moved about 15 GB of data to the right.
What's interesting - this partition works OK, 15 GB is safe and working.

So I think he wrote a couple of gigabytes there.

I think i would delete the new partition, and then restore run testdisk to restore partition table.
But i wonder about that.

First, could you please post the output of the following command:
fdisk /dev/yourdevice
parted /dev/your_device

Of course, I can do this. Please wait about one hour, cause right now I'm using
OnTrack EasyRecovery. He found about 200 GB of data, which I'm now moving
to another hard drive. Unfortunately, only the RAW Searching was successful to
find some files, but this method depreciates the whole file & directory structure,
and only preserves file extensions.

I wonder if the partition has been resized, or only the file system .....

I don't know, but please remember that some files are working (especially small files
and those newly created - don't know why)

8

Re: Lost data after using gparted on NTFS partition

Okay. really weird !...

Larry
GParted-project Admin
Former GParted-LiveCD maintainer (2007)

9

Re: Lost data after using gparted on NTFS partition

Output of parted command in fdisk:

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               2        1944    15607147+   f  W95 Ext'd (LBA)
/dev/sda2   *        1945        3889    15623212+   7  HPFS/NTFS
/dev/sda3            3890       30388   212853217+   7  HPFS/NTFS
/dev/sda4           30393       30401       72292+   7  HPFS/NTFS
/dev/sda5               2        1944    15607116    7  HPFS/NTFS

10 (edited by LeeC22 2007-03-11 18:17:57)

Re: Lost data after using gparted on NTFS partition

Without having a proper knowledge of GParted but based on programmes like Partition Magic, if you resize the first partition to be bigger than it was, it will overwrite the data at the start of the next partition. In the same way that shrinking a partition will lose data at the end of the drive.

File systems generally write data to the front of the drive first. The reason that some of the files probably work is that they were beyond the 15GB that got overwritten. Especially new files as they will be the nearest to the end of the drive. If the FAT table got moved, those files will still relatively be in the same physical place on the drive and will be fine.

As a general rule, whilst resizing partitions works, you should always be aware that data at the front and back of a drive is susceptible to corruption or loss after resizing. Which is why I have just done a full defragmentation of my fron partition to ensure that tha data is compacted at the front of the drive. The problem is that you cannot do that on the second partition so your only safe bet is to move the data off the drive and then do the resize, then put the data back.

As I said though, I haven't used GParted yet... it won't recognise my drive setup, so it is possible that GParted should move the data.