lsscsi包默认是不安装的。lsscsi包安装完之后,lsscsi命令就可以使用了。下面说说在RHEL6.3 x86-64系统上安装lsscsi包的简要过程。
lsscsi命令(lsscsi -t)能很方便的看出哪些是固态硬盘(SSD),哪些是SATA盘,哪些是FC盘。
[root@rhel63single media]# yum list | grep lsscsi
Unable to read consumer identity
lsscsi.x86_64 0.23-2.el6 rhel-source
[root@rhel63single media]# yum list | grep iscsi
Unable to read consumer identity
iscsi-initiator-utils.x86_64 6.2.0.872-41.el6 rhel-source
[root@rhel63single media]# yum install iscsi*
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package iscsi-initiator-utils.x86_64 0:6.2.0.872-41.el6 will be installed
–> Finished Dependency Resolution
Dependencies Resolved
========================================================================================================================================================================
Package Arch Version Repository Size
========================================================================================================================================================================
Installing:
iscsi-initiator-utils x86_64 6.2.0.872-41.el6 rhel-source 654 k
Transaction Summary
========================================================================================================================================================================
Install 1 Package(s)
Total download size: 654 k
Installed size: 2.2 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : iscsi-initiator-utils-6.2.0.872-41.el6.x86_64 1/1
Installed products updated.
Verifying : iscsi-initiator-utils-6.2.0.872-41.el6.x86_64 1/1
Installed:
iscsi-initiator-utils.x86_64 0:6.2.0.872-41.el6
Complete!
[root@rhel63single media]# lsscsi
-bash: lsscsi: command not found
[root@rhel63single media]# which lsscsi
/usr/bin/which: no lsscsi in (/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
—>我本来的推测是安装了iscsi包之后,lsscsi命令就能看到了,其实从上面的输出可以看出不是这样的。
[root@rhel63single media]# yum install lsscsi*
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package lsscsi.x86_64 0:0.23-2.el6 will be installed
–> Finished Dependency Resolution
Dependencies Resolved
========================================================================================================================================================================
Package Arch Version Repository Size
========================================================================================================================================================================
Installing:
lsscsi x86_64 0.23-2.el6 rhel-source 38 k
Transaction Summary
========================================================================================================================================================================
Install 1 Package(s)
Total download size: 38 k
Installed size: 75 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : lsscsi-0.23-2.el6.x86_64 1/1
Installed products updated.
Verifying : lsscsi-0.23-2.el6.x86_64 1/1
Installed:
lsscsi.x86_64 0:0.23-2.el6
Complete!
[root@rhel63single media]# which lsscsi
/usr/bin/lsscsi
[root@rhel63single media]# lsscsi -l
[1:0:0:0] cd/dvd NECVMWar VMware IDE CDR10 1.00 /dev/sr0
state=running queue_depth=1 scsi_level=6 type=5 device_blocked=0 timeout=30
[2:0:0:0] disk VMware, VMware Virtual S 1.0 /dev/sda
state=running queue_depth=32 scsi_level=3 type=0 device_blocked=0 timeout=30
[2:0:1:0] disk VMware, VMware Virtual S 1.0 /dev/sdb
state=running queue_depth=32 scsi_level=3 type=0 device_blocked=0 timeout=30
—>注意看上面的输出。
[root@rhel63single media]# uname -a
Linux rhel63single 2.6.32-279.el6.x86_64 #1 SMP Wed Jun 13 18:24:36 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux
[root@rhel63single media]# uname -r
2.6.32-279.el6.x86_64
[root@rhel63single media]#
更多RedHat相关信息见RedHat 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=10
本文永久更新链接地址:http://www.linuxidc.com/Linux/2015-02/113117.htm