What are the differences between sda and sdb in linux?

11-17-2023

Designed for programming, automatic code writing robot, free to open. This article mainly introduces the knowledge about the differences between sda and sdb in linux. The content is detailed and easy to understand, and the operation is simple and quick, which has certain reference value. I believe that everyone will gain something after reading this article about the differences between sda and sdb in linux. Let's take a look at it together.

The difference between sda and sdb in linux is that sda stands for the first disk device of scsi hard disk and sdb stands for the second disk device of scsi hard disk. Where sd stands for scsi hard disk, the partition on each scsi disk is represented by adding a decimal number after the disk name, for example, sda1 and sda2 represent the first and second partitions of the first SCSI disk drive in the system.

Operating environment of this tutorial: linux7.3 system and Dell G3 computer.

The difference between sda and sdb in linux sda1 explains that sd stands for scsi hard disk A stands for the first hard disk 1 stands for the first main partition.

Sdb1 explains that sd stands for scsi hard disk, B stands for the second hard disk, and 1 stands for the first main partition.

The partition on each SCSI disk is represented by adding a decimal number after the disk name: sda1 and sda2 represent the first and second partitions of the first SCSI disk drive in the system.

Linux device name

Linux disks and partitions may have different names from other operating systems. You need to know the name that Linux uses when creating and mounting partitions.

The following is the basic naming scheme:

The first floppy disk drive is named /dev/fd0.

The second floppy drive is named /dev/fd1.

The first hard disk detected is called /dev/sda.

The second hard disk detected is named /dev/sdb, and so on.

The first SCSI CD-ROM was named /dev/scd0, also known as /dev/sr0.

The partition on each SCSI disk is represented by adding a decimal number after the disk name: sda1 and sda2 represent the first and second partitions of the first SCSI disk drive in the system.

Suppose you have a system with two SCSI disks, one at SCSI address 2 and the other at SCSI address 4. The first disk (address 2) is named sda, and the second disk is named sdb. If there are 3 partitions on the sda drive, these partitions will be named sda1, sda2 and sda3. The same applies to sdb disks and their partitions.

Note that if you have two SCSI host bus adapters (that is, controllers), the order of the drives may be confused. In this case, the best solution is to observe the boot message, assuming you know the drive model and/or capacity.

What are the differences between sda and sdb in linux? That's all for this article. Thank you for reading! I believe that everyone has a certain understanding of the differences between sda and sdb in linux. If you want to learn more knowledge, please pay attention to the billion-speed cloud industry information channel.

Ask AI for details

Copyright Description:No reproduction without permission。

Knowledge sharing community for developers。

Let more developers benefit from it。

Help developers share knowledge through the Internet。

Follow us