[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How flexible can hard disk partitions be?

orloff@lapphp0.in2p3.fr wrote:
> it is a bit scary to assign a fixed disk space to DOS, and a fixed
> one to Linux.

Yes. I have found myself re-partitioning my system a few times.
The key to this is having a backup device such as a tape drive or
a "scratch disk" that you can copy the system to while repartitioning
the main disk.

One thing to keep in mind is that if you create your swap partition too
small, you can use a swap file in your data partition to supplement
it with slightly reduced efficiency.

> What I lack:
> ------------
> 1) a defragmenter for Linux partitions.

Note that your DOS system suffered more from fragmentation since
its filesystem design was so simple-minded. The EXT2FS filesystem we
use is designed to suffer less from fragmentation.

You won't ever see a defragmenter for _all_ linux partitions, since
there are so many different types. Conceivably one _could_ be done for

Until then, you can defragment the way it's always been done on Unix:
back up the partition using a program such as "tar", make a new
filesystem, and restore the data. That leaves you with a compacted

> 2) a tool to kick out the free space generated in 1) from the 
> partition it belongs to.

This is more difficult when using a high-performance filesystem. The
reason is that high-performance filesystems tend to keep some free
space on each _cylinder_, as they want to be able to grow a file
without a disk seek. If you totally compacted the filesystem as you
would with a FAT16 (DOS) filesystem, disk writes would become slower!

I think that defragmenting is a lot more possible than partition
splitting. It may, however, be that high-performance filesystems
suffer so much less from fragmentation than the FAT16 filesystems
you are used to that a defragmenter wouldn't really be worth the
trouble. Defragmenters are difficult to write, as the consequence of
a bug is a corrupted disk! This is why you might not see one soon.



See Pixar's "Toy Story", at a theater near you starting November 22.
"Toy Story" Toys and Soundtrack Album are available now!

Reply to: