Knowing how the Linux file system works will not only help you to improve the overall efficiency of the system but also the number of requests to your applications, databases, and static files will improve dramatically. An efficient file system is essential for everyday system processes.
Here at LinuxAPT, as part of our Server Management Services, we regularly help our Customers to perform related Linux System files queries.
In this context, we shall look into How to Manage Linux File System on Ubuntu Server.
More about Linux File System
The first thing to do is to know what kind of file system do we have on the system. To figure out that, we will write the following command:
$ cat /etc/fstab
In our case, the root file system is using the ext4 file system. It has a name as sda2 which can be changed.
How to tune File System ?
A Tuned file system helps us to remove bad blocks in our disk and improve stability and speed.
Let's enter the following command on CLI and find out if it works:
$ sudo tune2fs -l /dev/sda2
How to Check Attributes Of Logical Volumes ?
Checking attributes of logical volumes help us to determine if a particular volume can be used for external logging or not. It helps with database systems where we keep errors and logs on a separate volume.
Let us run the command and understand the logical volumes of the ext4 file system. You need to be either rooted or use sudo to get access to logical volumes:
$ sudo lvdisplay
If you ever need to create new logical volumes, you must use lvdisplay to learn how to proceed instead of breaking your system.
How to Check Disk Stats For Optimal Performance ?
If we tell you that you can learn what is your disk's true stats are then you will probably jump out of your comfort zone. But, it is true. You can see the raw stats of your system.
If you do not have iostat package installed yet then it is time that you should install it:
$ sudo apt install iostat
Once installed simply run:
$ iostat -x
It will show you request size as avgrq-sz which shows how your disk is performing against requests.
If your disk's avgrq-sz is higher than 100.0 then it means it is performing optimally. Otherwise, you will need to improve it.
[Need assistance in fixing Linux system issues? We can help you. ]