1.1    选择虚拟机添加一块硬盘

1.2    查看系统当前磁盘信息

  1. [root@zhongyi-test ~]# ls -l /dev/sd*
  2. brw-rw----. 1 root disk 8, 0 Jun 10 09:49 /dev/sda
  3. brw-rw----. 1 root disk 8, 1 Jun 10 09:49 /dev/sda1
  4. brw-rw----. 1 root disk 8, 2 Jun 10 09:49 /dev/sda2
  5. brw-rw----. 1 root disk 8, 3 Jun 10 09:49 /dev/sda3

1.3    在shell命令行执行以下命令

  1. [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系统日志,出现重新扫描磁盘日志

  1. [root@zhongyi-test ~]# less /var/log/messages
  2. 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
  3. 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.
  4. 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
  5. Jun 10 10:27:38 zhongyi-test kernel: scsi target2:0:1: Beginning Domain Validation
  6. Jun 10 10:27:38 zhongyi-test kernel: scsi target2:0:1: Domain Validation skipping write tests
  7. Jun 10 10:27:38 zhongyi-test kernel: scsi target2:0:1: Ending Domain Validation
  8. 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)
  9. 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)
  10. Jun 10 10:27:38 zhongyi-test kernel: sd 2:0:1:0: [sdb] Write Protect is off
  11. Jun 10 10:27:38 zhongyi-test kernel: sd 2:0:1:0: [sdb] Cache data unavailable
  12. Jun 10 10:27:38 zhongyi-test kernel: sd 2:0:1:0: [sdb] Assuming drive cache: write through
  13. Jun 10 10:27:38 zhongyi-test kernel: sd 2:0:1:0: [sdb] Cache data unavailable
  14. Jun 10 10:27:38 zhongyi-test kernel: sd 2:0:1:0: [sdb] Assuming drive cache: write through
  15. Jun 10 10:27:38 zhongyi-test kernel: sdb: unknown partition table
  16. Jun 10 10:27:38 zhongyi-test kernel: sd 2:0:1:0: [sdb] Cache data unavailable
  17. Jun 10 10:27:38 zhongyi-test kernel: sd 2:0:1:0: [sdb] Assuming drive cache: write through
  18. Jun 10 10:27:38 zhongyi-test kernel: sd 2:0:1:0: [sdb] Attached SCSI disk
  19. Jun 10 10:27:38 zhongyi-test kernel: sd 2:0:1:0: Attached scsi generic sg2 type 0

1.5    验证磁盘是否添加成功(标绿代表添加成功)

  1. 方式一(ls命令查看/dev/目录):
  2. [root@zhongyi-test ~]# ls -l /dev/sd*
  3. brw-rw----. 1 root disk 8, 0 Jun 10 09:49 /dev/sda
  4. brw-rw----. 1 root disk 8, 1 Jun 10 09:49 /dev/sda1
  5. brw-rw----. 1 root disk 8, 2 Jun 10 09:49 /dev/sda2
  6. brw-rw----. 1 root disk 8, 3 Jun 10 09:49 /dev/sda3
  7. brw-rw----. 1 root disk 8, 16 Jun 10 10:27 /dev/sdb
  8. 方法二(fdisk命令查看):
  9. [root@zhongyi-test ~]# fdisk -l /dev/sd*
  10.  
  11. Disk /dev/sda: 32.2 GB, 32212254720 bytes
  12. 255 heads, 63 sectors/track, 3916 cylinders
  13. Units = cylinders of 16065 * 512 = 8225280 bytes
  14. Sector size (logical/physical): 512 bytes / 512 bytes
  15. I/O size (minimum/optimal): 512 bytes / 512 bytes
  16. Disk identifier: 0x0009fb16
  17.  
  18. Device Boot Start End Blocks Id System
  19. /dev/sda1 1 26 204800 83 Linux
  20. Partition 1 does not end on cylinder boundary.
  21. /dev/sda2 * 26 90 512000 83 Linux
  22. Partition 2 does not end on cylinder boundary.
  23. /dev/sda3 90 3917 30739456 8e Linux LVM
  24.  
  25. Disk /dev/sda1: 209 MB, 209715200 bytes
  26. 255 heads, 63 sectors/track, 25 cylinders
  27. Units = cylinders of 16065 * 512 = 8225280 bytes
  28. Sector size (logical/physical): 512 bytes / 512 bytes
  29. I/O size (minimum/optimal): 512 bytes / 512 bytes
  30. Disk identifier: 0x00000000
  31.  
  32. Disk /dev/sda2: 524 MB, 524288000 bytes
  33. 255 heads, 63 sectors/track, 63 cylinders
  34. Units = cylinders of 16065 * 512 = 8225280 bytes
  35. Sector size (logical/physical): 512 bytes / 512 bytes
  36. I/O size (minimum/optimal): 512 bytes / 512 bytes
  37. Disk identifier: 0x00000000
  38.  
  39. Disk /dev/sda3: 31.5 GB, 31477202944 bytes
  40. 255 heads, 63 sectors/track, 3826 cylinders
  41. Units = cylinders of 16065 * 512 = 8225280 bytes
  42. Sector size (logical/physical): 512 bytes / 512 bytes
  43. I/O size (minimum/optimal): 512 bytes / 512 bytes
  44. Disk identifier: 0x00000000
  45.  
  46. Disk /dev/sdb: 32.2 GB, 32212254720 bytes
  47. 255 heads, 63 sectors/track, 3916 cylinders
  48. Units = cylinders of 16065 * 512 = 8225280 bytes
  49. Sector size (logical/physical): 512 bytes / 512 bytes
  50. I/O size (minimum/optimal): 512 bytes / 512 bytes
  51. Disk identifier: 0x00000000

结束    ok,至此磁盘在不重启linux系统下添加成功^_^!!!

Redhat 6.4 linux系统不重启识别热添加的硬盘方法的更多相关文章

  1. linux 不重启识别新添加的硬盘

    1.fdisk -l 看有没有新的磁盘 oebiotech@hadoop08:/media/nbc9$ sudo fdisk -l |grep sdl 2.查看主机总线 oebiotech@hadoo ...

  2. linux系统下重启tomcat的shell脚本

    linux系统下重启tomcat的shell脚本: #!/bin/shtomcat_home=/opt/apache-tomcat- #找到tomcat进程的id并kill掉 ps -ef |grep ...

  3. Redhat系的Linux系统里,网络主要设置文件简介【转载】

    以下是原文地址,转载请指明出处: http://blog.chinaunix.net/uid-26495963-id-3230810.html 一.配置文件详解在RHEL或者CentOS等Redhat ...

  4. Linux系统采用netstat命令查看DDOS攻击的方法

    Linux系统采用netstat命令查看DDOS攻击的方法 来源:互联网 作者:佚名 时间:07-05 15:10:21 [大 中 小] 这篇文章主要为大家介绍了Linux系统采用netstat命令查 ...

  5. 【Linux】查看所使用的Linux系统是32位还是64 位的方法

    查看所使用的Linux系统是32位还是64 位的方法 方法一:getconf LONG_BIT # getconf LONG_BIT 1 1 我的Linux是32位!!! 方法二:arch # arc ...

  6. Linux系统下重启Tomcat

    在Linux系统下,重启Tomcat使用命令操作的! 首先,进入Tomcat下的bin目录 cd /usr/local/tomcat/bin 使用Tomcat关闭命令 ./shutdown.sh 查看 ...

  7. Linux不重启识别新添加的磁盘

    现网的一台EXSI 下的虚拟机一般在进行配置变更后都会通过重启来识别新增的配置,不过业务侧某台主机因为业务需要无法重启,想通过不重启直接识别护容上去的新磁盘.经测试,发现如下方可以解决. 1.通过ex ...

  8. Linux系统 关机/重启/用户切换/注销,用户管理(用户创建/修改,用户组增加/删除),Linux中 / 和 ~ 的区别

    1.关机/重启命令 shutdown命令 shutdown -h now :立即关机 shutdown -h 1 :1分钟后关机 shutdown -r now :立即重启 shutdown -r 1 ...

  9. (扩展根目录容量方法汇总)把Linux系统迁移到另一个分区或者硬盘

    Linux系统扩容方法汇总 相信很多朋友都有过这样的经历,本想装个Ubantu玩玩,没想到玩久了反而不习惯Windows了,然而开始装系统的时候只分配了非常小的空间,那应该怎样扩展我们的ubantu呢 ...

随机推荐

  1. C#实现Ping服务器

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T ...

  2. Java的类成员变量、实例变量、类变量,成员方法、实例方法、类方法

    总是被这些相似的概念搞晕,查阅了资料后做个小总结,以变量为例,方法辨析类似. 1.多胞胎名字汇总辨析 成员变量和成员方法是范围最大的定义,提到成员变量就可以理解成你所定义在一个类体中的各类变量的统称, ...

  3. 连接Mysql时出现java.math.BigInteger cannot be cast to java.lang.Long问题

    今天遇见这样一个坑.在连接数据库进行查询数据时,大家可能会遇见这样一个问题:java.math.BigInteger cannot be cast to java.lang.Long,然后去检查代码中 ...

  4. flash系统奔溃的主要原因

    1.内存泄露(内存超过系统允许的最大限制,11.4版本为2G) 2.脚本死循环 3.舞台内元件的大小超出了系统限制

  5. apache管理命令

    常用的 httpd.exe -k [install(安装).uninstall(卸载).start(启动).stop(停止).restart(重启)] 说明:要执行命令,需进入到apache安装目录/ ...

  6. HTML标签_1

    <meta charset="utf-8" /> 设置字符集 <meta name="description" content="这 ...

  7. arcgis Flex QueryTask

    <esri:Map id="myMap" creationComplete="useMapServicePermaLink()" load="u ...

  8. Socket连接时,端口是怎么分配的

    socket 客户端连接socket 的端口每个是唯一的,每个新的连接,端口号+1 从1024-65534 最大到65534 然后再开始循环 中间遇到已经使用的端口就跳过

  9. 使用mongoDB时错误解决

    接触mongodb遇到的错误,记录下来,后续遇到问题,会持续更新 为了让mongodb更直观,在windows使用了NoSQL Manager for MongoDB作为连接工具 1.在连接数据库时遇 ...

  10. Java运行机制及相关术语

    JVM java虚拟机(Java Virtual Machine)JVM可以实现java程序的夸平台运行,即运行的操作平台各不相同 JVM基本原理 java运行机制 编译型语言(如C.C++) 源文件 ...