linux下的存储设备摘记

本文详细介绍了Linux系统中硬盘的命名规则,包括IDE、SCSI和SATA等不同类型的硬盘如何被命名,以及这些命名背后的意义。此外还讨论了USB和1394接口存储设备在Linux中的表示方式。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在Linux中经常用到HD/SD之类的概念,但不知其具体代表什么,今天google了一翻。分享成果。也当成一篇学习笔记吧。
一、http://linuxplanet.com/linuxplanet/tutorials/4232/1/

Tutorial: Adding Additional Hard Drives in Linux
The Theory Behind Hard Drive Management

Alexander Prohorenko
Monday, June 3, 2002 10:36:33 AM

All hard disk drives in the Linux operation system have special names, which consist of three parts, two of which are listed here:

    * Two symbols "hd" or "sd" for the IDE and SCSI disk drives
    * One symbol somewhere in the range from "a" to "h" for the IDE disk drives, or the range from "a" to "p" for SCSI ones.

(I have to mention that for different Linux distributions, this range could differ. For example, Red Hat Linux 7.2 uses the range "a" to "l" for the IDE disk drives, and a range from "a" to "az" (two symbol combination!) for the SCSI drives).

This second symbol defines the number of device. SCSI disk drives use sorted numbering, which depends on the ID of device. The IDE scheme differs a bit. Let's
look at the scheme:

    * a and b - Master and Slave disks at the Primary interface of the 1st IDE controller
    * c and d - Master and Slave disks at the Secondary interface of the 1st IDE controller
    * e and f - Master and Slave disks at the Primary interface of the 2nd IDE controller
    * g and h - Master and Slave disks at the Secondary interface of the 2nd IDE controller

...and so on.

When you're connecting a new IDE disk to the motherboard you should always be ready to remember how was it connected: which interface of what controller is being used and how was it assigned: master or slave.

When you don't have a motherboard with four IDE controllers, or your server configuration has no additional IDE controllers, you should not have to use device names starting with "hde."

The third section of the naming scheme is:

    * Number of slices (partitions) - This is a number in a range from 1 to 16 for IDE hard drives and from 1 to 15 for SCSI hard drives.

All partitions are numbered next way: 1-4 - primary and extended, 5-16 (15) - logical. So, in one system we can have not more than five primary partitions and not more than 11 (10) logical partitions on one physical hard disk.

If this number is absent, this means that this name represents the entire hard drive.

To get list of disk names in a system we need to enter this command as 'root' superuser for IDE drives:

        # ls /dev/hd*

or

        # ls /dev/sd*

for SCSI drives.

二、http://commandline.org.uk/linux/disk-partitions-2007-10-21-23-59.html?showcomments=yes

Filing cabinets 101 - An introduction to disk partitions

Posted on Sun, 21 Oct 2007.

What are the types of disk?

This is somewhat academic for our needs at the moment, but I might as well cover this for completeness.

    * SCSI (commonly called Scuzzy) are used on servers and very high-end workstations from the late 1980s through to today.
    * Parallel ATA (PATA - also commonly called IDE, short for Integrated Drive Electronics), these were the standard PC hard disk type from the late 1980s through to the early 2000s, being much cheaper to produce than SCSI disks.
    * Serial ATA (SATA) - this is the newer type of disk, first introduced in 2003 and now the main type in brand new computers. SATA is also starting to give SCSI a run for its money on commodity/low-end servers.

Scuzzy and SATA disks are called SD, PATA disks are called HD.
——————————————————————————————————————————————
Discussion about 'Filing cabinets 101 - An introduction to disk partitions'

Bug
Memory Sticks - SD
IDE drives on Archlinux - SD as well [Don't ask me why they started to do that, maybe for easier sorting if people forget if it's hd or sd because they got those and those...].

Mon Oct 22 07:24:01 2007

Jonas
"Scuzzy and SATA disks are called SD, PATA disks are called HD"

Not necessarily. My PATA disk is (usually) also named SDx, this is in Kubuntu Gutsy. And the SATA disk sometimes get called HDx.

Mon Oct 22 08:51:06 2007

三、http://www.linuxsir.org/main/?q=node/127

在Linux系统中存储设备的两种表示方法

作者:北南南北
来自:LinuxSir.Org

usb及1394接口的存储设备和软驱设备;

usb存储设备也目前在内核中在两种驱动方法,一种是模拟SCSI硬盘,通过fdisk -l 出现的是/dev/sd[0-n] ;如果是模拟SCSI设备的方法来驱动。那usb 存储设备在Linux的另一种表示方法和前面所说的SCSI和SATA的相同;

但目前新版本的内核中,想抛弃模拟SCSI,我们通过fdisk 列系统存在的存储设置时会出现 /dev/uba 类似的;但目前这个驱动并不成熟,比如大数据量表现不稳定;其实USB接口的存储设备,在Linux表现还是比较差;

1394接口存储调备,在Linux中也是模拟SCSI,我们通过fdisk -l 后,出现的也是/dev/sd[0-n],另一种表示方法(sd[a-z],y)的理解请参照前面所说的; 1394接口的存储设备在Linux表现极好,USB存储如果相对1394接口的存储表现来说,应该不值不提,建议大家购买1394接口的存储设备;

软驱在Linux中,是/dev/fd0设备这是一般情况,另一种表示为fd0 ;

CDROM 或DVDROM ,以及COMBO ,一般的情况下是/dev/hdc ;看下面的例子,无论是 /dev/cdrom 还是/dev/dvd ,最后都指向了/dev/hdc;
[root@localhost ~]# ls -la /dev/cdrom
lrwxrwxrwx 1 root root 3 2005-12-14 /dev/cdrom -> hdc
[root@localhost ~]# ls -la /dev/dvd
lrwxrwxrwx 1 root root 3 2005-12-14 /dev/dvd -> hdc
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值