Home>Article>Operation and Maintenance> What is the difference between sda and sdb in linux

What is the difference between sda and sdb in linux

WBOY
WBOY Original
2022-07-26 16:55:35 12531browse

The difference between sda and sdb in Linux is: sda represents the first disk device of the scsi hard disk, and sdb represents the second disk device of the scsi hard disk. Among them, sd represents the 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.

What is the difference between sda and sdb in linux

#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.

What is the difference between sda and sdb in Linux

  • sda1 Explanation: sd represents scsi hard disk, a represents the first hard disk, 1 represents the first master Partition

  • sdb1 Explanation sd represents the scsi hard disk b represents the second hard disk 1 represents the first primary partition

The partitions on each SCSI disk are 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 names

Linux disk and partition names may differ from other operating systems. You need to know the name Linux uses when creating and mounting the partition.

The following is the basic naming scheme:

The first floppy drive is named /dev/fd0.

The second floppy drive is named /dev/fd1.

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

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

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

The partitions on each SCSI disk are 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 2 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 (i.e. controllers), the order of the drives may be confused. In this case, the best solution is to observe the boot messages, assuming you know the drive model and/or capacity.

What is the difference between sda and sdb in linux

Recommended learning:Linux video tutorial

The above is the detailed content of What is the difference between sda and sdb in linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn