0

Wanted to add 100 mb music file to my external drive which i am using as a backup drive for important data.
When the transfer was over i hit the safe remove option. Then new dialog appears saying the data is still writing and it will have to wait for a while. That was no prob for me but i disconnected ext drive only when this new dialog took bigger amount of time then the initial transfer saying to my self the hell with this last music file if it take so long.

Now i know. It was a mistake.

My ext drive consist of two partitions: sdb1 labeled Elements Flow and sdb2 labeled New Volume

fdisk -l output looks like this:

Disk /dev/sdb: 500.1 GB, 500074283008 bytes
255 heads, 63 sectors/track, 60797 cylinders, total 976707584 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: 0x0004a183

Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *        2048   347557887   173777920    7  HPFS/NTFS/exFAT
/dev/sdb2       347557888   976703487   314572800    7  HPFS/NTFS/exFAT

In my computer i can see both partitions but on sdb2 there are no visual files although when i hit properties there is 201 GB used and 121 GB still free.

With testdisks quick search i found sdb1 and sdb2 partiton tables and re-write the second (lost) one and after restart there still are no visual files.

I tried deeper searh which took about 12 hours.

Disk /dev/sdb - 500 GB / 465 GiB - CHS 60798 255 63
     Partition               Start        End    Size in sectors
>D HPFS - NTFS              0  32 33 21634 121 55  347555840 [Elements Flow]
 D HPFS - NTFS              0  32 33 60797  59 62  976705536 [Elements Flow]
 D HPFS - NTFS          21634 121 56 60796 249 61  629145600 [New Volume]

After list files i managed to copy out 100GB of data as a panic attack move but i would like to adjust the partition tables so my "missing folders" appear.

i'm running:

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.04.3 LTS
Release:    12.04
Codename:   precise 

can anyone help?

2

This is not a partitioning problem -- your partition table appears to be fine. It is instead a filesystem problem, and in particular a problem with NTFS, which is a Windows filesystem. If you're sharing this disk with Windows, NTFS can be a reasonable choice, but if the disk is used only with Linux, NTFS is a poor choice, and your problem illustrates why: There are no good Linux tools for repairing damage to NTFS. The ntfsfix utility is named somewhat deceptively. Although it can fix some very minor problems, mostly ntfsfix just sets a flag in the filesystem that causes Windows to run more extensive checks and repairs the next time the disk is used from Windows.

In your case, the solution that's most likely to help is to use Windows. If Windows can't fix it automatically or semi-automatically (by using CHKDSK or its GUI front-ends), you should ask on a Windows forum, because NTFS is not a Linux-native filesystem. Beware, though: Attempts to fix filesystem damage sometimes make matters worse. You might want to back up the data (as in sudo dd if=/dev/sdb2 of=/path/to/some/backup-file.img) before doing anything else. The location pointed to by of= must have enough free space to hold the raw image data (about 300GiB).

If you can't get any results even after asking on a Windows forum, you could use PhotoRec to try to recover files. I gather that there are Windows-specific tools that can do a better job than PhotoRec in some cases, but I don't know much about them. (Again, perhaps Windows forum members will be more helpful on this score.)

If this is a Linux-only disk, you should convert from NTFS to a Linux-native filesystem such as ext4fs or XFS. This is a medium- to long-term solution, though, and it won't fix your immediate problem.

  • ty Rod for your effort. Do you think it would be a wise decision to find a equivalent of dd command in Windows as I'm experiencing just how bad is it to use NTFS when it comes to linux, which you mentioned. I'm making an raw image with dd, came to 70% of 300GiB in last 72 hours. My goal is to use this external drive in linux when this all comes to end, with Windows way of doing it I just want to speed things a bit. – MiniBug Oct 15 '13 at 21:15
  • 72 hours to copy 70% of 300GiB seems excessive, even for an external (USB) disk. Of course, it could be you're running into disk errors that are slowing things down. In any event, Windows versions of dd are available, but I'm not sure they'd help. – Rod Smith Oct 15 '13 at 21:43
  • Imaging with dd stopped and now i have 200 GiB out of 300 GiB incomplete . img file. What are my chances if i use ddrescue instead of dd and use PhotoRec instead of TestDisk. – MiniBug Oct 16 '13 at 12:41
  • It sounds like you may have a physically failing hard disk. In this case, ddrescue is indeed worth trying, but be aware that it's likely to be even slower than dd. PhotoRec (or a Windows-specific tool to do the same job) may be necessary, as I suggested in my original answer; but be aware that PhotoRec and TestDisk solve different problems. See their documentation for details. – Rod Smith Oct 17 '13 at 16:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.