Friday, August 24, 2018

Windows 10 IoT Core - Initiating Recovery Via Recovery Partition

Windows 10 IoT Core images can be built to include a recovery partition.  This can be useful for restoring the device to a working state without having the user reimage the device (which can be especially difficult with a Dragonboard 410c or similar Qualcomm Snapdragon 410 based device).

Our clue for initiating it yourself is buried in the iot-adk-addonkit (or bcdedit if you are really bored):

bcdedit /set {bootmgr} bootsequence {a5935ff2-32ba-4617-bf36-5ac314b3f9bf}
shutdown /r /t 0
You can initiate this by using the Windows.System.ProcessLauncher API.

I've also initiated the process by interrupting power to the device three times in a row during startup.  In a perfect world, you would use a companion app or hardware button to initiate a restore as well.

Thursday, August 23, 2018

Windows Storage Spaces - Setting Up a Mirrored SSD Tier with RAID5 HDD Tier

Storage Spaces is a great improvement over the baseline software RAID functionality built into Windows.  The ability to have a SSD cache tier as well as full management via PowerShell only sweeten the deal.

I use it on my lab VM host which mostly does compiling of OS images and shuttling files back and forth to work.  My existing setup was a mirrored 1TB SSD cache tier with 6 x 3TB HDD tier.  I wanted to try keeping the SSD tier mirrored, but move the HDD tier to RAID5.

Long story short, the performance is pretty terrible for what I do, but I wanted to write a blog post for anyone looking to do this for their own purposes.  I suspect a larger SSD cache might make a difference, but I'm also certain the performance characteristics are good enough for a fancy Plex server or other less write intensive application.

Here's the PowerShell to set it up (change the size values for your array.  You might have to guess a bit):

Get-StorageTier | Remove-StorageTier #Delete existing tiers if you have tried this 23939 times.
New-StorageTier -StoragePoolFriendlyName StoragePool -FriendlyName SSD_Tier -MediaType SSD -ResiliencySettingName Mirror
New-StorageTier -StoragePoolFriendlyName StoragePool -FriendlyName HDD_Tier -MediaType HDD -ResiliencySettingName Parity
$ssd_tier = Get-StorageTier -FriendlyName SSD_Tier
$hdd_tier = Get-StorageTier -FriendlyName HDD_Tier
New-VirtualDisk -StoragePoolFriendlyName StoragePool -FriendlyName "VirtualDisk" -StorageTiers @($ssd_tier,$hdd_tier) -StorageTierSizes 400GB, 13000GB -WriteCacheSize 50GB

Monday, August 20, 2018