|By Keith Mayer||
|October 14, 2012 04:00 PM EDT||
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.
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!
|Build Your Lab! Download Windows Server 2012|
|Don’t Have a Lab? Build Your Lab in the Cloud with Windows Azure Virtual Machines|
|Want to Get Certified? Join our Windows Server 2012 "Early Experts" Study Group|
- Innodisk | Efficiencies for Cloud Hardware at Cloud Expo New York
- Join Gartner, IBM, + AWS at AppSphere and save $200 when you register in August!
- In 2014 Big Data Investments Will Account for Nearly $30 Billion - Eventually Accounting for $76 Billion by 2020 End
- Global Cloud Security Market Growing at 15.7% CAGR to 2020: Forecast & Analysis in Research Report Available at ReportsnReports.com
- Video: DevOps and Security
- Worldwide Indoor Location Market Growing at 46.0% CAGR to 2019 Says a New Research Report Available at RnRMarketResearch.com
- Flexera Software's InstallAnywhere 2014 Simplifies Multi-Platform Installation for Physical, Virtual and Cloud Environments
- Mobility News Weekly – Week of August 3, 2014
- Searchmetrics Drives Over 200% World-Wide Growth As More Business Leaders Begin To Recognize The Value Of Search
- Mobility News Weekly – Week of August 17, 2014
- Digital Transformation's Impact on Enterprise Mobility and App Design Strategies
- Web Analytics Market by Solution (Search Engine Tracking & Ranking, Heat Map Analytics, Marketing Automation, Behavior Based Targeting) & by Services (Professional Services, Support & Maintenance) - Worldwide Forecasts & Analysis (2014 - 2019)
- Mobile Commerce News Weekly – Week of August 3, 2014
- Red Hat To Present At Internet of @ThingsExpo
- Mobile Cyber Security News Weekly – Week of August 10, 2014
- Where Are RIA Technologies Headed in 2008?
- Dolphin Announces Open API With Over 50 Add-ons Including Dropbox and Wikipedia
- Cloud People: A Who's Who of Cloud Computing
- 21st century Modern Alarm systems continue to play a key role in various institutions and industries
- SEO/SEM Tips & Tricks: How and When Should You Submit Your Website to Google?
- Cloud Expo 2011 East To Attract 10,000 Delegates and 200 Exhibitors
- Tips For Press Releases in Reputation Management from Industry Veteran Brandon Hopkins
- Yahoo! to Keynote 4th Cloud Expo: Accelerating Innovation with Cloud Computing
- Google Version 2.0: Googzilla - The Calculating Predator
- ManageWP Powers Over 100,000 WordPress Sites Within Three Months of Launch
- Ulitzer’s Amazing First 30 Days in Public Beta
- Google's Competitive Advantage: It Leverages "The Power of Free"
- Ulitzer vs. Ning - a Quick Review
- AOL To Enhance Video Search Engine by Adding RSS Feeds
- Confessions of a Ulitzer Addict