Enabling RAID 1 on a Mac Mini Server

Today I bought a new Mac Mini running Mac OS X Server to replace an aging home-built Linux server that supports my home network. You might recall that in early 2009 I wrote an article about how I had worked to provide some Ubuntu-Mac integration on the home network. Although the integration has worked well since that time, many of the functions that the Ubuntu server was providing have since been taken over by an Iomega ix4-200d NAS box. It’s the Iomega that now handles all my Time Machine backups and CIFS/AFP file sharing. In addition, I’ve been looking for a way to create a “master” iTunes library for the entire house, and the Linux server with Firefly Media Server, while powerful, just wasn’t doing what I needed it to do. So I figured I’d replace it with an Intel-based Mac Mini running Mac OS X Server. The network services the Linux server is now providing would either be replaced by the Mac Mini or by VMs running on the Mac Mini vis VMware Fusion.

After I bought the Mac mini and brought it home, I was dismayed to find that Apple hadn’t enabled RAID 1 on the dual 500GB hard drives in the system. Unfortunately, enabling RAID 1 mirroring on the hard drives wasn’t as simple as using Disk Utility. I did find a way, and in the interest of helping others, here are the steps that I followed. As I type this, my Mac Mini server is downstairs rebuilding it’s RAID 1 mirror set.

Here are the steps to follow to enable RAID 1 on the drives in your Mac Mini Server:

  1. First, you’ll need to boot from some source other than one of the internal hard drives. I chose to use the Mac OS X Remote Install application, found in the Utilities folder. This allows your Mac Mini server, which doesn’t have an optical drive, to boot from the optical drive on another Mac on your network (that’s assuming, of course, you have another Mac on your network). The procedure for booting remotely using the Remote Install application are already well documented, so I won’t bother to include them again here.
  2. Once you’ve booted remotely, open a Terminal window and use this command to list the disks and volumes in your system:
     
    diskutil list
     
    In all the online guides to this process, the “Server HD” volume was always listed as disk0s2; on my system, it was listed as disk1s2. Just be sure to note the device names so that you can use them later.
  3. Use this command to convert the existing “Server HD” volume to a RAID 1 mirror:
     
    diskutil appleRAID enable mirror <device name for "Server HD">
     
    Mac OS X will convert the existing “Server HD” volume into a RAID 1 mirror with only one member. From what I can tell, this process is instantaneous and takes effect immediately.
  4. Use the diskutil list command again to get the device name for the new RAID set. On my system, it was referenced as disk9, but this will vary from system to system.
  5. Next, add the second hard disk as a member to the RAID 1 set:
     
    diskutil appleRAID add member <device name for second hard disk> <device name for RAID set>
     
    For example, on my system the second hard disk was actually disk0s2 and the RAID set was disk9, so the command looked like this:
     
    diskutil appleRAID add member disk0s2 disk9
     
    And that should do it! Mac OS X will add the second drive to the RAID 1 set and begin the rebuilding process. If you do this right after unboxing your new Mac Mini, it will minimize the amount of time required.

I’m still waiting on my Mac Mini to finish the rebuilding process, so I’ll update this post if I discover something unusual or find that some additional steps are necessary to make everything work.

Tags: ,

  1. LWR’s avatar

    In step 5, you say “the second hard disk was actually disk0s1″, but the command uses “disk1s2″ — presumably, that’s a typo?

  2. slowe’s avatar

    LWR, there were errors all over the post! I’ve corrected them, thanks for pointing that out. That’s what you get for posting a blog entry late in the evening when you’re tired…

  3. Gallop’s avatar

    My goodness that is a lot of work. Ru asking too much of what you bought? Or did you way over buy for what you are trying to do. You should probably write another article on not letting platform bias compellimg you into a purchase. What is the per gb cost of mirrored drives on a Mac mini?

  4. Andrew Miller’s avatar

    If you haven’t already, take a look at SoftRAID….MUCH more robust/feature-rich than the built-in RAID offering on OS X (I used it in a previous life for some production Mac servers).

    http://www.softraid.com

    No affiliations, etc.

  5. slowe’s avatar

    Gallop, I certainly didn’t buy the Mac Mini Server on the metric of cost/GB; there are far cheaper solutions if that is your primary metric. As I pointed out in the post, there were other motivations that led me to choose a Mac Mini Server for this solution. I’m clearly not biased against Linux, as I’ve used Linux as my home server for YEARS, and it’s quite likely that I’ll end up with one or more Linux- or UNIX-based VMs to provide various home network services. In the end, it’s all about finding the right solution to your needs. In this particular case, it was a Mac Mini Server.

    Thanks for your comment!

  6. slowe’s avatar

    Andrew, thanks for the recommendation. I’ll have a look!

  7. Justin Paul’s avatar

    I have never been a huge Mac fan, but the Mini line of desktops and servers are pretty darn cool looking. Let us know in a few months how its working out for you, I have considered getting one a couple times.

  8. jeffrey wolfanger’s avatar

    Good post…”As I pointed out in the post, there were other motivations that led me to choose a Mac Mini Server for this solution” I can see using a Mac Mini for wife approval factor too. Not all tech gadgets get that ok in my house :)

    I use a Macbook Pro with Fusion now….Kind of upset that I have to buy fusion again to get on the latest release.

  9. Steve Jones’s avatar

    I am the chief programmer for Applied Computer Technology (ACT), a small consulting and software development company near Atlanta. Because of my frustration with the existing software to mirror my Mac mini server’s hard drives, I developed aMirrorVault (AMV), which is now available on my company’s website: http://www.actmac.com. (A demo download is also available.)

    To use AMV to mirror a Mac mini server (HD’s with factory disk partitioning):
    Install the AMV software
    Use Disk Utility’s GUI to copy the OS HD to the 2nd HD (should be empty)
    Boot on the 2nd HD
    Promote the OS HD to a mirror
    Boot on the mirror
    Add the 2nd HD to the mirror as the 2nd pane and build

  10. Robert Pelletier’s avatar

    I can’t garantee what I’m going to say is true, since I’ve never booted a my via remote install, but you can build a RAID with Disk Utility! In fact, I did a RAID-10 in my MacPro with it. (wierd thing, I moved from a custom built Linux server to a Mac Pro in the beginning of june.. I don’t regret a thing!)

    I did it all with the RAID tab in disk utility. I created 3 RAID Arrays, 2 RAID-1 with 2 disks, and a RAID-0 of those 2 RAID-1.

    The thing is really enjoyable. Hope you like it!

  11. Nicnac’s avatar

    Wow complicated.
    Or, you could connect a USB DVD drive, boot the mini server from the Snow Leopard Server DVD, and use disk utility to do the setup and install the OS.

  12. James’s avatar

    I am also going to implement a similar solution however I already have a MacBook Air and the Super Drive for the MBA is supposed to work with the MacMini Server

  13. Jim’s avatar

    Thanks for the instructions. I just unboxed a brand new Mini server in Sydney, Australia and the disks were set up exactly as per your article, so I was able to use your commands verbatim.

    One thing did happen differently for me though: when I added the second volume to the RAID set the command responded instantly. I assumed that it had NOT rebuilt the RAID set, but I didn’t know what the command would be, so I just did a clean reboot, hoping that things wouldn’t get messed up too badly.

    After I completed the set-up process I went straight into the Disk Utility to check on the status of the RAID set and it turned out that the status of the array was “Degraded” and the second disk that was added was in “need of repair”. Thankfully, the rebuild option was easy to locate and it ran without a problem.

    So an important note for anybody following these instructions: after you’ve created the RAID set make sure you go into Disk Utility and double-check the status.

  14. Kevin Layer’s avatar

    I followed the instructions, which were a tad different for my mini server, just purchased a week ago.

    A word of warning to others: I hosed my system and am in the process of rebuilding from scratch, after spending several days getting it all setup just like I wanted. :(

    I think where it went wrong: I created the array and added a member to it OK. Then, I exited the Terminal app and started the Disk Utility while booted onto the remote disc. It immediately said the RAID array was rebuilding and showed a progress bar, with an estimated time of 4 hrs. Thinking I didn’t want to wait, I exited and rebooted using the local drive.

    Once booted, I ran the Disk Utility again and it said the RAID array was degraded just like it did for Jim. However, just after I hit the Rebuild button I noticed that it thought disk0s2 was the “good” slice and disk1s2 was labeled as “missing”. Anyway, I got the spinning rainbow cursor and the system wasn’t responsive.

    I hard powered it off and back on. I got the login dialog, but the bluetooth keyboard wasn’t working anymore. I logged in with a real keyboard from another Mac in the house and ran Disk Utility. It showed 3 slices, disk0s2, disk1s2 and one with a UUID. It said both the disk slices were “online” and the Rebuild button was grayed out.

    Sigh. Now start the long process of reinstalling….

    In retrospect, I should have waited for the rebuild booted into the install disc. I’m confident that had I waited, I’d have saved myself a weekend of redoing all the crap I already did.

  15. Rebecca’s avatar

    Hey all

    Thanks for the great information, I have one question, we have discovered that our minimac server is not setup for Raid, If we wanted to set it up for raid would we loose all the data??

    I know is a simple question but kinda of important.

  16. Jon’s avatar

    You can check the status of the rebuild before you reboot with the command “diskutil checkRAID” it will show you the current percentage of rebuild, so you can be sure the rebuild is complete before rebooting. Thanks for the great article, worked out excellently for me!

  17. James’s avatar

    First off – thanks for documenting your exploits and experience Scott. I’ve stumble across enough of your docs that I decided to finally follow you using RSS.

    I have had no issues setting up RAID 1… once I decided that my Mac Mini Server needed an external DVD drive. Remote Install seems really cool, and I can’t address any specific issues I had, but it just seemed a bit quirky, or something. Booting from the DVD directly attached works flawlessly (knock on wood).

    @Rebecca – first off, configure Time Machine and get the thing backed up. If you indeed don’t have RAID currently configure (for example you have 2 x 500 GB volumes) you will ABSOLUTELY lose the data on the drive you designate as the mirror. If you have a single 1TB volume, then you actually have RAID0 (stripe) and you will lose ALL your data if you were to convert it to a RAID 1 (mirror).

    @Gallup – There were a number of motivations for my decision to get the Mac Mini. It has a minuscule footprint on my desk, it uses like 11w of power, Mac OS X server is included and it has 2 x 500 GB 7200 RPM drives, and I purchased Apple Care. I now have an easily configured VPN, DHCP, DNS, wiki/blog/www, LDAP and Time Machine server, fully supported (Software and Hardware) that makes zero noise, uses less power than the light on my desk. I’ve seen network utilization over 30 MB/sec while my Macbook is backing up via Time Machine to it.
    I could not find an alternate solution that offered as much. I had actually found the Mac Mini Server while researching a Mac Mini to install Linux on. I’ll be forthcoming, some parts of OS X drives me nuts, but… overall it’s a great offering and product. In fact, I liked it so much I bought a second one (and installed 8 GB of RAM) to run Fusion and a bunch of VM’s for testing. ;-)

  18. slowe’s avatar

    James,

    Your decision points to buy a Mac Mini server are very much like my own: small footprint, quiet, plenty of functionality. I’m going to have to look into the 8GB upgrade, though…only 4GB in mine right now.

  19. Bagster’s avatar

    Just had to build the raid1 remotely on a mac mini.
    The easiest way I find was:
    1- Carbon copy the first disk to the second
    2- Reboot on the second disk
    3- Make a new raid set and include your first disk
    4- Reboot on this raid set (first disk)
    5- Destroy the raid set on the second disk, and add it to the other raid set
    6- Rebuild and enjoy!

    (note: you can skip steps by making a raid on second disk, cloning and booting on it, and add your first disk, but I want to be sure that my data was perfect, so I did not trust the carbon copy, used it only to boot)

  20. Chris’s avatar

    Just a quick word of thanks for your very simple instructions! These have just proved invaluable to the setting up of our small business server.

    It’s a real pity that despite the supposed simplicity of setting up the macmini server, this basic setup preference is not catered for. I’d imagine that a large proportion of people buying a dual disc, compact server, would be wanting to use disk 2 in a mirrored RAID array.

  21. Dave’s avatar

    Scott, great article. I just followed your instructions, and my mini server rendered the exact thing yours did (disk1s2, etc) and raid was disk 9. The raid is rebuilding now.
    Since all of this is done in diskutil from terminal, I have to assume it could be done graphically in disk utility as well? I have it running next to my terminal window, and it is giving me a graphic “progress bar” of the rebuild of the mirror (shows as degraded, of course, the set hasn’t built yet).
    Graphic or command line, a great blog article. I love that I didn’t have to reinstall or even build my raid then reinstall from TimeCapsule via TimeMachine. Good stuff, and thank you.

  22. slowe’s avatar

    Chris, Dave, I’m glad the instructions helped!

  23. Dave’s avatar

    Update: My RAID is still rebuilding, and by looking at the logs from diskutil, I have been able to determine that it won’t matter how much or little data you had on the drive before making the RAID — it builds “block-by-block” (logical units in the raid set) so the time the rebuild takes has to do with the size (and speed) of the drives and the drive controller, not the amount of data. So if you have a mini with the two 500 Gig drives, it’s going to take about 4 hours, whether the drives are full or empty. Pay attention to the comments above and DON’T reboot until the RAID has finished rebuilding!

  24. slowe’s avatar

    Thanks for the update, Dave!

  25. GQ’s avatar

    Great article, Dave. My disks were labeled exactly like yours.

    May I suggest for the purposes of completeness (and to help readers avoid driving off a cliff by rebooting during the rebuild), you add the following:

    “Be sure to check that the rebuild process has finished BEFORE rebooting. You can do that using the following command: diskutil appleRAID list”

    It’s all too easy to assume that the entire process has completed when in fact the rebuild is still in progress.

    cheers…

  26. Dave Bevis’s avatar

    I love that people post their experiences and solutions online for others and I appreciate your post. That being said, I set up RAID 1 on my Mac Mini using disk utility without any problems. I was using an external superdrive and the server install CD (Had played around too much with the initial install and was reinstalling before taking live). So far So good.

    Thanks.

  27. Laura Powell’s avatar

    Hi, I installed lion on both of my macs and now I can’t use my PPC archicad program. We bought a Mac Mini Server used and the guy installed Snow Leopard on it. I don’t think he knew what he was doing anyway. I got the mini home connected it to a monitor, keyboard, mouse and added a super driver to install software. I then tried to install the cad software and it keeps giving me a window saying “Specify directory name”. Also, I noticed that there is no space on the discs so I opened up Disk Utility and noticed that the 2 Raids each 500GB are locked. Please someone help. Our clients are going to start beating down our door.

  28. Canuno’s avatar

    I am working on the new Mac Mini Lion Server, and there is another easy way to accomplish the same goal of 1TB Drive instead of 2 separate 500GB Drives.

    1. You have to create a Recovery Disk in your Lion Server First:
    http://support.apple.com/kb/DL1433

    2.Reboot your MacMini Server pressing the “CMD”+”r” or “Apple”+”R”.

    3. Select Utility Disc from the Menu that Pops up.

    4. Create de Raid just adding the 2 hard drives to the window and selecting Concatenate arrangement, and apply changes, also is a good thing to do to check the status of the disk at the end of this process, that is really fast (Seconds).

    5. Go back to the previous window (Menu Window) and select Reinstall Lion Server X.

    6. Then it will ask you for an internet connection and to select the 999GB Disk to instal!

    Really easy way for noobs like me. Hope you find it helpful.

  29. ASDL’s avatar

    I’ve mirrored the dual 500 Gb drives in my MacMini Server (now running Lion Server) and added an external Promise DS4600 3 Tb RAID.

    Now where’s the best place to put the home folders for my family/users?

    There are four of us and we each have lots of photos and music. If I put the Users home directories on the RAID, then the 500 Gb in the MacMini goes unused, but if I put the Users home folders in the MacMini, they’ll outgrow the space there.

    Is there anywhere to use symlinks or something to “combine” the MacMini 500 500 Gb and the 3 Tb Promise RAID space?

    Or do I just have to give up on using the MacMini 500 Gb space?

  30. slowe’s avatar

    ASDL, you could potentially play with symlinks to select place some data internally and some data externally, but otherwise as far as I am aware there’s no way to present both types of storage as a single volume. Personally—assuming the DS4600 has sufficient performance and data protection—I would just put the data there. Good luck!

    Laura, I believe Lion doesn’t include any Rosetta support, which means you won’t be able to run any PPC applications on your Intel-based Macs. If you need Rosetta, you’ll have to downgrade to Snow Leopard. As for the other issue with installing the software, I don’t really have any suggestions for you—sorry. Good luck!

  31. foqne’s avatar

    This is probably a very rudimentary question but I’ve never played with RAID before.

    I have a mini server with 2 HD doing a few things for me — everything is saved on the boot disc. The second disc is totally empty. Will the process described above to enable mirroring, destroy the setup I have on my boot disc? I don’t care if the 2nd gets overwritten because it’s empty.

  32. slowe’s avatar

    Foqne, I could be mistaken but I think–if you are very careful–you can preserve your boot disk. *HOWEVER*, I would make sure I have a backup of the data before starting. You can NEVER be too careful!

  33. Brooklyn Walker’s avatar

    I’m about to try slowe’s method on my MacMini server to implement RAID 1. Question I have (for anyone) is: should this thing ever blow up (regardless of RAID status) and I ever need to build from scratch, Apple did not include any media, so what should/would I do, take it to their store and let them install a new HD and recover from my Time-Machine backup? If I were to ask Apple to give me a Server-OS-install CD, would they, for less than their regular price? Next question: will I get some kind of alert or popup when a RAID 1 member fails, giving me a chance to replace the bad HD and re-build the set?

  34. Brooklyn Walker’s avatar

    Worked like a charm.

    - First I created the recovery disk on a USB SD card
    - Rebooted the MacMini Server, held the alt/option key
    - Selected to boot from the USB-attached “Recovery Disk” (not the partition on the HD)
    - Discovered the partitions “Server HD” (disk0s2) and “Macintosh HD2″ (disk1s2)
    - Made “Server HD” into a RAID set with “diskutil appleRAID enable mirror disk0s2″
    - Discovered the new RAID set (disk15)
    - Added the old “Macintosh HD2″ to the RAID set with “diskutil appleRAID add member disk1s2 disk15″ (took a few hours to build, monitored its status periodically with “diskutil appleRAID list”

    Once the rebuild was complete and both members were “online”, shut the computer down, removed the USB card, powered on, and it boot normally. Noticed that the new RAID set is now “disk2″.

  35. kyle’s avatar

    does anyone know how to monitor this? preferably using SNMP?

  36. Brooklyn Walker’s avatar

    Kyle, the only thing I know is to periodically open a terminal window and type “diskutil appleRAID list” and make sure the status is “online” and not “degraded”.

Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>