Linux Format

Filesystem­s

Keep your files secret, keep your files safe…

-

Filesystem­s are incredibly low level and while a choice is generally offered when installing a Linux distro, most of us select the default. On one hand, this fine, because the options made available by the distributi­on makers are all suitable for everyday users. What we will discuss here is some of the features available in more modern filesystem­s.

Extended 4 (ext4) has a long history and is still the standard for a fair number of distros. It is incredibly stable and has journallin­g, which helps it automatica­lly recover files that haven’t been fully written, due to a power failure or similar issues. Other filesystem­s have more features and some of them can be used from a single-disk system all the way to petabyte arrays.

Now the default on a number of distributi­ons is Btrfs, pronounced Butter-FS or Better-FS. Btrfs has a number of features that are not available with ext4 or XFS. Copy-on-write is a technique used to allow snapshots to be made of the filesystem, which are initially zero in size. When changes are made to the filesystem, the snapshot grows. Btrfs also uses checksummi­ng to allow data to be recovered from scenarios that would otherwise leave data corrupted. Snapshots can be sent to other Btrfs volumes, so can be received as well. In this way, block-based backups of entire filesystem­s can be sent over network connection­s for safe storage. Data restores can be carried out in a same way.

Tools such as grub-btrfs can be used to boot from snapshots, which is really useful should updates fail – to utilise this, you would need to ensure that you have a snapshot in place before carrying out potentiall­y destructiv­e operations.

A to ZFS

ZFS was originally developed for Solaris and is an incredibly well-respected filesystem with a history that goes back around 18 years. In fact, ZFS is more than a filesystem and acts as a disk management solution as well. It is highly recommende­d that ZFS directly controls the disks, so that it can most effectivel­y be used to set up various zRAID options, such as a single, dual or three-disk parity array. ZFS is also a copy-on-write filesystem, has native support for checksummi­ng, which is used to ensure data can be recovered even when issues occur on the disk, and has support for encryption and compressio­n as well. ZFS can also be set up with other advanced features, such as being able to add SSDs/NVMe disks as a cache disk to help with speedily writing data, which is then written to the slower spinning platter disks.

ZFS can be used with Linux, but due to licensing concerns, it can be difficult to include with Linux – although Canonical has shipped Ubuntu with ZFS for years now and has clearly carried out it own legal analysis of the situation.

Tools such as the ZFSBootMen­u bootloader can be used to boot a Linux system from a ZFS boot system. This is particular­ly powerful because it means that should a filesystem snapshot be taken before a piece of software or an update is installed, an earlier snapshot can still be booted from should there be any issues with the installati­on or update process.

While it cannot currently be recommende­d, Canonical’s ZSys tool was designed to allow booting from ZFS snapshots and it would also ensure that snapshots were taken every time an install or upgrade operation was taken. ZSys has not seen any commits for a number of months now, unfortunat­ely.

While looking at filesystem­s and functional­ity that our next-generation distributi­ons can utilise, we should mention one to watch for the future. Bcachefs will be included in the 6.7 version of the Linux kernel, which means that it can undergo lots more testing. Bcachefs can also use the copy-on-write system and supports checksummi­ng, encryption, compressio­n and snapshots. Bcachefs describes itself as being as reliable and robust, and having the features expected of a modern operating system.

 ?? ??
 ?? ?? BlendOS Released: 2023 Apps: Various PM: bpkg
FS: OverlayFS Desktop: Gnome, KDE, others Features: Atomic, declarativ­e, immutable
BlendOS Released: 2023 Apps: Various PM: bpkg FS: OverlayFS Desktop: Gnome, KDE, others Features: Atomic, declarativ­e, immutable

Newspapers in English

Newspapers from Australia