Redhat 6.4 linux系统不重启识别热添加的硬盘方法
1.1 选择虚拟机添加一块硬盘
1.2 查看系统当前磁盘信息
[root@zhongyi-test ~]# ls -l /dev/sd*
brw-rw----. 1 root disk 8, 0 Jun 10 09:49 /dev/sda
brw-rw----. 1 root disk 8, 1 Jun 10 09:49 /dev/sda1
brw-rw----. 1 root disk 8, 2 Jun 10 09:49 /dev/sda2
brw-rw----. 1 root disk 8, 3 Jun 10 09:49 /dev/sda3
1.3 在shell命令行执行以下命令
[root@zhongyi-test ~]# echo "- - -" > /sys/class/scsi_host/host0/scan
[root@zhongyi-test ~]# echo "- - -" > /sys/class/scsi_host/host1/scan
[root@zhongyi-test ~]# echo "- - -" > /sys/class/scsi_host/host2/scan
1.4 查看/var/log/messages系统日志,出现重新扫描磁盘日志
[root@zhongyi-test ~]# less /var/log/messages
Jun 10 10:27:02 zhongyi-test rsyslogd: [origin software="rsyslogd" swVersion="5.8.10" x-pid="1475" x-info="http://www.rsyslog.com"] rsyslogd was HUPed
Jun 10 10:27:33 zhongyi-test rhsmd: In order for Subscription Manager to provide your system with updates, your system must be registered with the Customer Portal. Please enter your Red Hat login to ensure your system is up-to-date.
Jun 10 10:27:38 zhongyi-test kernel: scsi 2:0:1:0: Direct-Access VMware, VMware Virtual S 1.0 PQ: 0 ANSI: 2
Jun 10 10:27:38 zhongyi-test kernel: scsi target2:0:1: Beginning Domain Validation
Jun 10 10:27:38 zhongyi-test kernel: scsi target2:0:1: Domain Validation skipping write tests
Jun 10 10:27:38 zhongyi-test kernel: scsi target2:0:1: Ending Domain Validation
Jun 10 10:27:38 zhongyi-test kernel: scsi target2:0:1: FAST-40 WIDE SCSI 80.0 MB/s ST (25 ns, offset 127)
Jun 10 10:27:38 zhongyi-test kernel: sd 2:0:1:0: [sdb] 62914560 512-byte logical blocks: (32.2 GB/30.0 GiB)
Jun 10 10:27:38 zhongyi-test kernel: sd 2:0:1:0: [sdb] Write Protect is off
Jun 10 10:27:38 zhongyi-test kernel: sd 2:0:1:0: [sdb] Cache data unavailable
Jun 10 10:27:38 zhongyi-test kernel: sd 2:0:1:0: [sdb] Assuming drive cache: write through
Jun 10 10:27:38 zhongyi-test kernel: sd 2:0:1:0: [sdb] Cache data unavailable
Jun 10 10:27:38 zhongyi-test kernel: sd 2:0:1:0: [sdb] Assuming drive cache: write through
Jun 10 10:27:38 zhongyi-test kernel: sdb: unknown partition table
Jun 10 10:27:38 zhongyi-test kernel: sd 2:0:1:0: [sdb] Cache data unavailable
Jun 10 10:27:38 zhongyi-test kernel: sd 2:0:1:0: [sdb] Assuming drive cache: write through
Jun 10 10:27:38 zhongyi-test kernel: sd 2:0:1:0: [sdb] Attached SCSI disk
Jun 10 10:27:38 zhongyi-test kernel: sd 2:0:1:0: Attached scsi generic sg2 type 0
1.5 验证磁盘是否添加成功(标绿代表添加成功)
方式一(ls命令查看/dev/目录):
[root@zhongyi-test ~]# ls -l /dev/sd*
brw-rw----. 1 root disk 8, 0 Jun 10 09:49 /dev/sda
brw-rw----. 1 root disk 8, 1 Jun 10 09:49 /dev/sda1
brw-rw----. 1 root disk 8, 2 Jun 10 09:49 /dev/sda2
brw-rw----. 1 root disk 8, 3 Jun 10 09:49 /dev/sda3
brw-rw----. 1 root disk 8, 16 Jun 10 10:27 /dev/sdb
方法二(fdisk命令查看):
[root@zhongyi-test ~]# fdisk -l /dev/sd* Disk /dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0009fb16 Device Boot Start End Blocks Id System
/dev/sda1 1 26 204800 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 * 26 90 512000 83 Linux
Partition 2 does not end on cylinder boundary.
/dev/sda3 90 3917 30739456 8e Linux LVM Disk /dev/sda1: 209 MB, 209715200 bytes
255 heads, 63 sectors/track, 25 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000 Disk /dev/sda2: 524 MB, 524288000 bytes
255 heads, 63 sectors/track, 63 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000 Disk /dev/sda3: 31.5 GB, 31477202944 bytes
255 heads, 63 sectors/track, 3826 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000 Disk /dev/sdb: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
结束 ok,至此磁盘在不重启linux系统下添加成功^_^!!!
Redhat 6.4 linux系统不重启识别热添加的硬盘方法的更多相关文章
- linux 不重启识别新添加的硬盘
1.fdisk -l 看有没有新的磁盘 oebiotech@hadoop08:/media/nbc9$ sudo fdisk -l |grep sdl 2.查看主机总线 oebiotech@hadoo ...
- linux系统下重启tomcat的shell脚本
linux系统下重启tomcat的shell脚本: #!/bin/shtomcat_home=/opt/apache-tomcat- #找到tomcat进程的id并kill掉 ps -ef |grep ...
- Redhat系的Linux系统里,网络主要设置文件简介【转载】
以下是原文地址,转载请指明出处: http://blog.chinaunix.net/uid-26495963-id-3230810.html 一.配置文件详解在RHEL或者CentOS等Redhat ...
- Linux系统采用netstat命令查看DDOS攻击的方法
Linux系统采用netstat命令查看DDOS攻击的方法 来源:互联网 作者:佚名 时间:07-05 15:10:21 [大 中 小] 这篇文章主要为大家介绍了Linux系统采用netstat命令查 ...
- 【Linux】查看所使用的Linux系统是32位还是64 位的方法
查看所使用的Linux系统是32位还是64 位的方法 方法一:getconf LONG_BIT # getconf LONG_BIT 1 1 我的Linux是32位!!! 方法二:arch # arc ...
- Linux系统下重启Tomcat
在Linux系统下,重启Tomcat使用命令操作的! 首先,进入Tomcat下的bin目录 cd /usr/local/tomcat/bin 使用Tomcat关闭命令 ./shutdown.sh 查看 ...
- Linux不重启识别新添加的磁盘
现网的一台EXSI 下的虚拟机一般在进行配置变更后都会通过重启来识别新增的配置,不过业务侧某台主机因为业务需要无法重启,想通过不重启直接识别护容上去的新磁盘.经测试,发现如下方可以解决. 1.通过ex ...
- Linux系统 关机/重启/用户切换/注销,用户管理(用户创建/修改,用户组增加/删除),Linux中 / 和 ~ 的区别
1.关机/重启命令 shutdown命令 shutdown -h now :立即关机 shutdown -h 1 :1分钟后关机 shutdown -r now :立即重启 shutdown -r 1 ...
- (扩展根目录容量方法汇总)把Linux系统迁移到另一个分区或者硬盘
Linux系统扩容方法汇总 相信很多朋友都有过这样的经历,本想装个Ubantu玩玩,没想到玩久了反而不习惯Windows了,然而开始装系统的时候只分配了非常小的空间,那应该怎样扩展我们的ubantu呢 ...
随机推荐
- Json的访问
JSON:JavaScript 对象表示法(JavaScript Object Notation) 写法:名称/值对 访问方法:可以通过 data.名称 访问,也可以通过 data['名称'] 访问 ...
- WEBAPI测试
测试 #region 测试 [HttpPost] public HttpResponseMessage UserData(int userId, string userName) { var user ...
- springboot2.x如何配置全局自定义异常
为什么要捕获异常? 我们开发中,经常运行时,代码会报错,这时候我们有可能抛出异常,而不是用try..catch来解决.而且现在前后端分离,如果不捕获异常的话,前端那边的人估计会被报的错搞得焦头烂额的. ...
- Fibonacci(斐波那契数列)的第N位数
无穷数列1,1,2,3,5,8,13,21,34,55...称为Fibonacci数列,它可以递归地定义为F(n)=1 ...........(n=1或n=2)F(n)=F(n-1)+F(n-2).. ...
- Redis入门--(二)Redis的概述
1.Redis的由来 创始人觉得Mysql不好用,就自己写了: 国内使用Redis的网站有新浪微博,知乎: 国外GitHub: VMWare也支持redis的开发 2.Redis的概述 官方提供的测试 ...
- Windows之CMD查看系统信息
Windows 系统通过命令行(CMD)查询系统信息有两种方式: 1.图形化界面: 在“运行”中键入CMD,然后输入 dxdiag,回车后弹出图形化界面 ------ DirectX 诊断工具. 2. ...
- Angular搭建脚手架
1.安装CLI: cnpm install -g @angular/cli //卸载: npm uninstall -g @angular/cli npm cache clean 2.检测是否成功 ...
- 画布canvas签名
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <m ...
- atom markdown转换PDF 解决AssertionError: html-pdf: Failed to load PhantomJS module
atom编辑器markdown转换PDF 解决AssertionError: html-pdf: Failed to load PhantomJS module. You have to set th ...
- cocos2d-x滑动翻页,多出一点偏移量。
cocos2d-x 2.2.3版本. 控件:ccscrollView 实现滑动翻页:创建出来的cell横向移动时会有一个惯性滑动,导致View页面不能居中.通过延迟重新设定的方式解决.
