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 ...
随机推荐
- 1、gitlab的理论知识
2.1 svn与git对比 . svn git 分布式 不是 是 在线阅读 不支持 不仅支持,而且可以在线编辑 存储方式 按文件 按元数据 完整性 一般 优 离线工作 日志都没法看 完全没问题 分支 ...
- 关于php命名空间的理解
以phpmailer这个类库为例,composer自动加载好该类库,有用的文件都放在src这个目录下 这些文件的命名空间都是这个:namespace PHPMailer\PHPMailer; 如果我们 ...
- thinkphp5更新时验证数据
在编辑页面form表单中添加一个隐藏域:<input type="hidden" name="表中id字段名" value="get方式传过来的 ...
- POJ1014 Dividing
题目来源:http://poj.org/problem?id=1014 题目大意: Marsha和Bill拥有一些弹珠.但是这些弹珠的价值不一样.每个弹珠的价值都是1到6之间的自然数.他们希望把这些弹 ...
- springMvc json 参数
以前,一直以为在SpringMVC环境中,@RequestBody接收的是一个Json对象,一直在调试代码都没有成功,后来发现,其实 @RequestBody接收的是一个Json对象的字符串,而不是一 ...
- Git 2016视频教程
http://blog.csdn.net/biggbang/article/details/50830331
- Java中只有按值传递,没有按引用传递!(两种参数情况下都是值传递)
今天,我在一本面试书上看到了关于java的一个参数传递的问题: 写道 java中对象作为参数传递给一个方法,到底是值传递,还是引用传递? 我毫无疑问的回答:“引用传递!”,并且还觉得自己对java的这 ...
- koa2 从入门到进阶之路 (五)
之前的文章我们介绍了一下 koa 中使用 ejs 模板及页面渲染,本篇文章我们来看一下 koa post提交数据及 koa-bodyparser中间件. 在前端页面中,不免会用到 form 表单和 p ...
- AOP注解方式
Aop, aspect object programming 面向切面编程 功能: 让关注点代码与业务代码分离! 关注点, 重复代码就叫做关注点: 切面, 关注点形成的类,就叫切面(类)! 面向切 ...
- 性能测试学习第四天_Loadrunner概述
1.Loadrunner的组成部分 ·脚本生成器VuGen:virtual user generator ·压力控制器Controller,License主要在这里控制 ·结果分析软件Analysis ...