Dell Storage Volume Cleanup with PowerShell

If you’re new to PowerShell with Dell Storage, be sure to take a look at this post.  Depending upon the size of system that your managing, over the course of time, you might have experienced some challenges in managing disk resources, especially if you’re using an array in a lab-type environment.

Here’s an easy way to inventory volume objects on your SC Series array which are not currently mapped, and also find out how much actual space they’re consuming.

This script uses the Dell Storage PowerShell SDK.  We’ll highlight the main calls used to get the information.  This example doesn’t cover error handling or import of the PowerShell module for the Dell Storage PowerShell SDK.

Useful function

The ConfiguredSpace and ActualSpace properties return a Size type which is really a string with numbers and the measurement type, either MB, GB, TB, or PB.  This can make it difficult to sort columns by size when needing to do so by number vs. string.

This function converts those columns to megabytes and returns an integer based on what string is passed in.  Then you can create a column that contains the integer and sort by that while displaying the string property.

THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.

Getting unmapped volumes

There is a “mapped” property that can be used to return a boolean value, which makes it easy to get a list of volumes that aren’t “in use”.

Once we have the volume list, we build a custom object with properties for both the configured space and actual space of the volume.  We get that information through a couple of new cmdlets associated with “storage usage”.

Here’s what the output looks like:

posh1

Conclusion

You can now get a report of unmapped volumes and the amount of actual disk space on each being consumed.  There are additional properties that can be exposed to provide information on RAID overhead and replay consumption.

PowerShell Scripting Options for Dell Storage

Back in 2008, Compellent released their first iteration of the PowerShell Command Set.  They were the first storage vendor on the scene to provide PowerShell automation capabilities with the Series 40 array.

Fast forward a bunch of years.  The PowerShell Command Set has grown from 50 cmdlets to over 100, and added the capability to work with more advanced features like replication and Live Volume.

In Late 2015, Dell Storage introduced the Enterprise Manager API and also the Dell Storage PowerShell SDK, which uses the EM-API.  With the introduction of the EM-API, we went from exposing 100 cmdlets for operations to over 1,000.  The possibilities are endless as you head down the road to automation and orchestration of your Dell Storage environment.

What’s the difference?

The biggest difference is in the execution of the cmdlets.  The new SDK uses the EM-API made available in Enterprise Manager 2015 R2.  With the EM-API and the PowerShell SDK, cmdlet calls are directed to the EM Data Collector server.  This is different from the Command Set behavior where calls are directed at the management IP address of the array controllers.

What other changes are there?

Notably, the naming conventions changed for all of the cmdlets.  Previously, Command Set cmdlets were in the format of “Get-SC….”, with the PowerShell SDK, those have been further refined to adhere to naming conventions.  So, for example, the Command Set has a cmdlet called “Get-SCVolumeMap”.  That equivalent cmdlet in the SDK is now “Get-DellScMapping”.  Along with the cmdlet name changes, you’ll find that a lot of the parameters for each cmdlet have changed as well.

Is there a “1 to 1” mapping of the cmdlets available anywhere?

There is a table in the Getting Started page of the PowerShell SDK HTML Help that shows how old cmdlets map to the new.  Due to the sheer nature of the number of cmdlets now supported, changes were necessary in the overall naming.  If you have existing scripts written for the Command Set, they will need to modified to work with the SDK.

Is the Command Set going away?  Do I need to convert all of my scripts now?

The current direction is to move away form the Command Set and all future focus on the EM-API.  There is no further Command Set development planned, but there has also not been an end-of-life data established.  It makes sense to start looking at the PowerShell SDK to get an idea of what changes your current scripts will require.  It also provides you an opportunity to implement features in your scripts that might not have been previously available with the use of the Command Set.

Where do I start?

If you’re looking for a good primer on using the Dell Storage PowerShell SDK, there are a couple of great resources available:

The Introduction to Dell Storage PowerShell SDK Video walks you through the basics of the setup, configuration, and usage of the PowerShell SDK.  If you’re a previous Compellent PowerShell Command Set user, this will get you up and running quickly.

For the do-it-youselfers who just need an extra push, check out the Dell Storage PowerShell SDK Cookbook.  The cookbook contains a lot of scripting samples for a lot of different tasks that you would want to automate in your environment.

The new Dell Storage PowerShell SDK adds a lot of capabilities in managing and automating repetitive tasks in your storage environment.

Additional resources

This post also appears on the Dell TechCenter Blogs here.

Volume mapping and LUN associations with Dell Storage PowerShell Command Set

I wrote this script sample for someone who was interested in managing their failover with Sync Live Volume, but wanted to get a high-level view of mappings including LUN information and WWNs ahead of time so they could compare that information across arrays and prevent conflicts as they worked out their disaster recovery plan.  Dell Storage Manager obviously has this information, but having it in a format in one place is convenient, and putting it in CSV format adds some flexibility.

This script uses the Compellent PowerShell Command Set (version 7.1.2.1) which is available for customers to download from the Compellent Knowledge Center.  This script was designed specifically for the Command Set and won’t work with the newer Dell Storage PowerShell SDK which was released late last year.

For our implementation, we followed these steps:

  1. Make a connection to the Storage Center with the provided credentials.  We don’t store the password in the script, instead we prompt for it on execution.
  2. We retrieve all of the mappings on the Storage Center with the Get-SCVolumeMap cmdlet.
  3. We then iterate through the mappings and create a custom psobject containing the info we need.  This gives us the flexibility to use standard cmdlets for formatting and display.
  4. We output the psobject array with a format-table command.
  5. Optionally, we can output the psobject array to a CSV for further review and customization.

Here is the finished product:

Sample output:

 

Camever general release now available

Thanks to everyone that provided feedback during the beta period.  With the beta expiring at the beginning of April, we’ve made some updates released this new version as a general release and out of beta.

If you’re not familiar, Camever is a webcam capture tool designed to work with most Foscam and Amcrest cameras that support the retrieval of an image from it’s snapshot.cgi in a web browser.

With a host of features including scheduling, Weather Underground Wundercam integration, image overlay, and more.  After you get done capturing a days worth of images, you can use Time Lapse Tool to put them all together into a time lapse movie.

You can read more about Camever’s features and download it from the project page.

“Camever”, A Web Capture Tool for Foscam and Amcrest Cameras

This is an “Armchair Coder” I’ve been working on this since the holidays, so today I’m releasing the beta of Camever. Camever is a webcam capture tool designed to work with most Foscam and Amcrest cameras that support the retrieval of an image from it’s snapshot.cgi in a web browser.

With a host of features including scheduling, Weather Underground Wundercam integration, image overlay, and more.  After you get done capturing a days worth of images, you can use Time Lapse Tool to put them all together into a time lapse movie.

You can read more about Camever’s features and download it from the project page.