On a daily basis I run the below query to find any volumes with issues and delete them. I've noticed that they same volumes end up coming up, even after deletion. This is due in part by a daily network discovery but I can't seem to exclude them for it.
How can i remove these ghosted volumes permanently?
SELECT [dbo].[Volumes].nodeid, node.caption as nodename, [dbo].[Volumes].caption as volumename
FROM [dbo].[Volumes]
join [dbo].[nodes] node on [dbo].[Volumes].nodeid = node.nodeid
where VolumeIndex = 0
group by [dbo].[Volumes].nodeid, node.caption, [dbo].[Volumes].caption
order by nodename