SCSI add-single-device and remove-single-device
众所周知,SATA和SCSI是支持热插拔的,但是新装了这类支持热插拔的驱动器,系统不会马上识别的,往往我们需要重启系统来识别,但是有另外一种方法可以很方面的让系统识别新的设备。 作为系统管理员,需要了解的最有用内容是,在有热交换驱动器情况下,如何不重启系统就可以添加更多磁盘空间。假使不使用 /proc,您可以插入驱动器,但为了使系统识别新磁盘,必须随即重新引导系统。
这里,可以用以下命令来使系统识别新的驱动器:
# echo "scsi add-single-device w x y z" > /proc/scsi/scsi
为使该命令正常运行,必须指定正确的参数值 w、x、y 和 z,如下所示:
w 是主机适配器标识,第一个适配器为零(0)
x 是主机适配器上的 SCSI 通道,第一个通道为零(0)
y 是设备的 SCSI 标识
z 是 LUN 号,第一个 LUN 为零(0) 相反的,在不重新引导系统的情况下将设备从系统中除去的命令是:
echo "scsi remove-single-device w x y z" > /proc/scsi/scsi
在输入这条命令并将热交换 SCSI 磁盘从系统中除去之前,请确保首先卸下已从该磁盘安装的任何文件系统。先用 cat /proc/partitions 看看系统认没有认该硬盘。
例如:
添加硬盘并查看
# echo "scsi add-single-device 0 0 1 0" >/proc/scsi/scsi
# fdisk -l
删除硬盘并查看
# echo "scsi remove-single-device 0 0 1 0" >/proc/scsi/scsi
# fdisk -l 我在vmware station虚拟机中,不关机新添加了2块scsi硬盘做而来实验: # echo "scsi add-single-device 0 0 1 0" > /proc/scsi/scsi
# echo "scsi add-single-device 0 0 2 0" > /proc/scsi/scsi
# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: VMware, Model: VMware Virtual S Rev: 1.0
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi0 Channel: 00 Id: 01 Lun: 00
Vendor: VMware, Model: VMware Virtual S Rev: 1.0
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi0 Channel: 00 Id: 02 Lun: 00
Vendor: VMware, Model: VMware Virtual S Rev: 1.0
Type: Direct-Access ANSI SCSI revision: 02 上面的代码表示已经找到了新加的2块硬盘
SCSI add-single-device and remove-single-device的更多相关文章
- Docker - 解决在容器内删除和主机映射的目录而报错 rm: cannot remove 'webapps': Device or resource busy 的问题
问题背景 docker run -d --name tomcat7 -v /usr/local/tomcat/webapps:/usr/local/tomcat/webapps tomcat:7 使用 ...
- 【总文档】rac增加新节点的方法步骤 How to Add Node/Instance or Remove Node/Instance in 10gR2, 11gR1, 11gR2 and 12c Oracle Clusterware and RAC
[总文档]How to Add Node/Instance or Remove Node/Instance in 10gR2, 11gR1, 11gR2 and 12c Oracle Clusterw ...
- Is an MTD device a block device or a char device?
转:http://www.linux-mtd.infradead.org/faq/general.html#L_mtd_what Note, you can find Ukranian transla ...
- "The connection for the USB device '###' was unsuccessful. The device is currently in use"
一.问题描述 1.情景描述 笔者的物理主机系统是“windows7 64位”,想使用“摄像头录像大师”.这个软件在录制视频的过程中,需要调用windows自带的"windows media ...
- tensorflow报错:Attempting to fetch value instead of handling error Internal: failed to get device attribute 13 for device 0: CUDA_ERROR_UNKNOWN:
就是在spyder跑上一篇文章的代码然后就报错: Attempting to fetch value instead of handling error Internal: failed to get ...
- rm: cannot remove ‘overlay/’: Device or resource busy
umount /var/lib/docker/overlay #取消挂载就可以啦 rm -rf overlay/
- rm: cannot remove `dir': Device or resource busy解决办法
使用df查看系统发现: [ops@bs038 cm-5.4.0]$ df -hFilesystem Size Used Avail Use% Mounted on/dev/sda3 1.1T 200G ...
- [platform]linux platform device/driver(二)--Platform Device和Platform_driver注册过程之详细代码
转自:http://www.cnblogs.com/haimeng2010/p/3582403.html 目录: 1.platform_device注册过程 2.platform_driver注册过程 ...
- Architecture of Device I/O Drivers, Device Driver Design
http://www.kalinskyassociates.com/Wpaper4.html Architecture of Device I/O Drivers Many embedded syst ...
- [platform]linux platform device/driver(三)--Platform Device和Platform_driver注册过程之代码对比
转自:http://blog.csdn.net/thl789/article/details/6723350 Linux 2.6的设备驱动模型中,所有的device都是通过Bus相连.device_r ...
随机推荐
- 解读人:刘杰,Targeted Quantitative Kinome Analysis Identifies PRPS2 as a Promoter for Colorectal Cancer Metastasis(PRM-磷酸化激酶定量发现结肠癌转移促进因子-PRPS2)
关键词:PRM,kinase,colorectal cancer, metastasis, PRPS2 来自加州大学河滨分校的Yinsheng Wang教授应用PRM技术筛选出介导结肠癌细胞转移促进因 ...
- iOS获取手机型号、iOS获取当前app的名称和版本号
NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary]; CFShow(infoDictionary); // ap ...
- Uva12174
#include <bits/stdc++.h> using namespace std; ; int t; int s,n; ]; ]; ]; void init(){ memset(a ...
- Flask&&人工智能AI --4
一.flask请求上下文源码解读 通过上篇源码分析,我们知道了有请求发来的时候就执行了app(Flask的实例化对象)的__call__方法,而__call__方法返回了app的wsgi_app(en ...
- 非局部均值去噪(NL-means)
非局部均值(NL-means)是近年来提出的一项新型的去噪技术.该方法充分利用了图像中的冗余信息,在去噪的同时能最大程度地保持图像的细节特征.基本思想是:当前像素的估计值由图像中与它具有相似邻域结构的 ...
- 007 Reverse Integer 旋转整数
Given a 32-bit signed integer, reverse digits of an integer.Example 1:Input: 123Output: 321Example ...
- jdbc 大数据存储 图片读取
package com.itheima.clob.test; import java.io.File; import java.io.FileReader; import java.io.FileWr ...
- Xpath定位绝密版本
xpath的作用就是两个字“定位”, 运用各种方法进行快速准确的定位,推荐两个非常有用的的firefox工具:firebug和xpath checker 在 XPath 中, 有七种类型的节点:元素. ...
- js 限制文本框不能输入单引号
<input onkeydown="if(event.keyCode==32||event.keyCode==188||event.keyCode==222){return false ...
- Spring scope 配置
Scope 描述的是 Spring 容器如何新建Bean的实例,Spring的Scope有以下几种,通过@Scope来注解实现: 1. Singleton: 一个Spring容器中只有一个Bean的实 ...