In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article will explain in detail whether the hard disk of linux is partitioned or not. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
Linux's hard disk is partitioned; hard disk partitions are mainly divided into basic partitions and extended partitions, the sum of the number of basic partitions and extended partitions can not be greater than four, and basic partitions can be used immediately but can no longer be partitioned, extended partitions can only be used after partitions.
The operating environment of this tutorial: linux7.3 system, Dell G3 computer.
Linux's hard drive partition?
Linux disk partitions are mainly divided into basic partitions (primary partion) and extended partitions (extension partion). The sum of the number of basic partitions and extended partitions cannot be more than four. And the basic partition can be used immediately but can no longer be partitioned. The extended partition must be partitioned again before it can be used, that is to say, it must also be partitioned twice.
In Linux, every hardware device is mapped to a system file, and IDE or SCSI devices such as hard drives and optical drives are no exception. Linux assigns a file of hd prefixes to various IDE devices, and a file of sd prefixes to various SCSI devices.
All the hardware devices in the Linux system are represented and used in the form of files, that is to say, if you want to use a hardware device, you first need to mount it to a directory and operate the device through the operation of this directory; if not, you can check and find the hardware device through the graphical interface system in the Linux system, but the command line cannot find it.
Not any directory under the root directory can be used as the mount point, because the mount operation will make the files in the original directory hidden, so the root directory and the original directory of the system should not be used as the mount point, which will cause system exception or even crash. The mount point had better be a new empty directory.
The same is true for disks. Disk files are stored in the / dev directory. The naming rules for disk device files are as follows:
Primary setting number + secondary setting number + disk partition number
Common major equipment numbers are: sd,hd; they represent different disk types: sd stands for IDE hard disk, hd stands for SCSI hard disk
The secondary number is the order of the same type of devices, denoted by [amurz], / dev/sda for the first disk of type IDE, and / dev/sdb for the second disk of type IDE.
Disk partition number, each disk will be divided into multiple partitions (described below), each partition will have a number, for example: / dev/sda1 indicates that this is the first partition of the disk, and so on
Disk partition
In Linux, each hard disk device can only be divided into four primary partitions; if an extended partition is divided, it can be divided into up to three primary partitions; it can be expressed as:
P+P+P+P or P+P+P+E
There are only four main partitions plus extended partitions at most; all of them can be divided into primary partitions or one primary partition; but there is only one extended partition at most; extended partitions cannot be used directly, and can be further divided into logical partitions; an extended partition can be divided into multiple logical partitions
The partition number of the main partition is: 1 ~ 2 ~ 3 ~ 4; the number of the logical partition divided from the extended partition starts at 5 and accumulates next.
Why can only be divided into four primary partitions at most?
This has something to do with system startup; when you start your computer, you will first load BIOS information, which contains information about Cpu and other hardware devices; find it and the computer will know how to start it.
Next, it goes to MBR (Master Boot Record), the master boot record; in order to facilitate BIOS's search, it is placed in the first sector on track 0 on the disk, each with 512 bytes; although it is only a little larger, it needs to store three pieces of information:
MBR occupies 446 bytes
Disk partition table occupies 64 bytes
The end identifier takes up two bytes
The disk partition table has a total of 64 bytes, and each partition information accounts for 16 bytes, so there can only be four primary partitions
This is the end of this article on "whether linux's hard disk is partitioned or not". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please 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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.