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
-
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
-
Juno Computers Launches Another Linux Laptop
If you're looking for a powerhouse laptop that runs Ubuntu, the Juno Computers Neptune 17 v6 should be on your radar.
-
ZorinOS 17.1 Released, Includes Improved Windows App Support
If you need or desire to run Windows applications on Linux, there's one distribution intent on making that easier for you and its new release further improves that feature.
-
Linux Market Share Surpasses 4% for the First Time
Look out Windows and macOS, Linux is on the rise and has even topped ChromeOS to become the fourth most widely used OS around the globe.
-
KDE’s Plasma 6 Officially Available
KDE’s Plasma 6.0 "Megarelease" has happened, and it's brimming with new features, polish, and performance.
-
Latest Version of Tails Unleashed
Tails 6.0 is based on Debian 12 and includes GNOME 43.
-
KDE Announces New Slimbook V with Plenty of Power and KDE’s Plasma 6
If you're a fan of KDE Plasma, you'll be thrilled to hear they've announced a new Slimbook with an AMD CPU and the latest version of KDE Plasma desktop.
-
Monthly Sponsorship Includes Early Access to elementary OS 8
If you want to get a glimpse of what's in the pipeline for elementary OS 8, just set up a monthly sponsorship to help fund its continued existence.