Login to participate
Endpoint Management & Virtualization ArticlesRSS

Customizing the Behavior of the Dynamic RAID Type in the Job Builder

lordmithrandir's picture

The Job Builder is a new utility in the latest release of Deployment Solution for Dell Servers 3.0. For more information on the Job Builder see the Juice article "Tips and Tricks for using the Job Builder for OS Deployment". One of the best features of the Job Builder is the rule based RAID task. One of the RAID types that can be assigned to a disk group is the dynamic RAID option. Dynamic RAID is a pre-defined script that creates virtual disks based on the number of disks found on a controller. But what if you want to modify the dynamic RAID default behavior? It's easy to do and I'll show you how.

Dynamic RAID Explained

What exactly is dynamic RAID? Dynamic RAID really is just a script. The script creates a virtual disk on a controller according to the number of disks in the group. By default if you have 1 disk a RAID-0 virtual disk is created, if you have 2 disks a RAID-1 virtual disk is created, and if you have 3 or more disks a RAID-5 virtual disk is created.

It's fairly simple to change this behavior, but as usual the method of doing so depends on the pre-boot environment you are using. I recommend you make your changes for both environments so you don't have differing behaviors.

Linux

For Linux the dynamic RAID script is located in the [Deployment share]\Dell\ascripts\linux folder, and is named dyn_raid.sh. There is a section toward the bottom of the script where the decision about what RAID type to apply is made. It is a simple series of if, else if statements and is based entirely on the number of disks. This number of disks is passed into the script as a parameter. You can change the "if" block in any way you want, just make sure all the cases are covered. The easiest way would be to just add some "elif" statements to it that take a specific action based on a specific number of disks. See Figure 1 for an example of adding RAID-10 support. My changes are highlighted in yellow.

Note: You'll want to make sure that the final else always works for any case not covered by the other cases. By default RAID-5 is selected if more than 3 disks are found.

WinPE

For WinPE the dynamic RAID script is located in the [Deployment share]\Dell\ascripts\winpe folder, and is named dyn_raid_winpe.bat. Adding a new RAID type is a bit more complicated than Linux because it doesn't use an if else block. Instead it sets the RAID type if the number of disks matching a certain value, and then for the final else it checks if the RAID type has been set, if it hasn't then it sets it to RAID-5. The same considerations exist for this script as do for the Linux script. You need to make sure all the cases are covered regardless the number of disks. Also the final "else" statement (which really isn't an "else" statement) may need to be modified to make sure it doesn't change things on you in an unexpected way. For example, if you add a line for RAID-10, then you need to add RAID-10 in the check for the final "else" or else it will change the RAID type to 5. See Figure 2 for an example of adding RAID-10 support. Again, my changes are highlighted in yellow.

That's about all there is to it. Again I emphasize that care needs to be taken when modifying this script. The purpose of this script it to throw an arbitrary number of disks at it and it will find a valid RAID type for the number of disks given. You need to make sure you are careful when changing the logic so it still produces a valid RAID type for any number of disks.