Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I had a NAS with 300GB data stored on it. I played around with it and finally broke it - all of the data was lost. I opened the NAS and put the disk into my computer (running Ubuntu). I put new data on it (about 80GB) and then realized that the old data still seems to be taking up space:

df -h

/dev/sdb1             1.3T  379G  899G  30% /media/nasHD

Is there an easy way to recover this data? If not, how can I free the space?

share|improve this question
    
Are you saying you cannot see the data? Try a sudo du -shx /media/nasHD/* –  Paul Dec 11 '11 at 10:13
    
Yes, I cannot see the data. $ sudo du -shx /media/nasHD/* 83G /media/nasHD/backup 3.6G /media/nasHD/music 1.6M /media/nasHD/raoul –  Raoul Dec 11 '11 at 15:24
    
Can you try du -shx .[!.]* in case it is a hidden file –  Paul Dec 12 '11 at 9:30
    
there is nothing too: '/media/nasHD$ du -shx .[!.]* 1.5M .Spotlight-V100 32K .Trashes 32K ._.Trashes' –  Raoul Dec 13 '11 at 12:01

2 Answers 2

up vote 0 down vote accepted

Try running the filesystem check utility fsck on the disk. fsck will attempt to recover any lost file fragments, which may be taking up space without being associated with a file, and store them in a directory called lost+found. Once fsck has exited, enter the lost+found directory as root and see if you have any files here that are needed or should be deleted.

Edit: I'm not sure how dosfsck handles lost file fragments, but it should be able to detect and recover lost file fragments. If this doesn't work, copy all data off the drive onto another storage device, reformat the drive, then copy the data back onto the drive.

Edit 2: From the output of dosfsck, it appears your partition table is damaged. See this question on Ask Ubuntu: http://askubuntu.com/questions/3700/dosfsck-unable-to-create-unique-name.

share|improve this answer
    
unfortunately the filesystem is not ext but fat32. I tried dosfsck: $ sudo dosfsck -a /dev/sdb1 dosfsck 3.0.7, 24 Dec 2009, FAT32, LFN There are differences between boot sector and its backup. Differences: (offset:original/backup) 28:3f/00 Not automatically fixing this. Root contains directory ".". Dropping it. Root contains directory "..". Dropping it. Unable to create unique name –  Raoul Dec 13 '11 at 12:03
    
Can you post the complete output of dosfsck on pastebin.com? –  DragonLord Dec 13 '11 at 16:02
    
pastebin.com/v26Z4P90 –  Raoul Dec 13 '11 at 23:31
    
I also tried to undelete with testdisk, but didn't found my old data. I guess I will reformat the drive then. Thanks for your help. –  Raoul Dec 14 '11 at 1:57

In Windows, I normally use Recuva to recover deleted files, and an old version of a program called OnTrack EasyRecovery that's so old it should be abandonware by now. If you ask me I can give you a copy through e-mail.

By the way, which is the drive's format?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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