Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are three sets of hard disk partitioning schemes in centos system

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the three sets of hard disk partition scheme of centos system, the content is very detailed, interested friends can refer to, hope to be helpful to you.

(1) option 1

/: the recommended size is above 5GB.

Swap: swap partition, which is recommended to be 1-2 times the size of physical memory.

(2) option 2

/ boot: used to store programs related to Linux system startup, such as starting the bootloader, etc. The recommended size is 100MB.

/: the root directory of the Linux system. All directories are hung under this directory. The recommended size is above 5GB.

/ home: stores the data of ordinary users and is the host directory for ordinary users. The recommended size is the rest of the space.

Swap: implement virtual memory, which is recommended to be 1-2 times the size of physical memory.

(3) option 3

/ boot: used to store programs related to Linux system startup, such as starting the bootloader, etc. The recommended size is 100MB.

/ usr: used to store applications in Linux system, which has a lot of related data, which is recommended to be greater than 3GB.

/ var: used to store frequently changing data and log files in Linux system. It is recommended to be greater than 1GB.

/ home: stores the data of ordinary users and is the host directory for ordinary users. The recommended size is the rest of the space.

/: the root directory of the Linux system. All directories are hung under this directory. The recommended size is above 5GB.

/ tmp: keep the temporary disk in a separate partition to avoid affecting the stability of the file system when the file system is full. The recommended size is above 500MB.

Swap: implement virtual memory, which is recommended to be 1-2 times the size of physical memory.

Disk partition configuration

If it is a brand new hard drive, the following error message may occur, which only informs you that the installer cannot find the partition table and there is no need to worry. At this point, just press the "Yes" button, as shown in the following figure.

(1) Partition mode

As mentioned earlier, disk partitioning is the most important part of the installation process. The CentOS preset gives us four partition modes, which are:

Delete all partitions on the selected disk and create a default partition structure:

If you choose this mode, your hard disk will be used by Linux, and after all the partitions in the hard disk have been deleted, re-establish the partition structure in the default way of the installer. Pay special attention to the use!

Delete the Linux partition on the selected driver and create a default partition structure:

On this hard drive, only Linux partitions are deleted and then re-created in the default way of the installer.

Use the free space in the selected drive and create a default partition structure:

If there is still undivided disk space in your hard drive (note that it is undivided, not that there is no data in the partition!) After using this project, he will not change the original partition, but will only build the default partition for the remaining undivided blocks.

Establish a custom partition structure:

That's what we're going to use! Do not use the default split method of the installer, use the split method we need to deal with it.

(2) default partition mode

The following figure shows the disk partition settings dialog box, select default (delete the Linux partition on the selected driver and create the default partition structure). Click the "next" button, appear the prompt shown in the following figure, click the "Yes" button, next appear the system default disk settings shown in the following figure, and click the "next" button.

(3) Custom partition mode

The following figure shows the disk partition settings dialog box, select "establish a custom partition structure". Create four partitions, namely /, / boot, / home and swap.

The following partition window appears when you press' next'. This picture is mainly divided into three blocks:

At the top is a schematic diagram of the partition of the hard disk. At present, because the hard disk is not partitioned, it presents a whole block and the words Free. In the middle is the command area, and below is the device file name, mount point directory, file system type, whether formatting is required, partition capacity size, starting and ending column numbers, and so on.

As for the instruction area, there are a total of six blocks, of which RAID and LVM are special applications for hard drives, which we will cover separately. As for the other instructions, the functions are as follows:

New: add a new partition, that is, perform a partition action to create a new disk partition

Edit: edit the existing disk partition. You can click on the partition you want to modify in the actual display area, and then click 'Edit' to edit the partition.

Delete: delete a disk partition. Similarly, you have to click on the partition you want to delete in the actual display area.

Reset: restore the original disk partition state.

Tips: it is important to note that your system cannot be exactly the same as the author's system, so the hard disk information on your screen should not be the same as the author's. So don't be too nervous when you see the difference, that's normal.

Next, create a partition for the root directory (/). After pressing "New", the following screen appears. Since the root directory we need is the file system that uses Linux, the default is the file system ext3. As for the mount point, you can enter it manually or select it with the mouse. Finally, enter the disk capacity you need in the size (MB). However, since the author has only one hard drive in this system, he is not free to choose from the "allowed drive".

The final result of creating the / boot partition is as follows. He will take the initiative to move the special directory / boot to the front of the hard drive, so you will see that the partition of / boot is / dev/hda1, and the starting pillar is number 1. The situation is shown in the following figure:

Tips: some installers will have a warning message when you do not specify a swap of 1 / 2 times memory. Just ignore the warning message and press next.

Let's continue to complete the last partition / home, press "New" in the figure above, and fill in the correct information in order, including mount point, file system type, size, and so on.

The final result of the partition is shown in the following figure. You will find that the system automatically changes / dev/hda4 into an extended partition. Then all the capacity is given to / dev/hda4, and the swap is allocated to / dev/hda5.

In the figure above, continue to press "New" to swap space (swap). As mentioned above, because swap is a swap space, there is no need for a mount point. So, as shown in the following figure, select "swap" at File system Type.

The file system types are:

Ext2/ext3: is the file system type that Linux applies to. As the ext3 file system has more log records, the recovery of the system is relatively fast, so it is recommended that you must choose a new ext3 instead of using ext2.

Physical volume (LVM): this is a mechanism used to flexibly adjust the capacity of your file system, which can make your file system larger or smaller without changing the original file content.

Software RAID: using the characteristics of Linux operating system, the function of disk array is simulated by software.

Swap: it's just swap space! Since swap does not use the mount of the directory tree, there is no need to specify the mount point with swap.

Vfat: file system type supported by both Linux and Windows. If you have both Windows and Linux operating systems in your host hard disk, you can indeed build a vfat file system for data exchange.

We continue to press New to create the / boot partition. Fill in the correct information in order, including mount point, file system type, size, etc. Be sure to keep the partition at the front of the entire hard drive. Therefore, we chose to force the primary partition for / boot. As shown in the following figure:

If you want to know what other file system types Linux supports, click the ext3 button in the image above and the following screen will appear.

On the centos system three sets of hard disk partition scheme is shared here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report