Only one `/ dev/ sda` is a regular name. I don't know the difference between the other three` / dev/mapper/* `and` / dev/sd* `.

excuse me: fdisk-l disk / dev/sda , disk / dev/mapper/centos-root , disk / dev/mapper/centos-swap , disk / dev/mapper/centos-swap these four disks:

-sharp fdisk -l

 /dev/sda:1000.2 GB, 1000204886016 1953525168 
Units =  of 1 * 512 = 512 bytes
(/):512  / 4096 
I/O (/):4096  / 4096 
:dos
:0x000f3dfc

    Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     1026047      512000   83  Linux
/dev/sda2         1026048  1953523711   976248832   8e  Linux LVM

 /dev/mapper/centos-root:53.7 GB, 53687091200 104857600 
Units =  of 1 * 512 = 512 bytes
(/):512  / 4096 
I/O (/):4096  / 4096 


 /dev/mapper/centos-swap:8053 MB, 8053063680 15728640 
Units =  of 1 * 512 = 512 bytes
(/):512  / 4096 
I/O (/):4096  / 4096 


 /dev/mapper/centos-home:937.9 GB, 937867345920 1831772160 
Units =  of 1 * 512 = 512 bytes
(/):512  / 4096 
I/O (/):4096  / 4096 

I have a few questions:

  1. only one / dev/sda is a regular naming, and I don"t know the difference between the other three / dev/mapper/* and / dev/sd* .
  2. / dev/sda generally speaking, the hard disk connected to the server is plugged into the fixed place of the hard drive on the server, but what about the other three? Where did you put it?

/ dev/mapper/centos-root only 53.7 GB ,
/ dev/mapper/centos-swap only 8053 MB ,
/ dev/mapper/centos-home has 937.9 GB big, is it also plugged into the hard disk slot like sda? Or is it all the mapping of a hard disk under mapper , which also belongs to sda?

Feb.26,2021

you are using LVM ,

/ dev/sda is a disk device and belongs to a physical volume. You can view

using pvdisplay .

/ dev/mapper/centos-root this is a logical volume. You can view

using lvdisplay .

you can also use lsblk to view an overview of disks / volumes


Devices such as

/ dev/sdX refer to hard disk physical volumes, which will be displayed as long as you install them in the system.

/ dev/mapper/XXX are logical volumes. Unlike physical volumes, a logical volume can span multiple hard disks and can increase and reduce its space in real time. This flexibility has exceeded the ability of a single hard disk like sdX.

logical volumes are based on physical volumes, and the total size of all logical disks is less than or equal to the size of the hard disk installed in the device. For example, your server has a hard disk with a total space of 1T, and three logical disks are built on it:
/ dev/mapper/centos-root 53.7 GB,
/ dev/mapper/centos-swap 8053 MB,
/ dev/mapper/centos-home 937.9 GB
. You have used up all the space on your side. These three pieces must add up to 1T.
you can also narrow the centos-home to 450GB (lossless if the data is not used so much), and then create another logic disk.
you can think of these relationships as the table and the tablecloth on the table. You can put 1 square meter of tablecloth on one table, and you can spread 2 square meters of tablecloth for both of you, or you can only spread 0.5 square meters of tablecloth, but you can never spread more than 2 square meters of tablecloth.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e9cbb5-1902.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e9cbb5-1902.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?