Tuesday 6 October 2015

Maintaining and Expanding a RAID-5 Array

In my previous post I talked about my initial set up of Windows Home Server 2011 (WHS2011) onto my file server, I’d like to talk about a few key topics when it comes to RAID arrays : maintenance and array expansion / growth.

Maintenance

Looking after your RAID array is pretty much non-existent other than checking that you array is healthy. There are a couple of ways you could do this, firstly, the condition of drives themselves could be useful to know – you can get indication of drive health by examining the SMART data that is available. Applications such as speedfan can read the SMART data and make it easily viewable for you. Here is a preview of one of the drives SMART data in Speedfan :


SSD SMART Data

The second way that I know of is to type “compmgmt.msc” in the run / search command

Computer Management
And press enter to bring up the Computer Management tool, choose the Disk Management option under Storage on the left hand side – this is where the array was built from and you can get indications of its status here too. When you first create the RAID array, Windows needs to “synchronise” the drives. The reason for this is because RAID-5 uses an algorithm to split data across the four drives in a particular way… in basic speak the RAID-5 algorithm says “a bit of the data is on Disk 1, another bit is on Disk 2 and the final bit is on Disk 3, but just to check that the array hasn’t corrupted / drive failed perform a parity check – the parity data is held on Disk 4”. When you start with a brand new array your drives are theoretically empty. Windows will run over all the drives applying that algorithm so that they are “prepped and ready” for new data.

This building process can be very slow, but I did find that the array was available straight away, so I started dumping my data onto it – although that did slow down the array building process quite a bit.
Lets say a drive has failed in the array … how do you know? Well, so far, I haven’t found a way to make the server automatically report it via an email or a pop-up, so until I’ve set something up to do that, I need to check it manually every now and then. So in my situation, what I did was unplugged the SATA cable to a drive to simulate a failure … when I load up Computer Management :


Failed redundancy
You see that the RAID array drives have the status : failed redundancy. What this means is that the level of redundancy given to you by RAID-5 has been lost due to a drive failure – the beauty of RAID-5 is that you can lose any of the drives – it won’t matter, but lose a second drive before you have fixed the first and you've now started loosing data.

How do we deal with this? Well, we get ourselves a new hard drive and get it plugged in :

Adding a new drive
The very top drive is my replacement drive – its a 1 TB drive as opposed to a 500 GB drive but that doesn't matter, as long as the drive is the same size or bigger than the broken one all is fine.
Right click the drive and select “convert to Dynamic Disk”:

Dynamic disk
You are then greeted with a little pop-up box to ask you which drives you want to convert (you could have several, doing them all in one go will save time)

Drive conversion

You will then see the status of the drive change to “Dynamic Online” … once that appears you can “add” the drive to the RAID-5 array by right clicking any of the RAID-ed drives and clicking “repair volume” :




This brings up a window that asks which drive(s) do you want to add to the RAID array:




The drives will then start to resynchronise again – this wont take as long as when the drives were initially initialised in the RAID array because 3 out of the 4 drives contains prepared data so the process just needs to prepare the fourth drive.  Having said that, it still takes a few hours at least. Once it does finish, the array should return to the healthy state.

Windows will still have a record of the previous 500 GB drive however, so you want to remove that from its records by right clicking on the drive that says “missing” and choosing to remove it :




I had a pair of external hard drives laying around that I wasn't really using, they were 1 TB and 2 TB drives. So what I did was follow this process for replacing a failed drive with a new one. So two of my 500 GB drives are replaced with a 1 TB and 2 TB drive. The idea is to sell them to buy more 2 TB drives so that my entire array is filled with 2 TB drives – that's the dream! That will give me 6 TB of storage, which will certainly do for the foreseeable future!

Expanding the array

Adding new drives to an array to boost capacity follows the same process as above – physically add the drive to the PC, convert to dynamic, repair the volume to add the new drive and off you go!

The first section about repairing the array was something that I had struggled to get information on from my prowls of the internet, hopefully this will be useful for you out there!
Ciao for now!

No comments:

Post a Comment