A filesystem is a permanent storage for containing data. Any non-volatile storage device like hard disk, usb etc has a filesystem in place, on top of which data is stored.
While installing Linux, you may opt for either EXT4 or EXT3 file system.
A journaling filesystem: logs changes in a journal to increase reliability in case of power failure or system crash.
Not as fast as others, like JFS, ReiserFS and XFS, but wins in CPU utilization, reliability, and testing base.
Ext3 file limits
The following table shows file limits of a EXT3 files system.
Ext3 levels of journaling
- Lowest risk, slowest
- Metadata and files are written to the journal before being committed.
- Ordered (default)
- Medium risk, medium speed
- Metadata is written to the journal only - ext3 guarantees file contents are written to disk before marked as committed in the journal. Beware of "intermediate state" problem!
- Highest risk, fastest
- Metadata is written in a journal, no guarantee for file contents.
EXT4 is an advanced file system supported from Ubuntu 9.04. This filesystem supports 64-bit storage limits, columns up to 1 exabytes and you may store files up to 16 terabytes.
Moreover, it supports improved large file performance and reduced fragmentation which in turn enhances performance.
- Adds 64-bit storage limits.
- Volumes up to 1 exabyte. Files up to 16 terabytes.
- Improved large file performance and reduced fragmentation.
- Backward compatible with ext2 and 3.
- Journal checksumming (not present in ext3).
- Online defragmentation.
- Timestamps in nanoseconds.
If we compare both of the above-mentioned files systems, then you will find that EXT4 has some more advanced features than it's older counter part. But at the same time, EXT3 is lighter than EXT4 and thus faster than that of a EXT4. But keeping the high amount of RAM used nowadays in even Desktop Computers that speed issues have become almost negligible. So, it is recommended that you use EXT4 for latest versions of Linux installations.
Files and directories
Filesystems store data in files and directories. Filesystems are stored in disk partitions. You can configure partitions any way you like, but something like this is advisable:
Usually, when you install Linux, it offers you options for creating various partitions to store a different kind of files, both system and user generated. But if you go with the default, Linux has got pre-defined set of directories and files which are used to store various kind of data, The following table shows which data is stored in which file.
|/usr||This is where most executable binaries, the kernel source tree and much documentation go.|
|/var||var directory is used mainly for different log files. Log files are very important for troubleshooting and monitoring. For example, if you got some .This is where spool directories such as those for mail and printing go. In addition, it contains the error log directory|
|/tmp||This is where most temporary data file stored by apps.|
|/boot||This is where your kernel images and boot loader configuration go.|
|/home||This is where user home directories go.|
fstab: static fs info
fstab is a text file that contains filesystem information
df: Partition utilization
df stands for "disk free"
The mount command attaches a filesystem to a mount point
Remount /usr in read only:
mount -o remount, ro /usr
In continuation after the press enter key of mount -o remount command show these result
Mount all fs in /etc/fstab:
File & directory commands
|Is||List the contents of a directory|
|pwd||Print the present working directory|
|file||Print the presumed type of a file|
|chmod||Change the permission attributes of a file|
New Exercises:R Programming