John R Pierce
2015-Nov-04 20:31 UTC
[CentOS] getting a CentOS6 VM on VMware ESXi platform to recognize a new disk device
On 11/4/2015 11:36 AM, Boris Epstein wrote:> Absolutely, I see your point. This was the starting point - you add the > device on the ESXi server, you reboot the VM, the VM sees the device, no > problem. Now, I ask - do I have to reboot the VM? Logically I hope there > ought to be a way for me not to have to do that - but I have yet to figure > out how to get there. >vmware esxi 5.5.0 (free, using vsphere client to manage), vm is minimal centos 7 64bit. I added a 16gb vdisk and immediately see this in dmesg... [155484.386792] vmw_pvscsi: msg type: 0x0 - MSG RING: 1/0 (5) [155484.386796] vmw_pvscsi: msg: device added at scsi0:1:0 [155484.388250] scsi 0:0:1:0: Direct-Access VMware Virtual disk 1.0 PQ: 0 ANSI: 2 [155484.391275] sd 0:0:1:0: [sdb] 33554432 512-byte logical blocks: (17.1 GB/16.0 GiB) [155484.391552] sd 0:0:1:0: [sdb] Write Protect is off [155484.391556] sd 0:0:1:0: [sdb] Mode Sense: 61 00 00 00 [155484.391593] sd 0:0:1:0: [sdb] Cache data unavailable [155484.391595] sd 0:0:1:0: [sdb] Assuming drive cache: write through [155484.396148] sdb: unknown partition table [155484.396356] sd 0:0:1:0: [sdb] Attached SCSI disk and lsblk shows... # lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 32G 0 disk .... sdb 8:16 0 16G 0 disk ... so I can immediately... # mkfs.xfs /dev/sdb meta-data=/dev/sdb isize=256 agcount=4, agsize=1048576 blks ..... # mount /dev/sdb /mnt # (normally, I'd partition and lvm it, this is just for demo) I'm using a paravirtual scsi controller, and have previously installed open-vm-tools via yum. I then umounted it, and in vsphere deleted the vdisk and dmesg immediately shows... [155820.730477] vmw_pvscsi: msg type: 0x1 - MSG RING: 2/1 (5) [155820.730481] vmw_pvscsi: msg: device removed at scsi0:1:0 [155820.754176] sd 0:0:0:0: Attached scsi generic sg0 type 0 [155820.754247] sr 2:0:0:0: Attached scsi generic sg1 type 5 I also did much the same with a CentOS 6.7 VM, also using a 'paravirtual SCSI' vm on the same esxi host, when I added the vdisk, it immediately shows... # dmesg ..... vmw_pvscsi: msg type: 0x0 - MSG RING: 1/0 (5) vmw_pvscsi: msg: device added at scsi0:1:0 scsi 2:0:1:0: Direct-Access VMware Virtual disk 1.0 PQ: 0 ANSI: 2 sd 2:0:1:0: Attached scsi generic sg2 type 0 sd 2:0:1:0: [sdb] 33554432 512-byte logical blocks: (17.1 GB/16.0 GiB) sd 2:0:1:0: [sdb] Write Protect is off sd 2:0:1:0: [sdb] Mode Sense: 61 00 00 00 sd 2:0:1:0: [sdb] Cache data unavailable sd 2:0:1:0: [sdb] Assuming drive cache: write through sd 2:0:1:0: [sdb] Cache data unavailable sd 2:0:1:0: [sdb] Assuming drive cache: write through sdb: unknown partition table sd 2:0:1:0: [sdb] Cache data unavailable sd 2:0:1:0: [sdb] Assuming drive cache: write through sd 2:0:1:0: [sdb] Attached SCSI disk # lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sr0 11:0 1 1024M 0 rom sda 8:0 0 16G 0 disk ??sda1 8:1 0 500M 0 part /boot ??sda2 8:2 0 15.5G 0 part ??vg_svfisc6test5-lv_root (dm-0) 253:0 0 9.6G 0 lvm / ??vg_svfisc6test5-lv_swap (dm-1) 253:1 0 5.9G 0 lvm [SWAP] sdb 8:16 0 16G 0 disk and I note this VM is *not* running vmware tools NEITHER of these two VMs required rebooting or any echo "- - -" >/sys/scsi/.. stuffs. -- john r pierce, recycling bits in santa cruz
Boris Epstein
2015-Nov-04 20:52 UTC
[CentOS] getting a CentOS6 VM on VMware ESXi platform to recognize a new disk device
>> > vmware esxi 5.5.0 (free, using vsphere client to manage), vm is minimal > centos 7 64bit. I added a 16gb vdisk and immediately see this in dmesg... > > [155484.386792] vmw_pvscsi: msg type: 0x0 - MSG RING: 1/0 (5) > [155484.386796] vmw_pvscsi: msg: device added at scsi0:1:0 > [155484.388250] scsi 0:0:1:0: Direct-Access VMware Virtual disk > 1.0 PQ: 0 ANSI: 2 > [155484.391275] sd 0:0:1:0: [sdb] 33554432 512-byte logical blocks: (17.1 > GB/16.0 GiB) > [155484.391552] sd 0:0:1:0: [sdb] Write Protect is off > [155484.391556] sd 0:0:1:0: [sdb] Mode Sense: 61 00 00 00 > [155484.391593] sd 0:0:1:0: [sdb] Cache data unavailable > [155484.391595] sd 0:0:1:0: [sdb] Assuming drive cache: write through > [155484.396148] sdb: unknown partition table > [155484.396356] sd 0:0:1:0: [sdb] Attached SCSI disk > > and lsblk shows... > > # lsblk > NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT > sda 8:0 0 32G 0 disk > .... > sdb 8:16 0 16G 0 disk > ... > > so I can immediately... > > # mkfs.xfs /dev/sdb > meta-data=/dev/sdb isize=256 agcount=4, agsize=1048576 > blks > ..... > # mount /dev/sdb /mnt > # > > (normally, I'd partition and lvm it, this is just for demo) > I'm using a paravirtual scsi controller, and have previously installed > open-vm-tools via yum. > > I then umounted it, and in vsphere deleted the vdisk and dmesg immediately > shows... > > [155820.730477] vmw_pvscsi: msg type: 0x1 - MSG RING: 2/1 (5) > [155820.730481] vmw_pvscsi: msg: device removed at scsi0:1:0 > [155820.754176] sd 0:0:0:0: Attached scsi generic sg0 type 0 > [155820.754247] sr 2:0:0:0: Attached scsi generic sg1 type 5 > > > I also did much the same with a CentOS 6.7 VM, also using a 'paravirtual > SCSI' vm on the same esxi host, when I added the vdisk, it immediately > shows... > > # dmesg > ..... > vmw_pvscsi: msg type: 0x0 - MSG RING: 1/0 (5) > vmw_pvscsi: msg: device added at scsi0:1:0 > scsi 2:0:1:0: Direct-Access VMware Virtual disk 1.0 PQ: 0 ANSI: > 2 > sd 2:0:1:0: Attached scsi generic sg2 type 0 > sd 2:0:1:0: [sdb] 33554432 512-byte logical blocks: (17.1 GB/16.0 GiB) > sd 2:0:1:0: [sdb] Write Protect is off > sd 2:0:1:0: [sdb] Mode Sense: 61 00 00 00 > sd 2:0:1:0: [sdb] Cache data unavailable > sd 2:0:1:0: [sdb] Assuming drive cache: write through > sd 2:0:1:0: [sdb] Cache data unavailable > sd 2:0:1:0: [sdb] Assuming drive cache: write through > sdb: unknown partition table > sd 2:0:1:0: [sdb] Cache data unavailable > sd 2:0:1:0: [sdb] Assuming drive cache: write through > sd 2:0:1:0: [sdb] Attached SCSI disk > > # lsblk > NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT > sr0 11:0 1 1024M 0 rom > sda 8:0 0 16G 0 disk > ??sda1 8:1 0 500M 0 part /boot > ??sda2 8:2 0 15.5G 0 part > ??vg_svfisc6test5-lv_root (dm-0) 253:0 0 9.6G 0 lvm / > ??vg_svfisc6test5-lv_swap (dm-1) 253:1 0 5.9G 0 lvm [SWAP] > sdb 8:16 0 16G 0 disk > > and I note this VM is *not* running vmware tools > > NEITHER of these two VMs required rebooting or any echo "- - -" > >/sys/scsi/.. stuffs. > > > -- > john r pierce, recycling bits in santa cruz > > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos >John, Thanks for your input. I don't get this for some reason... not even sure why. ESXi's default behaviour seems to be to allow hotplug, that does not seem to be deactivated. I am just not sure. Wonder if this could be the Centos 7 vs 6 - perhaps that is what I ought to test for. Boris.
John R Pierce
2015-Nov-04 20:59 UTC
[CentOS] getting a CentOS6 VM on VMware ESXi platform to recognize a new disk device
On 11/4/2015 12:52 PM, Boris Epstein wrote:> I don't get this for some reason... not even sure why. ESXi's default > behaviour seems to be to allow hotplug, that does not seem to be > deactivated. I am just not sure. Wonder if this could be the Centos 7 vs 6 > - perhaps that is what I ought to test for.what virtual SCSI controller type are you using for these VM's? Mine are 'paravirtual'. -- john r pierce, recycling bits in santa cruz
Apparently Analagous Threads
- getting a CentOS6 VM on VMware ESXi platform to recognize a new disk device
- getting a CentOS6 VM on VMware ESXi platform to recognize a new disk device
- getting a CentOS6 VM on VMware ESXi platform to recognize a new disk device
- getting a CentOS6 VM on VMware ESXi platform to recognize a new disk device
- getting a CentOS6 VM on VMware ESXi platform to recognize a new disk device