I've scoured the Internet in search of an answer to this question, and as usual with OSX-related topics, I often don't find any deep-dive technical explanations sufficient enough to feel confident doing dangerous things.

Here is my question: I have a Mac Pro, running OS X 10.6.2. I have, as my main root/boot disk, a RAID 1 volume called "Mirror1". Mirror1 is comprised of two 1 TB disks. Mirror1, however, is fixed at 640 GB. That's because, I originally took a 640GB disk, bought a terabyte disk, mirrored it (using diskutil appleraid enable), when it synced I removed the 640GB and replaced it with a second 1 TB disk, and synced again. Voila! A single 640 GB replaced by two 1 TB disks in a mirror.. Actually, no. There's still something missing from the equation: Mirror1 needs to be expanded from 640GB to 1 TB to match the partition sizes on each of those disks.

How do I do this?

Perhaps the diskutil output will help:

-> diskutil list
/dev/disk0 
#:                       TYPE NAME                    SIZE       IDENTIFIER
0:      GUID_partition_scheme                        *1.0 TB     disk0
1:                        EFI                         209.7 MB   disk0s1
2:                 Apple_RAID                         999.9 GB   disk0s2
3:                 Apple_Boot Boot OSX                134.2 MB   disk0s3
/dev/disk1
#:                       TYPE NAME                    SIZE       IDENTIFIER
0:      GUID_partition_scheme                        *1.0 TB     disk1
1:                        EFI                         209.7 MB   disk1s1
2:                 Apple_RAID                         999.9 GB   disk1s2
3:                 Apple_Boot Boot OSX                134.2 MB   disk1s3
/dev/disk2
#:                       TYPE NAME                    SIZE       IDENTIFIER
0:      GUID_partition_scheme                        *640.1 GB   disk2
1:                        EFI                         209.7 MB   disk2s1
2:                  Apple_HFS Mac Disk 2              536.7 GB   disk2s2
3:       Microsoft Basic Data BOOTCAMP                103.1 GB   disk2s3
/dev/disk3
#:                       TYPE NAME                    SIZE       IDENTIFIER
0:                  Apple_HFS Mirror1                *639.8 GB   disk3
-> diskutil appleraid list
AppleRAID sets (1 found)
===============================================================================
Name:                 Macintosh HD
Unique ID:            1953F864-B474-4EB6-8E69-41834EBD0247
Type:                 Mirror
Status:               Online
Size:                 639.8 GB (639791038464 Bytes)
Rebuild:              manual
Device Node:          disk3
-------------------------------------------------------------------------------
#   Device Node       UUID                                   Status
-------------------------------------------------------------------------------
0   disk1s2           25109BAE-5697-40EA-B612-0217851444F7   Online
1   disk0s2           11B83AB0-8148-4DB6-8761-DEF08C855F8D   Online
===============================================================================

Thanks in advance.

link|improve this question

25% accept rate
Are you trying to resize the partition? – tegbains Apr 1 '10 at 17:49
Yes, resize the RAID Mirror itself. The individual members of the RAID array are already correctly partitioned. – Emmel Apr 1 '10 at 18:00
feedback

migrated from serverfault.com Apr 2 '10 at 17:59

This question came from our site for system administrators and desktop support professionals.

2 Answers

I don't know of a way to do it directly, but you can get the same effect if you're willing to take the long way around:

1) Remove one of the disks from the existing mirror.

2) If you want a backup during this process, re-add the 640GB disk and sync, then remove it.

3) Reformat the removed terabyte disk as a new unpaired mirror.

4) Boot from something else (install DVD works, Terminal is available under the Utilities menu), and do a high-fidelity clone from the old to new RAID (I'd use asr restore --source /Volumes/OldRAID --target /Volumes/NewRAID --erase).

5) Erase the old RAID disk, add to new RAID, sync.

The big problem here is that the server is offline while for a while (step 4). If that's not an option, you may be able to get by with a lower-fidelity cloning method that'll at least partly work while the server is online:

4a) Use Carbon Copy Cloner to clone the (still-mounted) old RAID to the new one. Alternately, compile the latest version of rsync (Mike Bombich has instructions) and use that to do the clone. Note that, as usual for an online backup, this won't reliably get a consistent snapshot of files being actively modified.

4b) Boot from something else, and rerun CCC/rsync (Install DVD may not do the job this time, as it doesn't have CCC, rsync, or even the Finder).

4c) Rename the new RAID volume the same as the old one.

You'll still be offline for a bit, but not as long since it only has to copy modified files. Unfortunately, this won't make as high-fidelity a copy as asr would, but it's pretty good (see the Backup Bouncer results on Bombich's site) -- the only things I know of offhand that it'll change is file IDs, and undoing the (transparent) compressed format some OS files are stored in.

link|improve this answer
feedback

Thanks, Gordon.

I was thinking of something similar, and IMO far less complicated, as a workaround for Appleraid's limited command-line tools (though please see note):

  1. Remove one disk from Mirror1. (Let's call it Disk B)
  2. Mark the system to boot from Disk B (NOTE: I cannot figure out how to do this. Please see note below)
  3. When booted from disk B, delete Mirror1, even deleting Disk A if necessary.
  4. Run **diskutil appleraid enable mirror /Volume/"Disk B".
  5. Add Disk A as a spare, and let it sync.

However, step 2 is what I cannot figure out! As for step (2) the last I tried to change my root disk, the system mounted from my 'Boot Disk' I told it to under System Preferences --> Startup Disk; it does BOOT FROM that disk, but it actually mounts the OLD disk as "/"! What is the 'nvram' or EFI-controlling command or other command to control which Volume gets mounted as "/"?

link|improve this answer
I'n not deeply familiar with this stuff, but I think you're seeing what Apple calls boot≠root -- it loads the booter from one volume (in this case one of the "Apple_Boot" partitions, disk0s3 or disk1s3), and the booter mounts the mirror and runs the OS from it. I haven't played with this, but you might be able to override this with the bless command, since it gives you a lot more control over the boot settings than System Prefs does. – Gordon Davisson Apr 2 '10 at 0:53
Gordon, Thanks for the hint. When I googled boot != root, I got a few responses that were promising... But bless ain't doing the trick. I've learned the bless man page by memory (it doesn't explain the whys, only 'type this'), and I've tried the --mount <blah> --setboot and --device <blah> --setboot options, and it doesn't work. Is there some technical online resource to look at so I can figure this out myself? OSX is a beautiful operating system in many ways, but perhaps because it's not as popular as Windows, and because it's not fully open source like Linux, documentation is feeble. – Emmel Apr 3 '10 at 23:56
Then I'm out of ideas on changing the boot process. Actually, I'm not convinced that's really the problem -- I think what you really need to do is convert Disk B from a half-mirror to a plain disk (without that, the diskutil enable mirror step doesn't make any sense), so I'd take a look at diskutil appleraid delete ... (the man page claims it tries to nondestructively convert a mirror back to a plain filesystem). – Gordon Davisson Apr 5 '10 at 17:11
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.