Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 1

Modern Linux filesystem(s) keep fragmentation at a minimum by keeping all blocks in a

file close together, even if they can't be stored in consecutive sectors. Some filesystems,
like ext3, effectively allocate the free block that is nearest to other blocks in a file.
Therefore it is not necessary to worry about fragmentation in a Linux system."[19]

While ext3 is more resistant to file fragmentation than the FAT filesystem, nonetheless
ext3 filesystems can get fragmented over time or on specific usage patterns, like slowly-
writing large files.[20][21] Consequently the successor to the ext3 filesystem, ext4, includes
a filesystem defragmentation utility and support for extents (contiguous file regions).

There is no support of deleted file recovery in file system design. Ext3 driver actively
deletes files by wiping file inodes[22] for crash safety reasons. That's why accidental 'rm
-rf ...' may cause permanent data loss.

What is a Journaling Filesystem?

A journaling filesystem keeps a journal or log of the changes that are being made to the
filesystem during disk writing that can be used to rapidly reconstruct corruptions that
may occur due to events such a system crash or power outage. The level of journaling
performed by the file system can be configured to provide a number of levels of logging
depending on your needs and performance requirements.

A journaled file system records information in a log area on a disk (the journal and log do
not need to be on the same device) during each write. This is a essentially an "intent to
commit" data to the filesystem. The amount of information logged is configurable and
ranges from not logging anything, to logging what is known as the "metadata" (i.e
ownership, date stamp information etc), to logging the "metadata" and the data blocks
that are to be written to the file. Once the log is updated the system then writes the actual
data to the appropriate areas of the filesystem and marks an entry in the log to say the
data is committed.

After a crash the filesystem can very quickly be brought back on-line using the journal
log reducing what could take minutes using fsck to seconds with the added advantage that
there is considerably less chance of data loss or corruption.

You might also like