What you need to know about local filesystems 2 – Creating and Managing Single-Instance Filesystems

How to do it…

Oracle Linux by default uses the XFS filesystem, but when doing the installation, you can use Btrfs as the root filesystem. If you want to use XFS as the boot filesystem, install it as you normally would. If you want to use Btrfs, then you should continue.

Note

Your boot filesystem can be different from the data filesystems on the server. You can easily have the root use XFS and the data filesystem use Btrfs, or vice versa.

The easiest way to run Btrfs is to pick it when doing an installation using the UEK boot disk. This will let you choose Btrfs as the destination filesystem. When running the install, select Install Destination, and then select a custom storage configuration. This will then give you the manual partitioning option where you can use the dropdown and select Btrfs, as seen in the following screenshot:

Figure 4.1 – Btrfs selection

When setting up the custom configuration, you can add additional directories for /var or /var/tmp (a secure technical implementation guide (STIG) requirement). These are actually not just directories, but subvolumes of the main volume. This is why they show the same available space:

Figure 4.2 – Btrfs mountpoints

This is because with Btrfs, they all use the same volume and have the same usable disk space. We can limit this later using quotas.

Finish the install using your normal settings for network and software source, though as a note, you will likely need to set Installation Source as a URL or local network share. You will also need to add the UEK repository if running 8.7 or earlier.

Once the system is booted, you will see that it is now using Btrfs. This can be checked once the system is up.

How it works…

You can check the filesystem in several ways, the easiest being by checking /etc/fstab to see how the filesystem was mounted. This is seen in the following screenshot:

Figure 4.3 – Btrfs fstab example

You can also use the df command with the T option to show the filesystem type. Running the following command will show you this info:


df -T

This will show the filesystem type for each mounted file, as seen in the following figure:

Figure 4.4 – df -T with Btrfs filesystems

Leave a Reply

Your email address will not be published. Required fields are marked *

All Rights Reserved 2022-2024