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

Re: How do you e2defrag?



On Tue, 10 Mar 1998, Mark Phillips wrote:

> I have debian installed on a single partition, a partition which
> I suspect is greatly fragmented (is there an easy way to tell?).  I wish
> to use the program e2defrag to defragment it, but have realized this could
> be more difficult than I first thought.

Linux usually is smart enough to prevent partitions from being too
fragmented, so defragmenting is usually unecessary; if you run e2fsck -n,
it will not alter your filesystem in any way (so you don't need to umount
it first) and report the fragmentation. From my box, which has been nearly
full and has not been defrag'd since it was born several months ago:

/dev/hda1: 35420/266240 files (6.0% non-contiguous), 801757/1064416 blocks

> I see that the partition will need to be dismounted first, which puts me
> in a catch 22 situation.

Try going into single-user mode (init S); then 'mount -n o,remount,ro /'
so the filesystem is  read-only. After defragmenting,
'mount -n -o,remount,rw /' and "init 2" to go back to multi-user mode.
NOTE: This is all "theoretical", meaning I've never tried it by myself.
Specially the "init S" doesn't seem to do exactly what I expected...

See ya,
Nelson
lago@that.com.br
That's Internet!


--
E-mail the word "unsubscribe" to debian-user-request@lists.debian.org
TO UNSUBSCRIBE FROM THIS MAILING LIST. Trouble?  E-mail to listmaster@debian.org .


Reply to: