vmware增加新硬盘无需重启生效

$  cat  /proc/scsi/scsi   
Attached devices:
Host: scsi1 Channel: 00 Id: 00 Lun: 00
  Vendor: NECVMWar Model: VMware IDE CDR10 Rev: 1.00
  Type:   CD-ROM                           ANSI  SCSI revision: 05
Host: scsi2 Channel: 00 Id: 00 Lun: 00
  Vendor: VMware   Model: Virtual disk     Rev: 1.0 
  Type:   Direct-Access                    ANSI  SCSI revision: 02
Host: scsi2 Channel: 00 Id: 01 Lun: 00
  Vendor: VMware   Model: Virtual disk     Rev: 1.0 
  Type:   Direct-Access                    ANSI  SCSI revision: 02

$ echo "scsi add-single-device 2 0 2 0" > /proc/scsi/scsi
$ cat  /proc/scsi/scsi                                   
Attached devices:
Host: scsi1 Channel: 00 Id: 00 Lun: 00
  Vendor: NECVMWar Model: VMware IDE CDR10 Rev: 1.00
  Type:   CD-ROM                           ANSI  SCSI revision: 05
Host: scsi2 Channel: 00 Id: 00 Lun: 00
  Vendor: VMware   Model: Virtual disk     Rev: 1.0 
  Type:   Direct-Access                    ANSI  SCSI revision: 02
Host: scsi2 Channel: 00 Id: 01 Lun: 00
  Vendor: VMware   Model: Virtual disk     Rev: 1.0 
  Type:   Direct-Access                    ANSI  SCSI revision: 02
Host: scsi2 Channel: 00 Id: 02 Lun: 00
  Vendor: VMware   Model: Virtual disk     Rev: 1.0 
  Type:   Direct-Access                    ANSI  SCSI revision: 02

通过命令可以看到扫描到了新的磁盘,实现了不重启添加硬盘

$ echo "scsi add-single-device 2 0 2 0" > /proc/scsi/scsi

参数值 w、x、y 、 z,解释如下:
w(Host)是主机适配器标识,第一个适配器为零(0)
x (Channel)是主机适配器上的 SCSI 通道,第一个通道为零(0)
y (ID)是设备的 SCSI 标识
z (Lun)是 LUN 号,第一个 LUN 为零(0)

你可能感兴趣的:(vmware)