This commit is contained in:
gferg 2000-11-03 22:13:27 +00:00
parent d6378c2fa9
commit de0f97b85f
1 changed files with 33 additions and 55 deletions

View File

@ -370,8 +370,8 @@ $ ls -l /dev/hda
<entry></entry>
<entry>owner</entry>
<entry>group</entry>
<entry>minor device number</entry>
<entry>major device number</entry>
<entry>minor device number</entry>
<entry>date</entry>
<entry>device name</entry>
</row>
@ -1259,15 +1259,8 @@ Another sample partition table listing:
<sect1 id="recovering">
<title>Recovering a Deleted Partition Table</title>
<!--Tony, 1 Sept 00-->
<para>
Take a deep breath and relax. This is not bad luck. This is God's
retribution for your failure to back up your data. You are a bad
person and you deserve this.
</para>
<para>
Fortunately, there is a way for you to spite the will of God and
recover your data anyway, but it will require nerves of steel. Here is
what you do:
<orderedlist>
@ -1402,9 +1395,6 @@ Remount your partitions. Amazingly, all of your data will be there.
<para>
Credit goes to:
<itemizedlist>
<listitem><para>Arena Inc for selling me a raid that spontaneously dropped its
partition table and for ignoring all my tech support calls.</para></listitem>
<listitem><para>Mike Vevea, jedi sys admin and MGH's finest, for giving me these tips.</para></listitem>
</itemizedlist>
</para>
@ -1424,9 +1414,9 @@ this is:
</programlisting>
I need to do this for each of my partitions, but not for /dev/sda4 (my
extended partition). If I want non-ext2 partitions, this is the time
to make that decision. The kinds of file systems your kernel supports
is in <filename>/usr/src/linux/include/linux/fs.h</filename>
extended partition).
Linux supports types of file systems other than ext2. You can find out what kinds your kernel supports by looking in: <filename>/usr/src/linux/include/linux/fs.h</filename>
</para>
<para>
The most common file systems can be made with programs in
@ -1549,50 +1539,38 @@ though. That's why ext2 tries to preallocate space in units of
released when the file is closed, so no space is wasted.
</para>
<para>
Noncontiguous placement of blocks in a file is bad for
performance, since files are often accessed in a sequential
manner. It forces the operating system to split a disk access
and the disk to move the head. This is called "external
fragmentation" or simply "fragmentation" and is a common
problem with DOS file systems.
Noncontiguous placement of blocks in a file is bad for performance,
since files are often accessed in a sequential manner. It forces the
operating system to split a disk access and the disk to move the
head. This is called "external fragmentation" or simply
"fragmentation" and is a common problem with MS-DOS file systems. In
conjunction with the abysmal buffer cache used by MS-DOS, the effects
of file fragmentation on performance are very noticeable. DOS users
are accustomed to defragging their disks every few weeks and some have
even developed some ritualistic beliefs regarding defragmentation.
</para>
<para>
ext2 has several strategies to avoid external fragmentation.
Normally fragmentation is not a large problem in ext2, not even
on heavily used partitions such as a USENET news spool. While
there is a tool for defragmentation of ext2 file systems, nobody
ever uses it and it is not up to date with the current release
of ext2. Use it, but do so on your own risk.
None of these habits should be carried over to Linux and ext2. Linux
native file systems do not need defragmentation under normal use and
this includes any condition with at least 5% of free space on a
disk. There is a defragmentation tool for ext2 called defrag, but
users are cautioned against casual use. A power outage during such an
operation can trash your file system. Since you need to back up your
data anyway, simply writing back from your copy will do the job.
</para>
<para>
The MS-DOS file system is well known for its pathological
managment of disk space. In conjunction with the abysmal buffer
cache used by MS-DOS the effects of file fragmentation on
performance are very noticeable. DOS users are accustomed to
defragging their disks every few weeks and some have even
developed some ritualistic beliefs regarding defragmentation.
None of these habits should be carried over to Linux and ext2.
Linux native file systems do not need defragmentation under
normal use and this includes any condition with at least 5% of
free space on a disk.
</para>
<para>
The MS-DOS file system is also known to lose large amounts of
disk space due to internal fragmentation. For partitions larger
than 256 MB, DOS block sizes grow so large that they are no
longer useful (This has been corrected to some extent with
FAT32).
</para>
<para>
ext2 does not force you to choose large blocks for large file
systems, except for very large file systems in the 0.5 TB range
(that's terabytes with 1 TB equaling 1024 GB) and above, where
small block sizes become inefficient. So
unlike DOS there is no need to split up large disks into
multiple partitions to keep block size down. Use the 1 KB
default block size if possible. You may want to experiment with
a block size of 2 KB for some partitions, but expect to meet
some seldom exercised bugs: Most people use the default.
The MS-DOS file system is also known to lose large amounts of disk
space due to internal fragmentation. For partitions larger than 256
MB, DOS block sizes grow so large that they are no longer useful (This
has been corrected to some extent with FAT32). Ext2 does not force you
to choose large blocks for large file systems, except for very large
file systems in the 0.5 TB range (that's terabytes with 1 TB equaling
1024 GB) and above, where small block sizes become inefficient. So
unlike DOS there is no need to split up large disks into multiple
partitions to keep block size down. Use the 1 KB default block size if
possible. You may want to experiment with a block size of 2 KB for
some partitions, but expect to meet some seldom exercised bugs: Most
people use the default.
</para>
</sect2>
</sect1>