Life and times of the classic ext Linux filesystem
Extended Attributes
Version 2 of the ext filesystem was the first to offer the possibility to use extended attributes. One the best known of these attributes is the immutable bit: You can use the command chattr +i
as an administrator to protect a file against modification or deletion.
Moreover, the filesystem manages extended access privileges (Access Control Lists, or ACLs for short). ACLs make it possible to grant different users and groups access to files and directories – or to revoke this access. As you might expect, the extended attributes reside directly in the inode.
Another innovation from ext2 is multiple timestamps: The filesystem manages three different timestamps for files and folders (Figure 3). These timestamps allow tools such as ls
to see when the system last accessed an object or something last changed at the level of the inode or data.
Compressed
A few years after the release of ext2, the e2compr patch appeared on the web; this patch extends the ext2 driver in the Linux kernel to include support for compression [3]. e2compr only acts on files, while directories, inodes, superblocks, and other data related to the system remain unaffected.
After integrating the patch, you have the option of using
$ chattr +c <filename>
to set an extended attribute for a file. If you select a directory for compression, the system will automatically compress all newly added files.
Not Quite Perfect
Despite many advantages over the first ext version, ext2 struggled with various limitations. For example, because of an internal limit, a directory must not exceed 31,998 directories, although this number probably rarely plays a role in practice. Because of the way ext2 manages files, the filesystem gets into trouble if you have more than 10,000 files in a folder.
Ext2 is at least better than ext in terms of the maximum file size and filesystem size: With kernel versions 2.4 or later, an ext2 filesystem can weigh in at up to 16TB and manage files of sizes up to 2TB (assuming the block size is 4KB).
With a Linux kernel 2.4 or earlier, the size of block devices was still limited to 2TB, which thus also limited an ext2 filesystem to this size.
« Previous 1 2 3 4 Next »
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Linux Servers Targeted by Akira Ransomware
A group of bad actors who have already extorted $42 million have their sights set on the Linux platform.
-
TUXEDO Computers Unveils Linux Laptop Featuring AMD Ryzen CPU
This latest release is the first laptop to include the new CPU from Ryzen and Linux preinstalled.
-
XZ Gets the All-Clear
The back door xz vulnerability has been officially reverted for Fedora 40 and versions 38 and 39 were never affected.
-
Canonical Collaborates with Qualcomm on New Venture
This new joint effort is geared toward bringing Ubuntu and Ubuntu Core to Qualcomm-powered devices.
-
Kodi 21.0 Open-Source Entertainment Hub Released
After a year of development, the award-winning Kodi cross-platform, media center software is now available with many new additions and improvements.
-
Linux Usage Increases in Two Key Areas
If market share is your thing, you'll be happy to know that Linux is on the rise in two areas that, if they keep climbing, could have serious meaning for Linux's future.
-
Vulnerability Discovered in xz Libraries
An urgent alert for Fedora 40 has been posted and users should pay attention.
-
Canonical Bumps LTS Support to 12 years
If you're worried that your Ubuntu LTS release won't be supported long enough to last, Canonical has a surprise for you in the form of 12 years of security coverage.
-
Fedora 40 Beta Released Soon
With the official release of Fedora 40 coming in April, it's almost time to download the beta and see what's new.
-
New Pentesting Distribution to Compete with Kali Linux
SnoopGod is now available for your testing needs