1. Select a virtual machine to add a hard disk
2. View system Current Disk information
[Email protected] ~]# ls-l/DEV/SD*BRW-RW----. 1 root Disk 8, 0 June 09:49/DEV/SDABRW-RW----. 1 root disk 8, 1 June 09:49/DEV/SDA1BRW-RW----. 1 root Disk 8, 2 June 09:49/DEV/SDA2BRW-RW----. 1 root Disk 8, 3 June 09:49/dev/sda3
3. Execute the following command on the shell command line
[Email protected] ~]# echo "---" >/sys/class/scsi_host/host0/scan
[Email protected] ~]# echo "---" >/sys/class/scsi_host/host1/scan
[Email protected] ~]# echo "---" >/sys/class/scsi_host/host2/scan
4, check the/var/log/messages system log, the Rescan disk log appears
[[email protected] ~]# less/var/log/messagesjun 10:27:02 zhongyi-test rsyslogd: [Origin software= "Rsyslogd" swversion= "5.8.10" x-pid= "1475" x-info= "http://www.rsyslog.com"] rsyslogd was Hupedjun 10:27:33 zhongyi-test RHSMD: In order for Subscription Manager to provide your system with updates, your system must is registered with the Customer Po Rtal. Please enter your Red Hat login to ensure your system is up-to-date. June 10:27:38 zhongyi-test kernel:scsi 2:0:1:0: direct-access VMware, VMware Virtual S 1.0 pq:0 Ansi:2jun 10 10 : 27:38 zhongyi-test kernel:scsi target2:0:1:beginning Domain validationjun ten 10:27:38 zhongyi-test kernel:scsi Target2 : 0:1: Domain Validation skipping write Testsjun 10:27:38 zhongyi-test kernel:scsi target2:0:1:ending domain validatio Njun 10:27:38 zhongyi-test kernel:scsi target2:0:1:fast-40 WIDE SCSI 80.0 MB/s ST (NS, offset 127) June 10 10:27:38 Zhongyi-test kernel:sd 2:0:1:0: [SDB] 62914560 512-byte logical blocks: (32.2 Gb/30.0 GiB) June 10:27:38 zhongyi-test kernel:sd 2:0:1:0: [SDB] Write Protect is Offjun 10:27:38 zhongyi-test-Kernel: SD 2:0:1:0: [SDB] Cache data unavailablejun 10:27:38 zhongyi-test kernel:sd 2:0:1:0: [SDB] Assuming drive Cache:writ E throughjun 10:27:38 zhongyi-test kernel:sd 2:0:1:0: [SDB] Cache data unavailablejun 10:27:38 zhongyi-test kernel: SD 2:0:1:0: [SDB] Assuming drive cache:write throughjun 10:27:38 zhongyi-test kernel:sdb:unknown partition Tablejun 10:27:38 zhongyi-test kernel:sd 2:0:1:0: [SDB], Cache data Unavailablejun, 10:27:38 zhongyi-test kernel:sd 2:0:1:0: [SDB] Assuming drive cache:write Throughjun 10:27:38 zhongyi-test kernel:sd 2:0:1:0: [SDB] attached SCSI Diskjun 10 10:27:3 8 Zhongyi-test KERNEL:SD 2:0:1:0: Attached SCSI generic SG2 type 0
5. Verify that the disk was added successfully (the Green representative added successfully )
mode one (LS command to view the/dev/directory):[email protected] ~]# ls-l/dev/sd*BRW-RW----. 1 root Disk 8, 0 June 09:49/DEV/SDABRW-RW----. 1 root disk 8, 1 June 09:49/DEV/SDA1BRW-RW----. 1 root Disk 8, 2 June 09:49/DEV/SDA2BRW-RW----. 1 root Disk 8, 3 June 09:49/dev/sda3BRW-RW----. 1 root disk 8, June 10:27/dev/sdbMethod Two (Fdisk command view):[email protected] ~]# fdisk-l/dev/sd*disk/dev/sda:32.2 GB, 32212254720 bytes255 heads, sectors/track, 3916 cylindersunits = cylinders of 16065 * 512 = 822 5280 bytessector Size (logical/physical): bytes/512 bytesi/o size (minimum/optimal): + bytes/512 Bytesdisk ident Ifier:0x0009fb16 Device Boot Start End Blocks Id system/dev/sda1 1 26 204800 linuxpartition 1 does not end on cylinder BOUNDARY./DEV/SDA2 * All 512000 Nuxpartition 2 does cylinder Boundary./dev/sda3 3917 30739456 8e Linux lvmdisk/de v/sda1:209 MB, 209715200 bytes255 heads, sectors/track, cylindersunits = cylinders of 16065 * = 8225280 Bytesse ctor Size (logical/physical): bytes/512 bytesi/o size (minimum/optimal): bytes/512 bytesdisk identifier:0x000 00000disk/dev/sda2:524 MB, 524288000 bytes255 heads, 16065 sectors/track, cylindersunits = cylinders of 512 = 82 25280 Bytessector Size (logical/physical): bytes/512 bytesi/o size (minimum/optimal): bytes/512 bytesdisk Identifier:0x00000000disk/ dev/sda3:31.5 GB, 31477202944 bytes255 heads, sectors/track, 3826 cylindersunits = cylinders of 16065 * 512 = 8225280 Bytessector size (logical/physical): bytes/512 bytesi/o size (minimum/optimal): bytes/512 bytesdisk identifier : 0x00000000disk/dev/sdb:32.2 GB, 32212254720 bytes255 heads, sectors/track, 3916 cylindersunits = cylinders of 16065 * 512 = 8225280 bytessector Size (logical/physical): bytes/512 bytesi/o size (minimum/optimal): bytes/512 bytesDisk I dentifier:0x00000000
6, OK, this disk does not restart Linux system to add success ^_^!!!
Redhat 6.4 Linux system does not restart to identify hot-added hard drive methods