Virtual machine new hard disk, how to let the Linux system recognize?
Here are two ways to make the Linux system recognize the new hard drive:
1. Restart the system (do not use the brain to take care of it)
Some people say, I am lazy, do not want to move the brain, then this method (restart the system, everything done) is suitable for you.
So, what if this Linux system has a business running and cannot be restarted? What to do, then will have to move + brain.
The trick, see the following method.
2, execute the order, re-scan the device
#先cd到/sys/class/scsi_host/Directory
[Email protected]/]# cd/sys/class/scsi_host/
#我们来看看scsi_host目录有啥东西呢, here are three subdirectories.
[[email protected] scsi_host]# ls host0 host1 host2
#执行如下命令
[Email protected] scsi_host]# echo "---" > Host0/scan Note: "--" these three "-" there are spaces in the middle. "
#用fdisk命令来查看下吧
[Email protected] scsi_host]# fdisk-l
#如果还是没有识别到, don't worry, go on;
[Email protected] scsi_host]# echo "---" > host1/scan [[email protected] scsi_host]# echo "---" > Host2/scan
#我们再分别执行下上面host1和host2的命令, then fdisk down!
 [[EMAIL PROTECTED] SCSI_HOST]# FDISK -L DISK /DEV/SDA: 171.8 GB, 171798691840 bytes 255 heads, 63 sectors/track, 20886 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: 0x000d1499 Device Boot Start end blocks id system/ dev/sda1 * 1 26 204800 83 linuxpartition 1 does not end on cylinder boundary./dev/sda2 26 281 2048000 82 linux swap / solarispartition 2 does not end on cylinder boundary./dev/sda3 281 20887 165518336 83 linux disk /dev/sdb: 64.4 GB, 64424509440 bytes 255 heads, 63 sectors/track, 7832 Cylinders units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes i/o size (minimum/optimal):  512&Nbsp;bytes / 512 bytes disk identifier: 0x00000000
#到这里我们可以看到除了Disk/dev/sda:171.8 GB, a disk/dev/sdb:64.4 GB is also present. This will be OK, start on the new disk on what to do.
This article is from the "Ilinux" blog, make sure to keep this source http://shenzhijin.blog.51cto.com/1741240/1863941
Virtual machine new hard disk, how to let the Linux system recognize?