Removing volume group and logical volume after physical drive has been removed

root:/ # lvs
/dev/5gbdisk_vg/5gbdisk: read failed after 0 of 4096 at 1073676288: Input/output error
/dev/5gbdisk_vg/5gbdisk: read failed after 0 of 4096 at 1073733632: Input/output error
/dev/5gbdisk_vg/5gbdisk: read failed after 0 of 4096 at 0: Input/output error
/dev/5gbdisk_vg/5gbdisk: read failed after 0 of 4096 at 4096: Input/output error
/dev/sdc: read failed after 0 of 4096 at 0: Input/output error
/dev/sdc: read failed after 0 of 4096 at 10737352704: Input/output error
/dev/sdc: read failed after 0 of 4096 at 10737410048: Input/output error
/dev/sdc: read failed after 0 of 4096 at 4096: Input/output error
LV VG Attr LSize Pool Origin Data% Move Log Copy% Convert
home sp3tosp4 -wi-ao--- 4.00g
var sp3tosp4 -wi-ao--- 8.00g
root:/ #

When the disk was physically removed, the /dev/sdc and this device nodes wasn’t automatically removed. The above errors are clearly indicating that /dev/sdc and /dev/myvg/mylv can no longer be read due to the removal of the disk.
Remove the stale /dev/sdc device node and clean up the stale device-mapper nodes. In the above example, this would be accomplished by either a simple reboot, or by running the following:

root:/ # dmsetup remove –force /dev/5gbdisk_vg/5gbdisk
root:/ # echo 1 > /sys/block/sdc/device/delete

root:/ # pvs
PV VG Fmt Attr PSize PFree
/dev/sdb sp3tosp4 lvm2 a-- 16.00g 4.00g
root:/ # lvs
LV VG Attr LSize Pool Origin Data% Move Log Copy% Convert
home sp3tosp4 -wi-ao--- 4.00g
var sp3tosp4 -wi-ao--- 8.00g
root:/ #

Linux force the rereading of the disk geometry.

Assuming you know the device name of the disc you have expanded /dev/sdg then you can simply issue the following command to force the rereading of the disk geometry.

debian02:~ # echo 1 > /sys/class/scsi_device/0:0:6:0/device/rescan

To determine the SCSI ID from device names enter: ls -d /sys/block/sd*/device/scsi_device/* |awk -F '[/]' '{print $4,"- SCSI",$7}'

For example:
debian02:~ # ls -d /sys/block/sd*/device/scsi_device/* |awk -F '[/]' '{print $4,"- SCSI",$7}'
sda - SCSI 0:0:0:0
sdb - SCSI 0:0:1:0
sdc - SCSI 0:0:2:0
sdd - SCSI 0:0:3:0
sde - SCSI 0:0:4:0
sdf - SCSI 0:0:5:0
sdg - SCSI 0:0:6:0
sdh - SCSI 0:0:8:0
sdi - SCSI 0:0:9:0
sdj - SCSI 0:0:10:0
sdk - SCSI 0:0:11:0
sdl - SCSI 0:0:12:0
sdm - SCSI 0:0:13:0
sdn - SCSI 0:0:14:0
sdo - SCSI 0:0:15:0
debian02:~ #

Match Linux SCSI Devices (sdX) to Virtual Disks in VMware

To determine the SCSI ID from device names enter ls -d /sys/block/sd*/device/scsi_device/*

debian02:~ # ls -d /sys/block/sd*/device/scsi_device/*
/sys/block/sda/device/scsi_device/0:0:0:0 /sys/block/sde/device/scsi_device/0:0:4:0 /s
/sys/block/sdb/device/scsi_device/0:0:1:0 /sys/block/sdf/device/scsi_device/0:0:5:0 /s
/sys/block/sdc/device/scsi_device/0:0:2:0 /sys/block/sdg/device/scsi_device/0:0:6:0 /s
/sys/block/sdd/device/scsi_device/0:0:3:0 /sys/block/sdh/device/scsi_device/0:0:8:0 /s
debian02:~ #

You can see the the device name, and 4 numbers a:b:c:d

a = Hostadapter ID
b = SCSI channel
c = Device ID
d = LUN

The Device ID is always c. At the controller, it depends whether you are using the Paravirtual (b) controller, or the LSI Logic (a) controller.

On the VMware it looks like that:

debian02
/dev/sda has the SCSI ID 0:0:0:0 which is the equivalent to 0:0 and is Hard Disk 1 on VMware.
/dev/sde has the SCSI ID 0:0:4:0 which is the equivalent to 0:4 and is Hard Disk 5 on VMware.
/dev/sdo has the SCSI ID 0:0:15:0 which is the equivalent to 0:15 and is Hard Disk 16 on VMware.

When you remove and add disks, the order might change so always double check if you want to remove disks from a Virtual Machine.

Also you can use the following command if you want an output that is better to read:

debian02:~ # ls -d /sys/block/sd*/device/scsi_device/* |awk -F '[/]' '{print $4,"- SCSI",$7}'
sda - SCSI 0:0:0:0
sdb - SCSI 0:0:1:0
sdc - SCSI 0:0:2:0
sdd - SCSI 0:0:3:0
sde - SCSI 0:0:4:0
sdf - SCSI 0:0:5:0
sdg - SCSI 0:0:6:0
sdh - SCSI 0:0:8:0
sdi - SCSI 0:0:9:0
sdj - SCSI 0:0:10:0
sdk - SCSI 0:0:11:0
sdl - SCSI 0:0:12:0
sdm - SCSI 0:0:13:0
sdn - SCSI 0:0:14:0
sdo - SCSI 0:0:15:0
debian02:~ #