disk fragmentation, <0%?
Glenn Dawson
glenn at antimatter.net
Sun Aug 14 07:08:26 GMT 2005
At 11:54 PM 8/13/2005, Lei Sun wrote:
>Hi,
>
>I know this question has been raised a lot of times, and most of
>people don't think it is necessary to defragment ufs, and from the
>previous posts, I got to know there are sometimes, disksize can be
>more than 100%
>
>But...
>
>I got ...
>
>/dev/ar0s1a: ... 0.5% fragmentation
>/dev/ar0s1e: ... 0.0% fragmentation
>/dev/ar0s1f: ... 0.0% fragmentation
>/dev/ar0s1d: ... 0.1% fragmentation
>
>Filesystem Size Used Avail Capacity Mounted on
>/dev/ar0s1a 248M 53M 175M 23% /
>devfs 1.0K 1.0K 0B 100% /dev
>/dev/ar0s1e 248M -278K 228M -0% /tmp
>/dev/ar0s1f 221G 1.4G 202G 1% /usr
>/dev/ar0s1d 248M 30M 197M 13% /var
>
>My questions:
>1. How do I make /dev/ar0s1a 0.0% fragmentation the clean way? If I
>really wanted to?
You don't. The term "fragmentation" does not mean the same thing in
FreeBSD that it does in other OS's. (ie windows)
Fragmentation in FreeBSD refers to blocks that have not been fully
allocated. For example, if I have a file system that has 16K blocks, and
2K fragments (think of fragments as sub-blocks if it helps), and I save an
18K file, it will occupy 1 block and 1 fragment from the next block. That
second block then is said to be "fragmented".
In the windows world, fragmentation refers to files which occupy
non-contiguous groups of blocks. For example, you might have 5 blocks in a
row, and then have to move to another part of the disk to read the next 5
blocks.
>2. How come /tmp is -0% in size? -278K? What had happened? as I have
>never experienced this in the previous installs on the exact same
>hardware.
Not sure about that one. Maybe someone else has an answer.
-Glenn
>Thanks
>
>Lei
>_______________________________________________
>freebsd-questions at freebsd.org mailing list
>http://lists.freebsd.org/mailman/listinfo/freebsd-questions
>To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
More information about the freebsd-questions
mailing list