[linux-lvm] removing a missing vg
Bryn M. Reeves
bmr at redhat.com
Mon May 11 17:27:54 UTC 2009
On Mon, 2009-05-11 at 12:17 -0500, Eugene Vilensky wrote:
> Hi folk,
> I tried to remove some NetApp LUNs from a RHEL 4.6 system, and
> originally stale mappings remained in multipath -ll which I was not
> able to flush. In production instance, I am unable to remove the
> multipath mappings because the vg is missing. How can I deactivate a
> missing vg?
dmsetup remove <device name>
In the future you probably want to unmount file systems, deactivate
volume groups, delete kpartx mappings etc. and flush the multipath
devices from the host before you delete the LUNs from the storage.
This way everything on the Linux side can finish up cleanly and you
aren't left with stale devices lying around.
> However, the four paths remain in my /dev/ heirarchy, and vgscan
> returns this for each of the devices that are no longer really there:
> /dev/sdf: read failed after 0 of 4096 at 0: Input/output error
Once you've made sure nothing's left that's using these you should be
able to remove the SCSI device using sysfs:
echo 1 > /sys/block/<dev>/device/delete
For each SCSI device that you have removed.
More information about the linux-lvm