Linux SCSI subsystem overview

本文概述了 Linux 中的 SCSI 磁盘连接性,包括三层结构:特定设备类型驱动程序(如磁盘、磁带和 CD-ROM 驱动程序)、接近硬件的驱动程序(如 QLogic 和 Emulex 主机总线适配器驱动程序)以及将上层和下层驱动程序连接起来的 SCSI 核心层。

Linux SCSI subsystem overview

This topic provides an overview of SCSI disk connectivity.

The Linux SCSI subsystem consists of three layers:
  • The upper layer consists of specific device type drivers that are closest to user-space, such as the disk driver, tape driver, and CD-ROM driver.
  • The lower layer consists of drivers, such as the QLogic and Emulex host bus adapter (HBA) drivers, which are closest to the hardware.
  • The middle layer is the SCSI core that glues the upper and lower layer drivers together.
Depending on the kernel distribution, the drivers may be compiled into the kernel or built as modules which are loaded into the kernel. The sd driver is the SCSI disk driver, or block driver, which is named sd_mod when built as a module. The SCSI mid-layer driver is known as scsi_mod when built as a module.

Typically, in most distributions these drivers are built as modules and will be loaded at boot as part of the initrd images. If they are not loaded on boot, and are required at boot time, then an initrd image should be built to include them. For 2.4 kernels this is done by modifying the /etc/modules.conf file. For 2.6 kernels, this is done by modifying the /etc/modprobe.conf file and the /etc/sysconfig/kernel file. After modifying these files, the mkinitrd command needs to be run to pick up the changes.

To check if the drivers are built as modules and are currently loaded, check for sd_mod and scsi_mod in the lsmod command output. The following is example output:

# lsmod | grep sd
sd_mod                 13440 296
scsi_mod              104068   6  [qla2300 st sr_mod sg ncr53c8xx sd_mod]
Note: If the SCSI mid-layer driver is compiled as a module, it is important that scsi_mod is loaded before the upper and lower level drivers and unloaded last.
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值