Partitioning mirrored disks under Mac OS X / Server

Oct 30, '03 09:13:00AM

Contributed by: spaceboy.cz

Yes it's possible! (although Disk Utility says it's not!

  1. Become root (or put sudo before the commands)
  2. Make the RAID:

    diskutil createRAID mirror MyRAIDSet HFS+ disk1 disk2
    Or via the GUI, using Disk Utility.app if you like. A new HFS+ filesystem will be created there and will attach as a new disk, like /dev/disk3. Yes its nice, but this is what we don't need.
  3. Unmount the new disk with diskutil unmount disk3. Do not eject it!
  4. Partition the disk as you like:
    diskutil partitionDisk disk3 2 HFS+ Part1 10G HFS+ Part2 10G
    See diskutil's partitionDisk output for examples. There's no GUI way, that's why you reading this! A partition map and yours partitions will be created and will have a new fs created and mounted (as /dev/disk3s2 and /dev/disk3s3 in my example).
Yes! That's it! Easy?

I'v tried this on PMG4 using two 6GB HDD's and running Mac OS X Server (10.2 & 10.2.8). Then on an XServe with two 180GB IBM's (why Apple is still using these?) Works great. Disk Utitilty.app sees the RAID, can check it, but it has no clue about the volumes on it. So you have to fsck manually. When journaling is turned on, this is probably not needed. Turn on journaling using diskutil enableJournal /Volumes/Part1. Thats all for now. Have fun!

Comments (8)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20031026062133683