Network Management
Delete volumes from nodes in NPM and SAM
This article describes how to delete volumes that are no longer used by a specific node or that no longer need to be monitored.
First published date
Last published date
Overview
Instances where non-existing Volumes that have been removed are still present on specific Nodes, show as an Unknown status and cause cosmetic errors and confusion on monitoring. The article shows how to delete volumes via Orion Web's managed node from a specific node and Bulk / Mass Volume removal through a direct SQL script.
Product section
Resolution
For a Single Node; the Website offers
-
On the SolarWinds Platform Web Console, go to Settings > Manage Nodes.
-
Search for the affected device and expand the arrow next to the device to show the associated elements for that device.
-
Select the Volumes which you would like to delete.
-
Click on Delete in the Menu bar.
For Mass / Bulk Volume removal... It is recommended you.
-
Create a reference record in the DeletedVolumes Table and
-
Delete the records from the Volumes Table
Here we provide a way to generate a way to filter, list & executable SQL script to both reviews & then delete unwanted volumes from the SolarWinds Platform.
*SolarWinds does not provide a Web-based 'Bulk/Mass' deletion feature at this time. The following SQL direct script can be executed from the SolarWinds Platform Server 'Database Manager' to accomplish this task.
Direct Microsoft SQL script: -- Run this SQL Query to generate a script to prepare NightlyMaintenance for deletion of Volumes in the SolarWinds Platform.
-- this example filters by Status of down and MachineType includes windows
- Step 1 create an output that generates a script of Volume records to do both parts
-- Scripts are not supported under any SolarWinds support program or service.
-- Scripts are provided AS IS without warranty of any kind. SolarWinds further
-- disclaims all warranties including, without limitation, any implied warranties
-- of merchantability or of fitness for a particular purpose. The risk arising
-- out of the use or performance of the scripts and documentation stays with you.
-- In no event shall SolarWinds or anyone else involved in the creation,
-- production, or delivery of the scripts be liable for any damages whatsoever
-- (including, without limitation, damages for loss of business profits, business
-- interruption, loss of business information, or other pecuniary loss) arising
-- out of the use of or inability to use the scripts or documentation.
Select
'Delete from Volumes where Volumeid=' as [Deletion Script],
V.VolumeID, '--',
N.Caption as [Node Name], n.NodeId, V.Caption as [Volume Name]
from Volumes v inner join Nodes n on V.NodeID=N.NodeID
WHERE v.Status = 0 AND n.MachineType LIKE '%Windows%'
Union
select
'insert into DeletedVolumes values (' as [Deletion Script],
V.VolumeID, ') --',
N.Caption as [Node Name], n.NodeId, V.Caption as [Volume Name]
from Volumes v inner join Nodes n on V.NodeID=N.NodeID
WHERE v.[Status] = 0 AND n.[MachineType] LIKE '%Windows%'
order by Volumeid
Cut and paste the output of this query to SQL editor and Execute the output.
Here is a sample of the output:
GeneretedScript Comments providing extra friendly info
Delete from Volumes where Volumeid= 16 -- node-465 15 Physical Memory
insert into DeletedVolumes values ( 16 ) -- node-465 15 Physical Memory
Delete from Volumes where Volumeid= 17 -- node-466 15 Virtual Memory
insert into DeletedVolumes values ( 17 ) -- node-466 15 Virtual Memory
Delete from Volumes where Volumeid= 18 -- node-467 15 C:\ Label: D6F841D2
insert into DeletedVolumes values ( 18 ) -- node-467 15 C:\ Label: D6F841D2