Linux disk partitioning, directory tree, file system relationship (RPM)

Source: Internet
Author: User

It has been studied for a long time, and it is not possible to find a proper way to get along with these concepts from the differences and connections of the three. For basic concepts and theoretical understanding is not in place, in the work will go a lot of detours and make a lot of mistakes. Today to spend a day, finally to the three differences and connections have a further understanding, hereby record and share, for everyone to discuss the exchange.

(a) disk partitioning

The first thing to understand is why the disk should be partitioned.

One is the data security considerations, and the second is the performance of the disk from the system to consider. A partition of a disk is corrupted, and data that is not in that partition will not be affected, which can effectively protect data from different businesses. An oversized disk partition can reduce the read and write performance of the system when it reads and writes, and partitioning speeds up access to a partition's data . As we search for files in the C disk, we look for the disk partition, but when the partition is too large, the search time will last long.

So, generally speaking. When there are unpartitioned disk devices in the configuration of the server, the disk partitions are the first to be made after the disk is installed.

After partitioning, the entire disk is divided into several separate disks. The data on these disk partitions is independent. Therefore, it is possible to create different file systems on different partitions without affecting the files of other partitions.

(ii) documentation System

  The concept of operating system is known to all, is the management of computer hardware and software resources of the system program, the bottom. So what is the way to organize and manage the most important resources, data, and files on the computer?

This requires a file system. a file system is an operating system that organizes and manages data and files .

The file system is not part of the computer's operating system, because there is no one operating system dedicated to it. the file system targets only files , not computers.

The file system is part of the computer's operating system, because no operating system requires files and requires a file system to operate.

Based on the different organization and management of the file, there are many file systems to choose from.

In the actual learning and production environment, there are basic file systems, log-type file systems, database-based file systems, network file systems, and Distributed file systems.

The significance of these file systems, that is, to solve the actual production process of data or file specific problems, such as the location of file access, file attributes, the speed of reading and writing, the number of files is huge and scattered, all need to organize and manage the file system.

Linux system can support many types of file systems, in the actual production process, the selection of the appropriate file system, on the disk in the file access has a key role.

In summary, a file system is a way to organize files or data.

(iii) directory tree

  Unlike the win system, the Linux system uses the directory tree, which is the file structure for file operation. The most critical of the directory tree is the root directory, access to a directory of files, also started from the root directory. Therefore, if you can access the file through the directory tree, the root directory must have a foot on the ground.

Imagine a scenario in which a directory tree is a file structure that exists in memory, and what should I do to access a disk through a directory tree? Then you need to mount the disk to the root directory or to a directory in the root directory. This allows access to the file under the directory through the directory into the directory where the disk is mounted, accessing the disk data.

Therefore, after the system starts, the root directory must be mounted, that is, a disk must be able to store the root directory. This process is usually automatically mounted.

(iv) disk partitioning, file system, directory tree relationships

  This is the time to understand the relationship between the three.

If I had a disk partition with data on it, how do I get the Linux system to access that data?

The answer is, of course, to create a Linux supported file system on this disk partition. If you create a file system in fat format, this time the disk partition is a file system, the disk partition can be supported by the win system and read the data inside, but can not be read by Linux.

If I had a disk partition with a Linux-supported filesystem, how would Linux read it?

The answer is Mount. Mount means to mount a disk to a directory. So that the Linux system can enter the disk partition.

If this time, the disk does not have the file system, or has the Linux not to support the file system, then the Linux also cannot read the disk data.

A summary is:

I want to read the data of a partition of a disk, first I have to format it to support the filesystem, so that the data above it I can identify; then I have to hang it on my system so that I can enter; It is through the mount point-the directory attached to the disk partition, into that directory, it entered the disk partition, but also through the file system to identify and manage data.

————————————————————————————————— the dividing line of PL ———————————————————————————————————————

Such a simple concept and relationship, I altogether for a long time did not understand.

In fact, in this process, it should be noted that:

1, why do you want to partition

2, why to format

3, why should I mount

Three steps to solve all problems, of course a Mount command and its options tell you all about it every second

Mount mount point file System type option mount device for file system type

Http://www.cnblogs.com/liwanliangblog/p/5153862.html

Linux disk partitioning, directory tree, file system relationship (RPM)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.