1 |
On Friday 28 November 2008 18:09:37 Joshua Murphy wrote: |
2 |
> On Fri, Nov 28, 2008 at 6:46 AM, Alan McKinnon <alan.mckinnon@×××××.com> |
3 |
wrote: |
4 |
> > On Friday 28 November 2008 13:14:42 Dale wrote: |
5 |
> >> If this is a little high, what would be the best way to defrag it? |
6 |
> > |
7 |
> > By not defragging it. |
8 |
> > |
9 |
> > It's not Windows. Windows boxes needs defragging not because |
10 |
> > fragmentation is a huge problem in itself, but because windows |
11 |
> > filesystems are a steaming mess of cr@p that do little right and most |
12 |
> > things wrong. Defrag treats the symptom, not the cause :-) |
13 |
> > |
14 |
> > Reiser tends to self-balance itself out. What is especially noteworthy is |
15 |
> > that none of the general purpose Linux filesystems provide a defrag |
16 |
> > utility. Theodore 'Tso and Hans Reiser are both exceptional programmers, |
17 |
> > if there was a need for such a tool they would assuredly have written |
18 |
> > one. They did not, so there probably isn't. |
19 |
> > |
20 |
> > Any Linux defrag tool you encounter will have been written by a third |
21 |
> > party separate from the developers. It will move blocks around and update |
22 |
> > superblocks, the drive will have to be unmounted for that to work and a |
23 |
> > slight misunderstanding of how to do it will ruin data. |
24 |
> > |
25 |
> > Are you willing to take the very real risk of data corruption? |
26 |
> > |
27 |
> >> Is |
28 |
> >> there a best way? I do have a second hard drive that I back up too. |
29 |
> >> Both Drives are 80Gbs and I do have a set of DVD back ups as well. I |
30 |
> >> can update those pretty quick. |
31 |
> > |
32 |
> > -- |
33 |
> > alan dot mckinnon at gmail dot com |
34 |
> |
35 |
> While not trying to incite flames here... xfs isn't general purpose? |
36 |
> xfs_fsr defrags xfs partitions while they're mounted and is designed |
37 |
> to be used from cron (it's in xfsdump, not xfsprogs). File |
38 |
> fragmentation, while a fact of life on any filesystem that sees any |
39 |
> real use, does slow access times, as the drive head has to jump from |
40 |
> one place to another, so a lot of fragmentation is a bad thing... |
41 |
|
42 |
On a proper multi-user multitasking OS like Unixes, the heads are going to be |
43 |
moving around all over the disk partition anyway just in general usage, even |
44 |
with zero file fragmentation. How much extra movement does fragmentation |
45 |
introduce? |
46 |
|
47 |
I've been waiting for a proper statistical analysis of this question for |
48 |
years. I'm still waiting :-) Besides, modern storage presents an extra |
49 |
wrinkle. Defrag as most of the world knows it originated in DOS, where disk |
50 |
sectors were guaranteed to be laid out on disk in the order of their sector |
51 |
number. These days we have no such guarantee, and you cannot really be sure |
52 |
if blocks are laid out contiguously on-disk just by looking at the blocks |
53 |
numbers. I don't know of any filesystem tool that knows how to interrogate a |
54 |
drive's firmware and get it right for every storage type out there. |
55 |
|
56 |
|
57 |
> but |
58 |
> as you say, we're not dealing with FAT based FS's here, so severe |
59 |
> fragmentation only shows itself on very full filesystems. I very |
60 |
> rarely see over 80% usage of my filesystems and have never |
61 |
> consistently checked fragmentation levels, though, so I can't say |
62 |
> whether xfs's being the exception on having a tool for the job means |
63 |
> it particularly needed one... |
64 |
|
65 |
|
66 |
|
67 |
-- |
68 |
alan dot mckinnon at gmail dot com |