| By Keith Mayer | Article Rating: |
|
| October 14, 2012 04:00 PM EDT | Reads: |
4,398 |
Very Cool! How can I build my own "Storage Spaces"?
"Storage Spaces" can be easily configured locally or remotely on servers running Windows Server 2012 or Hyper-V Server 2012. Pick your tools - Use the new Server Manager GUI management tool, or a new set of 74 PowerShell Storage Cmdlets if you're more inclined towards the command-line. In my case, I find myself constantly provisioning and re-provisioning storage for my lab environment, so I prefer PowerShell 3.0 as my tool of choice.
Setting up a new Storage Space involves three components: A storage pool that serves as a container, or resource pool, of your physical disks; A virtual disk, or LUN as we call it in the SAN world, that carves out a portion of your raw capacity in the storage pool to present as a disk to the operating system; and a volume, which becomes the formatted space that we can mount as a filesystem and, ultimately, store our files within.
Let's step through the basics of configuring each of these items one-by-one using the new PowerShell 3.0 Cmdlets:
- Grab a "bunch of disks" into a new PowerShell object variable, such as $PhysicalDisks:
$PhysicalDisks = Get-StorageSubSystem -FriendlyName "Storage Spaces*" | Get-PhysicalDisk -CanPool $True
This command identifies all physical disks that are not currently part of an existing Storage Pool on the server and stores them in the $PhysicalDisks object array. If we look at the contents of the $PhysicalDisks variable now, we'll see an enumeration of each physical disk as follows:
- Using our new $PhysicalDisks object array, now we'll create a new storage pool named "MyStoragePool01" and then pass this newly created storage pool down the PowerShell object pipeline to the command line in Step 3.
New-StoragePool -FriendlyName MyStoragePool01 -StorageSubsystemFriendlyName "Storage Spaces*" -PhysicalDisks $PhysicalDisks |
- Using the newly created storage pool that we passed from Step 2 into the PowerShell object pipeline ... create a new 100GB virtual disk named "MyVirtualDisk01" that is thin provisioned. Pass this newly created virtual disk down the PowerShell object pipeline to Step 4.
New-VirtualDisk -FriendlyName MyVirtualDisk01 -Size 100GB -ProvisioningType Thin |
Note that, by default, a "Simple" virtual disk will be created with no disk fault tolerance. You can also use the -ResiliencySettingName parameter with the New-VirtualDisk Cmdlet to choose either "Mirrored" or "Parity" virtual disk configurations for fault tolerant scenarios. Of course, choosing a fault tolerant scenario will cause a higher volume of disk writes to occur, which can impact overall performance - so you'll want to do some testing with your hardware and applications. In my testing, Mirrored provides the best balance of performance and fault tolerance for me and also works nicely with the file system resiliency features in the new ReFS filesystem for large data volumes.
- Using the newly created virtual disk that we passed from Step 3 into the PowerShell object pipeline ... initialize the new disk, create a new partition mounted with the next available drive letter and format a volume within the new partition.
Initialize-Disk -PassThru | New-Partition -AssignDriveLetter -UseMaximumSize | Format-Volume
Done! If you didn't quite catch it as we were going through steps 2, 3 and 4 above ... those commands are all part of one continuous command line! That's right ... in one line of code, we created a new storage pool, virtual disk and formatted volume! PowerShell 3.0 ROCKS! :-)
Your Turn ... Build Your Own "Storage Spaces"!
As part of our FREE Windows Server 2012 "Early Experts" study program, we have a structured set of step-by-step study materials and lab exercises for watching, learning and implementing Storage Spaces in Windows Server 2012. Join us and become our next "Early Expert" at http://EarlyExperts.net! When you're ready to try the Storage Spaces lab, you'll find it here.
What's Next?
In this article, we walked through usage scenarios and step-by-step examples of configuring SAN-like storage solutions on commodity hardware using Windows Server 2012 Storage Spaces. To continue your learning on Windows Server 2012, check out these resources next ...
- You've got Storage! Now learn how to use it for storage capacity in Hyper-V Replica Disaster Recovery scenarios or Shared Nothing Live Migration scenarios
- Server Management: Interested in learning more about server management in Windows Server 2012? Check out this post on Brian Lewis' blog!
- PowerShell: Get up to speed on PowerShell 3.0 in this post on Matt Hester's blog!
- Want to Get Certified on Windows Server 2012? Become an "Early Expert" for FREE at http://EarlyExperts.net!
How Are You Planning to Use "Storage Spaces"?
Have you found an interesting use case for Storage Spaces and/or PowerShell 3.0 in your shop? Be sure to share your story in the comments below!
HTH,
Keith
Published October 14, 2012 Reads 4,398
Copyright © 2012 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Keith Mayer
Keith Mayer is a Technical Evangelist at Microsoft focused on Windows Infrastructure, Data Center Virtualization, Systems Management and Private Cloud. Keith has over 17 years of experience as a technical leader of complex IT projects, in diverse roles, such as Network Engineer, IT Manager, Technical Instructor and Consultant. He has consulted and trained thousands of IT professionals worldwide on the design and implementation of enterprise technology solutions.
Keith is currently certified on several Microsoft technologies, including System Center, Hyper-V, Windows, Windows Server, SharePoint and Exchange. He also holds other industry certifications from IBM, Cisco, Citrix, HP, CheckPoint, CompTIA and Interwoven.
Keith is the author of the IT Pros ROCK! Blog on Microsoft TechNet, voted as one of the Top 50 "Must Read" IT Blogs.
Keith also manages the Windows Server 2012 "Early Experts" Challenge - a FREE online study group for IT Pros interested in studying and preparing for certification on Windows Server 2012. Join us and become the next "Early Expert"!
- Cloud People: A Who's Who of Cloud Computing
- Enterasys Spotlights SDN's Impact on Traditional Networking in Upcoming Webinar
- NASA's Twitter Account Wins Back-To-Back Shorty Awards
- Google Compute enters the IaaS market
- GoBank Announces Timing of General Availability and National Distribution Relationships at FinovateSpring
- MicroStrategy Announces General Availability of MicroStrategy 9.3.1
- MicroStrategy Announces General Availability of MicroStrategy 9.3.1
- Cloud Expo | Maximizing the Small Things: Efficiencies for Cloud Hardware
- Cloud Business Solutions, Social Media, and Platform Systems of Engagement Market Shares, Strategies, and Forecasts, Worldwide, 2013 to 2019
- Google Submits Concessions to EC; Gets Sued in the UK
- Infinity Augmented Reality and Technical Evangelist Robert Scoble Are Enthusiastic About the Upcoming Release of Google Glass
- Global Mobile Security (mSecurity) Market 2013-2018
- Cloud People: A Who's Who of Cloud Computing
- Enterasys Spotlights SDN's Impact on Traditional Networking in Upcoming Webinar
- RetailMeNot Shoppers Trend Report: While Over 8 in 10 U.S. Residents Cite Affordability as Their Top Vacation Priority, a Majority (58%) Could Waste Hundreds of Dollars by Booking Travel a la Carte
- NASA's Twitter Account Wins Back-To-Back Shorty Awards
- ChannelAdvisor Participates in Upcoming Retail Industry Conferences RBTE and Retail Week Live
- Basho Announces Open Source Riak CS and General Availability of Riak CS Enterprise v1.3
- Google Compute enters the IaaS market
- How to Protect Your Facebook Account Before Graph Search is Public
- Google Says Motorola’s Upcoming Phones Don’t ‘Wow’ Them
- Why Cloud Computing Skills Will Be Required for IT Workers
- GoBank Announces Timing of General Availability and National Distribution Relationships at FinovateSpring
- MicroStrategy Announces General Availability of MicroStrategy 9.3.1
- Where Are RIA Technologies Headed in 2008?
- Cloud People: A Who's Who of Cloud Computing
- Dolphin Announces Open API With Over 50 Add-ons Including Dropbox and Wikipedia
- ManageWP Powers Over 100,000 WordPress Sites Within Three Months of Launch
- SEO/SEM Tips & Tricks: How and When Should You Submit Your Website to Google?
- Google Version 2.0: Googzilla - The Calculating Predator
- Google's Competitive Advantage: It Leverages "The Power of Free"
- Cloud Expo 2011 East To Attract 10,000 Delegates and 200 Exhibitors
- Google Space Launches at Heathrow Airport
- AOL To Enhance Video Search Engine by Adding RSS Feeds
- Ulitzer’s Amazing First 30 Days in Public Beta
- The World's Youngest "Google Entrepreneur" Is One Month Old





























