Hello, my name is Jonah. I'm a Senior Principal Engineer at Dell Technologies, and in this video I'm going to demonstrate how to replace a drive in Azure Stack HCI using PowerShell and Windows Admin Center. To start with we're going to open up PowerShell using admin and we're going to run 'Get-PhysicalDisk'. Now as you can see I have all my disks listed here, they all show as operational status okay, everything's healthy.
So to simulate a failure I'm going to come over here to this drive, and I'm going to remove it. Now if we run 'Get-PhysicalDisk' it shows that we have one in 'Lost Communication', so this is assuming that your disk has failed and you just you just need to replace it. All right, so the disc is in 'Lost Communication' so we're going to run 'Get-PhysicalDisk' and we're going to say where object health status is not equal to healthy, and that returns the right disk, so now we're going to set the disk usage to retired.
All right, now if we run 'Get-PhysicalDisk' you see the usage is set to 'Retired' so now we can physically go and pull that disk out and everything should be okay. Assuming that we have enough free space in our pool the cluster actually should start auto-rebuilding everything for us. Which it is doing, which is awesome. So now that disk has been removed we'll let the storage jobs finish, and once they are done then we will just go and add a new disk.
All right, and they're done. So now we've pulled our physical disk out of the server, and we've got our new one we're going to go ahead and install it. I'm just going to add a drive. All right we've added a new disk in there, now we run 'Get-PhysicalDisk' , and we can see that 1004, which is the disk that we removed, is showing up and healthy, it's automatically been added to the pool and our storage jobs should already be complete. Yep. There it is. It's removed the old physical disk, it's added a new physical disk and it's done a cache update so we should be good. That's all we have to do in Windows PowerShell.
To do this in Windows Admin Center it's basically going to be the exact same options. We're going to come in here, go to settings, I'm just going to remove this disk again, and if we check 'Get-PhysicalDisk' our drive has lost communication again. So now we're going to come over here to Windows 10, and here's our cluster, and if you notice we do have a drive that shows us 'Critical'. So we can come over here to drives, go to our inventory and we have this drive that shows 'Lost Communication so we can click on that choose 'Retire'.
Drive has now been retired, now we come over here and we're just gonna physically remove and then add the new disk right here, and if we come back over here and we go to our refresh icon here. It may take it a little bit, all right you can see the new disk did show up. It shows, it's not in the pool quite yet, it will automatically add it in there though.
All right our old drive has disappeared now, it's been retired and removed and our new drive is now showing as in the pool and it's starting to get usage. And that's it. That's all you have to do to replace the hard drive. Server 2019 and HCI OS are pretty easy to replace drives now because they do most of the things automatically for you, but if you ever need help just contact support and we will be happy to assist.
Thank you.