LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   USB Hardrive with FAT32 and ext3 partitions in need of repair/defrag (https://www.linuxquestions.org/questions/linux-hardware-18/usb-hardrive-with-fat32-and-ext3-partitions-in-need-of-repair-defrag-619958/)

MiniDev 02-09-2008 03:06 PM

USB Hardrive with FAT32 and ext3 partitions in need of repair/defrag
 
Hello everyone. As you all probably know, I have a 40GB USB hard drive that stores the great portable apps that I use at the library. It has three partitions on it. The first is a 15GB FAT32 that I use to put all my portable apps, documents, games, downloaders, and great stuff I find on the net to take home with me. The second partition is a 10GB FAT32 where I keep backups of my data in compressed archive format. The remaining space is an ext3 partition that I use to backup my home directory and other vital areas of my Linux computer at home. I've been using the drive for a while and it's starting to lose read/write speed, a clear indicator of disk fragmentation. I don't have any hope of gaining admin rights at the library, so there has to be something out there that I can take home and use with my Linux computer. Also, the disk is in need of repair because 3GB of space seems to be missing from the drive. Whenever I plug it in and start up GPartED, it stalls and causes the computer to freeze, but other FAT32 drives that I have tried can be safely accessed and manipulated. I have WINE installed and properly configured, in case there are any Windows apps out there known to work with WINE that can help me. Before you all point me to Google or flag me for redundant posting, please note that I have been trying to tackle this problem for a good month and a half, and my favorite games (Unreal Tournament, Mech Warrior, Quake) keep running slower and slower and slower. It's really driving me crazy. I would appreciate it if someone finds a solution before the USB drive decides to die on me, as I do not have a replacement.

jailbait 02-09-2008 04:11 PM

You can defrag any file system by copying all of the data off the file system, deleting every file on the file system, and copying the files back to the now empty file system.

Since you have missing space you might try to get the missing space back by formatting the file system during the time it is empty.

-------------------
Steve Stites

MiniDev 02-10-2008 01:49 PM

I'm sorry but...
 
I should have mentioned this earlier, I ALREADY TRIED MOVING THE DATA. It doesn't fix the problem. The disk is still slow. And, in case you didn't read my post all the way through, GPartED won't work with the drive even when it is empty. Though I know how to format the drive with FAT32 on the command line, I would rather not do so until I know why that last 3GB of space is missing. This drive of mine is a real odd-ball. Anyone else know of a program that can fix it? And DO NOT suggest installing Windows.

DragonSlayer48DX 02-10-2008 04:32 PM

You can go here to get Diskeeper and try it with Wine. I highly recommend backing up all your data first, though.

The fact that moving the data off the disk didn't help, GParted can't work with it even when it's empty, and it's missing 3G tells me it's already about to crash and is in dire need of replacing.

There are no defragmenter programs for Linux, simply because Linux maintains the disk in such a manner as to prevent fragmentation, unless the disk is almost full and you have a lot of files that keep getting changed or replaced.

Good Luck!

MiniDev 02-13-2008 07:05 PM

Thanks dragonslayer, I will try to use Diskeeper with WINE. Looking through the debian repo, I found something call "sformat" that says it can repair bad blocks of SCSI drives. To my knowledge, USB drives are SCSI devices under Linux, or at least they are emulated as such. I guess I could try it. Thanks for the help.

MiniDev 02-15-2008 09:26 AM

Problem Solved!
 
sformat worked on the USB drive. Though it took a while (over 4 hours), it managed to find and repair all the bad blocks on the USB drive, restoring it to it's full 40GB glory, and without deleting my data too. Then it was easy to check the partitions with GPartED and slide the partions around. Just out of curiosity, I did use Diskeeper through WINE on an old 250MB memory stick. It actually corrupted the test data on it and returned error after error when I selected the "check for errors" option. I put all the DLLs in the proper directories in my WINE installation, but it didn't work. Sure glad I didn't use it on the big USB drive.

rg.viza 02-15-2008 03:05 PM

are you running OS's off of this?


All times are GMT -5. The time now is 08:11 AM.