Only one Apple_RAID partition per disk?

| 7 Comments

I am trying to setup some new 500GB disks with RAID on my Mac.

Previous lessons taught me to partition my large-ish drives to make it easier to backup -- and I don't need all of the 500GB mirrored.

So I wanted to setup a ~270GB mirrored partition (easy to backup on a 300GB drive), a smaller ~120GB mirrored partition and then get a ~180GB striped partition across the two drives for fast "scratch data".

However, Disk Utility completely doesn't work. It lets me set the second mirrored partition up and says it's working on that in one window and then that it's rebuilding the first mirror in another window.

diskutil is a lot less frustrating to work with (Lesson: Just skip Disk Utility for OS X RAID setup, just go with diskutil) won't let me setup two Apple_RAID partitions on one physical disk? It doesn't give any useful error messages.

[root@g5 ~]# diskutil createRAID mirror Extra \
   "Journaled HFS+" /dev/disk0s5 /dev/disk1s5
Marking partition 'disk0s5' for RAID
Marking partition 'disk1s5' for RAID
Preparing partition 'disk0s5' for RAID
2006-03-30 12:55:54.871 DiskManagementTool[9167] \ 
  Made bootable had an error on disk disk0s5 Extra 2 {
    Error = 16; 
    MapChanged = 0; 
    NewName = "Apple_RAID_OfflineV2_Untitled_2"; 
    NewSlice = 5; 
}
Adding disk 'disk0s5' to new RAID set
2006-03-30 12:56:25.392 DiskManagementTool[9167] \
  Could not find disk with partition map name, we will not make it bootable
disk1s5 Extra 1 BuildRAID1
Preparing partition 'disk1s5' for RAID
2006-03-30 12:56:42.882 DiskManagementTool[9167] \
 Made bootable had an error on disk disk1s5 Extra 1 {
    Error = 16; 
    MapChanged = 0; 
    NewName = "Apple_RAID_OfflineV2_Untitled_3"; 
    NewSlice = 5; 
}
Adding disk 'disk1s5' to new RAID set
Creating RAID Set
Bringing RAID partitions online
Waiting for new RAID to come online
Waiting for new RAID to come online
Waiting for new RAID to come online
[....]
Waiting for new RAID to come online

Error -9983 encountered updating or creating raid on disk  

Not fun.

I thought "diskutil enableRAID" would mark a partition as Apple_RAID, but it's not working:

diskutil enableRAID mirror /dev/disk0s5 
changing filesystem size on disk 'disk0s5'...
The filesystem may need to be modified to make this partition bootable
2006-03-30 13:43:54.632 DiskManagementTool[9865] \
Made bootable had an error on disk disk0s5 Extra 2 {
    Error = 16; 
    MapChanged = 0; 
    NewName = "Apple_RAID_OfflineV2_Untitled_2"; 
    NewSlice = 5; 
}
The disk has been converted into a RAID

But with diskutil "list" and "info" it shows up unchanged.

Any ideas?

diskutil pocket guide:

  • list - show the partition maps, note that the slice number is the number at the end of the line, not the first number.
  • info - show information about a specific disk or disk slice
  • checkRAID - show the RAID set status. (For me typically degraded because it likes to rebuild the mirror after I make the second one, gah).
  • enableRAID - supposed to convert a slice/Volume to a RAID partition, but it's not working for me (on the second partition)
  • createRAID put together a RAID set/disk from multiple slices/partitions.

7 Comments

I did partition my Tiger disks in mirrored RAID.
Good thing you went straight to diskutil because the GUI can't handle it at all. I don't recall the exact sequence of steps (an all night of futzing before I figured it all out). The trick involves the need to reboot between some steps. I suggest partition, reboot, create first RAID, reboot, create the second RAID.

Bimini:~ jim$ diskutil list
/dev/disk0
#: type name size identifier
0: Apple_partition_scheme *298.1 GB disk0
1: Apple_partition_map 31.5 KB disk0s1
2: Apple_Boot 128.0 MB disk0s2
3: Apple_RAID 79.9 GB disk0s3
4: Apple_HFS BIMINI P2 7.9 GB disk0s5
5: Apple_HFS BIMINI P3 7.9 GB disk0s7
6: Apple_Boot 8.5 MB disk0s9
7: Apple_Boot_RAID 202.0 GB disk0s10
/dev/disk1
#: type name size identifier
0: Apple_partition_scheme *298.1 GB disk1
1: Apple_partition_map 31.5 KB disk1s1
2: Apple_Boot 128.0 MB disk1s2
3: Apple_RAID 79.9 GB disk1s3
4: Apple_HFS ARUBA P2 7.9 GB disk1s5
5: Apple_HFS ARUBA P3 7.9 GB disk1s7
6: Apple_Boot 8.5 MB disk1s9
7: Apple_Boot_RAID 202.0 GB disk1s10
/dev/disk2
#: type name size identifier
0: Apple_HFS TAHITI Tiger *79.9 GB disk2
/dev/disk3
#: type name size identifier
0: Apple_HFSX Home *202.0 GB disk3

Bimini:~ jim$ diskutil info disk2
Device Node: /dev/disk2
Device Identifier: disk2
Mount Point: /
Volume Name: TAHITI Tiger

File System: Journaled HFS+
Journal size 8192 k at offset 0x281000
Owners: Enabled
Partition Type: Apple_HFS
Bootable: Not bootable
Media Type: Generic
Protocol: ATA
SMART Status: Not Supported
UUID: 1EAA1446-3755-35EB-9873-92609A3F730B

Total Size: 79.9 GB
Free Space: 41.4 GB

Read Only: No
Ejectable: No
OS 9 Drivers: No
Low Level Format: Not Supported

RAID master:
Set Name: TAHITI Tiger
UUID: 1D3CABEE-A4CB-4C8A-A418-7146D44C641F
Level Type: Mirror
Status: Online

Bimini:~ jim$ diskutil info disk3
Device Node: /dev/disk3
Device Identifier: disk3
Mount Point: /Volumes/Home
Volume Name: Home

File System: Case-sensitive Journaled HFS+
Journal size 24576 k at offset 0x652000
Owners: Enabled
Partition Type: Apple_HFSX
Bootable: Not bootable
Media Type: Generic
Protocol: ATA
SMART Status: Not Supported
UUID: 98606C39-A3FA-364F-9F26-B007B92AC488

Total Size: 202.0 GB
Free Space: 76.3 GB

Read Only: No
Ejectable: No
OS 9 Drivers: No
Low Level Format: Not Supported

RAID master:
Set Name: TAHITI Home
UUID: A5DD2CA5-BA8F-477F-8231-5B63E095B298
Level Type: Mirror
Status: Online

Bimini:~ jim$ diskutil info disk0s3
Device Node: /dev/disk0s3
Device Identifier: disk0s3
Mount Point:
Volume Name:

Partition Type: Apple_RAID
Bootable: Not bootable
Media Type: Generic
Protocol: ATA
SMART Status: Verified

Total Size: 79.9 GB
Free Space: 0.0 B

Read Only: No
Ejectable: No

RAID slice:
Set Name: TAHITI Tiger
UUID: EC167B73-A381-4643-A94B-7278F72EA681
Level Type: Mirror
Status: Online
Slice: 2/2
Sequence: 1

Bimini:~ jim$ diskutil info disk1s3
Device Node: /dev/disk1s3
Device Identifier: disk1s3
Mount Point:
Volume Name:

Partition Type: Apple_RAID
Bootable: Not bootable
Media Type: Generic
Protocol: ATA
SMART Status: Verified

Total Size: 79.9 GB
Free Space: 0.0 B

Read Only: No
Ejectable: No

RAID slice:
Set Name: TAHITI Tiger
UUID: 052E51F2-B3D5-4104-8C7A-50875365F495
Level Type: Mirror
Status: Online
Slice: 1/2
Sequence: 1


Well it is possible but you have to create the partitions first and it will work:
For 10.3 and earlier go:

http://www.macosxhints.com/article.php?story=20031026062133683

I just read that article and it seems that does not work in 10.4.
So I tried doing it different.

I openened the terminal... and closed it again ;)
(it wasn't necessary I realised that after doing it all in the terminal)

So

I opened diskutility from the utilities folder and did this.
On the 2 disks I would be using I created equal partions, i.e all the same size.
and called these 1a,2a,3a on the one drive and 1b,2b,3b on the second.
Now I went to create a raid:
I dragged the partions 1a and 1b to the raid window and clicked create.
I dragged the partions 2a and 2b to the raid window and clicked create.
I dragged the partions 3a and 3b to the raid window and clicked create.
Now I had 3 RAIDs.

Don't know how safe this is but it seems fine after running some tests

Tried that, no worky.

Wonder if I'll have more luck with diskutil on the command line.

When you say 'dragged to the raid window', you are creating new raid sets each time ? I guess you'd have to or it would only give you the rebuild option.

This is so confusing.

I've managed to do this, creating a mirror for boot (B&W g3's can't boot stripe, despite the fact Apple probably could fix it at boot loader level instead of OF as previously thought), and stripe for data, using two IDE drives. These were 20gb drives, so each drive has been partitioned 5gb for system mirror, remainder for data stripe.

It works, but OS X wants to degrade the boot mirror for some reason (OS X bootup is slooowww as a result) Jim White was spot on with the reboot trick - if you do it all in one go diskutil won't let you.

I struggled with this too - when booted off of the CD/DVD discs for X.4 and X.5. When I booted off of another drive (firewire with X.4) I was then able to create a multi-partition Mirrored RAID. 2 drives, each with three partitions, mirroring each other.

Dude.

You can't mix RAID-1 and RAID-0 on the same disk, across partitions, the way you're describing. Not on OS X, not on Linux, not on nothing. It's like complaining that you can't run your car on one cylinder.

If you MUST play around, try ZFS on OpenSolaris. That'll let you do all sorts of crazy stuff.

"Know-it-all": Huh? Yes, you can do that on Linux. You run the md devices on partitions on each disk, not on the whole disk. That's actually the standard setup by most tools (for example /boot will be a separate raid disk than the primary volume group or the "/" partition).

Indeed that is the standard setup by at least the Red Hat tools...

- ask

Leave a comment

About this Entry

This page contains a single entry by Ask Bjørn Hansen published on March 30, 2006 1:33 PM.

Find recent content on the main index or look in the archives to find all content.

Pages

OpenID accepted here Learn more about OpenID
Powered by Movable Type 4.33-en
/* bf */