You are not logged in.

#1 2008-04-06 21:10:59

The Orange Peanut
Member
Registered: 2008-01-06
Posts: 152

Defragmenter for external HDD?

I have an external HDD that is formatted as Fat32 (or VFAT, I think they're the same, right?).  I formatted it that way so it could be read by Linux and Windows when I was dual booting, but now I'm running only Linux so I can't defrag it from Windows.  Is there a program in Linux I can use to defrag the drive?

Offline

#2 2008-04-06 22:25:18

Ernest0x
Member
Registered: 2007-01-24
Posts: 4

Re: Defragmenter for external HDD?

Since you only use Linux, formatting your disk to a native filesystem (reiserfs, ext3, etc.), which does not need defragment, is your best choice.

Offline

#3 2008-04-06 22:35:42

kensai
Member
From: Puerto Rico
Registered: 2005-06-03
Posts: 2,484
Website

Re: Defragmenter for external HDD?

Well, you can reformat to a Linux File system, or use the defrag script from Con Kolivas.


Follow me in: Identi.ca, Twitter, Google+

Offline

#4 2008-04-06 23:00:30

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: Defragmenter for external HDD?

Ernest0x wrote:

Since you only use Linux, formatting your disk to a native filesystem (reiserfs, ext3, etc.), which does not need defragment, is your best choice.

It is not quite true that it does not need defragmenting... over time every system gets fragmented, and slows down a bit. It just doesn't happen as quickly and is not as noticeable as with fat/ntfs.

Offline

#5 2008-04-07 02:41:46

pogeymanz
Member
Registered: 2008-03-11
Posts: 1,020

Re: Defragmenter for external HDD?

Supposedly, if you transfer every file from one partition to another it will reduce the fragments (assuming the new, blank partition is sufficiently large). This might be a viable way of manually defragging.

If you are using less than 50% of your drive maybe you should just make a new ext3 partition out of the unused space on the HDD and do a massive file transer from the FAT partition to the ext3 partition, then delete the old FAT partition and expand the ext3 to take up the whole drive.

Someone tell me if that sounds crazy, but I heard somewhere that it should work.

Last edited by pogeymanz (2008-04-07 02:42:38)

Offline

#6 2008-04-07 02:49:55

B-Con
Member
From: USA
Registered: 2007-12-17
Posts: 554
Website

Re: Defragmenter for external HDD?

The Orange Peanut wrote:

as Fat32 (or VFAT, I think they're the same, right?).

Yes.

pogeymanz wrote:

If you are using less than 50% of your drive maybe you should just make a new ext3 partition out of the unused space on the HDD and do a massive file transer from the FAT partition to the ext3 partition, then delete the old FAT partition and expand the ext3 to take up the whole drive.

Someone tell me if that sounds crazy, but I heard somewhere that it should work.

You can't just half the partition, you have to resize the original partition to a new size

I don't know if you can resize a partition by moving the front of it backwards... I know you can move the end forwards, but I'm not sure about the head backwards. It may depend on the file system, I'm pretty sure I ran into a brick wall once trying to expand the front of an NTFS partition backwards.

Offline

#7 2008-04-07 03:12:47

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: Defragmenter for external HDD?

B-Con wrote:

I don't know if you can resize a partition by moving the front of it backwards... I know you can move the end forwards, but I'm not sure about the head backwards. It may depend on the file system, I'm pretty sure I ran into a brick wall once trying to expand the front of an NTFS partition backwards.

To my knowledge, you can only grow by moving the end of a partition further. It's a filesystem thing. As far as just partitions go, you'd have to delete the old two and create a new one, spanning the whole space. But if the filesystem you want to grow does not begin at the beginning of the new one, there's nothing you can do with it (apart from using some recovery programs to search for the data).

Offline

#8 2008-04-07 03:18:00

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,400
Website

Re: Defragmenter for external HDD?

If you don't want to reformat try the defrag script kensai mentioned (http://aur.archlinux.org/packages.php?ID=4316) or shake (http://aur.archlinux.org/packages.php?ID=6438).  I think these both do essentially the same thing but only work if you have a reasonable amount of free space on the drive.  What is reasonable you ask....  depends on how big your files are.

Offline

#9 2008-04-07 03:18:48

The Orange Peanut
Member
Registered: 2008-01-06
Posts: 152

Re: Defragmenter for external HDD?

Is that script really the only way?  My HDD is at about 70% full and I have no where else to store the data so formatting the drive is out of the question.  I suppose if it comes down to it I can move my HDD to one of my roommates computers just long enough to let it defrag, but it is kind of disappointing that there isn't a Linux alternative to doing it.  Thanks for the help.

Offline

#10 2008-04-07 03:45:54

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: Defragmenter for external HDD?

Well, fat is not really a linux filesystem...
I'd suggest attaching that external disk to a computer with windows and use windows defrag... (if that's possible).

Offline

Board footer

Powered by FluxBB