Storage Spaces

In Server 2012 R2, there's a feature called Storage Spaces, which lets you abstract your physical storage by pooling physical disks into a single massive entity, on which you create virtual drives that are striped or mirrored across the physical disks according to your wishes.  These virtual drives are not VHD files: their descriptions are written directly to disk, allowing a disk from a storage spaces pool to be imported into a new server in a disaster recovery scenario.

In the process of learning about this, I was impressed by the disk throughput of the $330 Seagate SAS 4TB ST4000NM0023 in a client's server.  I would need this $370 SAS to PCIe adapter if I wanted to try SAS disks at home.

Storage Spaces FAQ from Microsoft.

I'm not aware of a built-in notification feature with Storage Spaces, so I assembled a Powershell script which checks two event logs every minute for a warning or error and emails me if one is found. 
  • I did try attaching a task to an event, but when two events were logged simultaneously, I only got an email about one of 'em.
  • The script below was designed to work with Comcast at my residence, which required using a Comcast SMTP server with SSL and SMTP authentication.  Feel free to tweak it for yourself.
  • If no errors or warnings are found, the script writes an entry into the Application log to show that it is running.
  • A level 1 event is "critical"; a level 2 event is an "error".

If you're running this on Hyper-V Server 2012 R2, you need to create the scheduled task from a command line, so here's a Powershell script for that:

  • Run level of "1" means highest privileges; "0" would mean limited privileges.
  • This script creates a task that runs "C:\CheckLogs.ps1"
  • The last three lines exist simply to document who is responsible for the task.