Non-stop adding host disks to virtual machines (for example, VMware Workstation)

Source: Internet
Author: User

I. Previous disk condition not added

[[email protected] ~]# fdisk -ldisk /dev/sda: 21.5 gb, 21474836480  bytes255 heads, 63 sectors/track, 2610 cylindersunits = cylinders  of 16065 * 512 = 8225280 bytesSector size  (logical/physical):  512 bytes / 512 bytesI/O size  (Minimum/optimal): 512 bytes  / 512 bytesdisk identifier: 0x000ec240   device boot       Start         End       Blocks   Id  System/dev/sda1   *            1          64       512000   83  linuxpartition 1 does not  end on cylinder boundary./dev/sda2               64        2611    20458496   8e   Linux LVMDisk /dev/mapper/VolGroup-lv_root: 18.9 GB, 18865979392  Bytes255 heads, 63 sectors/track, 2293 cylindersunits = cylinders of  16065 * 512 = 8225280 bytesSector size  (logical/physical):  512  bytes / 512 bytesI/O size  (Minimum/optimal): 512 bytes /  512 BYTESDISK IDENTIFIER: 0X00000000DISK /DEV/MAPPER/VOLGROUP-LV_SWAP: 2080 MB,  2080374784 bytes255 heads, 63 sectors/track, 252 cylindersunits =  cylinders of 16065 * 512 = 8225280 bytesSector size  ( logical/physical):  512 bytes / 512 bytesi/o size  (Minimum/optimal): 512 bytes / 512  bytesdisk identifier: 0x00000000

Second, view the host bus number

[Email protected] ~]# ls/sys/class/scsi_host/host0 host1 host2

Third, add a new hard drive (take VMware workstation as an example)

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M02/05/71/wKiom1mlJ_rDNSBdAACkKGbJTo8797.png "title=" Image.png "alt=" Wkiom1mlj_rdnsbdaackkgbjto8797.png "/>650" this.width=650; "src=" https://s1.51cto.com/wyfs02/ M00/05/71/wkiom1mlkbxqn_hbaaa_unoz8e8051.png "title=" Image (2). png "alt=" Wkiom1mlkbxqn_hbaaa_unoz8e8051.png "/>

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M02/A4/22/wKioL1mlKI-BqVa9AAA_E_KE7QM172.png "style=" float : none; "Title=" Image (3). png "alt=" Wkiol1mlki-bqva9aaa_e_ke7qm172.png "/>

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M01/05/71/wKiom1mlKKLCeHSGAABFe57vJwA705.png "style=" float : none; "Title=" Image (4). png "alt=" Wkiom1mlkklcehsgaabfe57vjwa705.png "/>

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M00/A4/22/wKioL1mlKI-Tk1ncAAAwIPfPSv4212.png "style=" float : none; "Title=" Image (5). png "alt=" Wkiol1mlki-tk1ncaaawipfpsv4212.png "/>

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M02/05/71/wKiom1mlKKLB7i9sAABFdJI0xVg670.png "style=" float : none; "Title=" Image (6). png "alt=" Wkiom1mlkklb7i9saabfdji0xvg670.png "/>

Four, rescan SCSI bus add disk

[[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 [[email protected] ~]# fdisk -ldisk /dev/sda:  21.5 gb, 21474836480 bytes255 heads, 63 sectors/track, 2610  Cylindersunits = cylinders of 16065 * 512 = 8225280 bytessector  size  (logical/physical): 512 bytes / 512 bytesi/o size  (minimum/ Optimal): 512 bytes / 512 bytesdisk identifier: 0x000ec240    Device Boot      Start          end      blocks   id  system/dev/sda1   *            1          64       512000   83  linuxpartition 1 does  not end on cylinder boundary./dev/sda2               64        2611     20458496   8e  linux lvmdisk /dev/mapper/volgroup-lv_root:  18.9 GB, 18865979392 bytes255 heads, 63 sectors/track, 2293  Cylindersunits = cylinders of 16065 * 512 = 8225280 bytessector  size  (logical/physical): 512 bytes / 512 bytesi/o size  (minimum/ Optimal): 512 bytes / 512 BYTESDISK IDENTIFIER: 0X00000000DISK /DEV/MAPPER/VOLGROUP-LV_SWAP: 2080 MB,  2080374784 bytes255 heads, 63 sectors/track, 252 cylindersunits =  cylinders of 16065 * 512 = 8225280 bytesSector size  ( logical/physical): 512 bytes / 512 bytesi/o size  (minimum/optimal):  512 bytes / 512 bytesdisk identifier: 0x00000000disk /dev/sdb: 1073  MB, 1073741824 bytes                                   #新加磁盘255  heads, 63 sectors/track, 130 cylindersUnits =  cylinders of 16065 * 512 = 8225280 bytessector size  (logical/ Physical):  512 bytes / 512 bytesi/o size  (Minimum/optimal): 512 bytes / 512 bytesdisk  identifier: 0x00000000

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M00/A4/22/wKioL1mlKYTThaX-AADOgDD0WMg477.png "title=" Image (8). png "alt=" Wkiol1mlkytthax-aadogdd0wmg477.png "/>

This article is from the "Stewart" blog, please be sure to keep this source http://stuart.blog.51cto.com/728677/1960873

Non-stop adding host disks to virtual machines (for example, VMware Workstation)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.