Get the App
SLTechnology News&Howtos  ›  Servers  › 

What is the establishment and labeling of the Linux file system and the entry of the file system?

Shulou Source: shulou.com Published: 2022-06-01 08:18:51 09月29日 Update

This article will explain in detail about the establishment and labeling of Linux file system and how to establish file system entrance. The content of the article is of high quality, so Xiaobian shares it with you as a reference. I hope you have a certain understanding of relevant knowledge after reading this article.

How to create a file system:

Ext4 is an extended journaled file system for ext3 systems, the fourth version of the original extended file system (ext or extfs) developed specifically for Linux. Ext4 offers better performance and reliability, as well as richer functionality.

Mkfs.ext4 /dev/sdb1

Use fdisk -l to see how many disks there are in the operating system. At present, you can see 2 disks,/dev/sdb1 and/dev/sdb2 respectively.

We want to set the file system label of/dev/sdb1 to test. We set it with the command e2label e2label /dev/sdb1 test and check whether the label is valid with e2label /dev/sdb1.

To create a file system entry to/etc/fstab, it is recommended to use logical expressions such as LABEL=test instead of/dev/sdb1. Logical expressions are better than physical expressions. Logical expressions are more flexible and easier to deploy.

Create mount points:

Usually we create mount points under the/mnt folder. In this case, we create a test directory, so we establish the association between the disk and the file system.

Mount file system:

By seeing that it is properly mounted, any action taken through/mnt/test is associated with/dev/sdb1, so that the file system is automatically mounted even after a reboot

Disk unloading method:

You can unmount this disk via umount /dev/sdb1, and you can check that the file system mount you just created has been unmounted via df-TH, and it will not be automatically associated the next time you boot.

About the establishment of Linux file system and add label and how to establish file system entrance is shared here, I hope the above content can be of some help to everyone, you can learn more knowledge. If you think the article is good, you can share it so that more people can see it.

Tags: System file disk entry logic association content article method more knowledge article yes original operating system no function reliability command suggestion Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Shulou Information Microsoft OPPO Reno NVidia