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

Re: 3 questions. Please, HELP ME!



> > 3. I have the defrag utility. How can I defragment my Linux partition,
> > since a mounted drive cannot be defragmented?
> 
> Well, one way is to unmount the partition (umount /zip , f.e) and defrag
> it. If its a /usr or /, then if you really wan to defrag it, then you have
> to do some more work....a LOT more work. So dont worry about it. How big
> is the defragmentation, how many files you have and how big the partition
> is?
> 
you need a separate /boot partition or a zImage and loadlin on a dos
partition.
go to single-user mode (init s).
unmount all partitions, remount / read-only.
defrag all (but /boot and /) partitions. then defrag / at last.
reboot the system as soon as possible, as the filesystem data in memory
will not be consistent with the one on disk any more (as / is still
mounted).
if you have a separate /boot partition, then after the reboot everything
should be fine. now you may unmount /boot, defrag it, remount, AND DON'T
FORGET TO RUN LILO BEFORE REBOOTING!!
if your /boot is on /, then you need to boot with loadlin from dos, as the
lilo map file will be made invalid by the defragmentation. first thing
after booting: run lilo. then all should be fine.
everything herein without any warranty!! it's your data! ;-)

final notes: i don't thing, that the whole thing is worth the effort. the
only partition on my system, that ever reaches fragmentation above 5% is
/var, so it is sensible to defrag only that one (if any). you have a
separate /var, don't you? :-)
however - defragmentation is usually useless on ext2 as a) it keeps
fragmentation low "by nature" and b) it spreads data all over the disk, so
even defragmenting won't make the filesystem faster (only reading large
files will be somewhat faster, but there are not many big files on a
linux system, that need fast access and ever get fragmented). correct me,
if i'm wrong ...

regards

-- 
Hi! I'm a .signature virus! Copy me into your ~/.signature, please!
--
Linux - the last service pack you'll ever need.



Reply to: