You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

RAID my disk

Dear All,
I want to mirror my old (external hard disk) shared disk with my new WD external hard disk. Any time I try to mirror them I get a message "to create mirror all in formation will be lost from following disks" there is both hard disks my old and new. I dont want to lose my data from my old disk.

Is there any way I mirror my old disk with new one without losing my data from old disk?

Here are the steps I followed
1. Disk Utility
2. RAID
3. dragged and dropped both disks in box in the right hand
note: If I drag and drop on volume the Create button does not activate I have to drag and drop both volumes.
4. Create

After pressing the Create button I get message says the data will be lost from both volumes.

Thanks
Tiger07

Mac OS X (10.3.x)

Posted on Mar 25, 2010 3:10 AM

Reply
Question marked as Top-ranking reply

Posted on Mar 25, 2010 8:51 AM

Disk Utility.app will always erase the drives when creating a mirror.

The solution is to use the command line to convert the old drive to a degraded mirror (e.g. a mirror with only one disk), which you can then 'repair' by adding the second disk in (either via the command line or the GUI).

Start off in the terminal by getting a list of all your disk devices via:

diskutil list


This will show each disk along with its device id, such as:

/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID partitionscheme *500.1 GB disk0
1: EFI 209.7 MB disk0s1
2: Apple_HFS My Mac 499.8 GB disk0s2


You'll have one such block for each disk. Once you identify which disk is the 'old' disk that you want to retain the data on you can use diskutil again. For example, if the disk was disk2 you would:

diskutil enableRAID mirror disk2


This will convert disk2 into a degraded RAID mirror volume without destroying its contents. If you run diskutil list again you'll see a new RAID device has been added.

If you're comfortable enough in the command line you can 'repair' the mirror by adding the second drive in:

diskutil addToRAID member disk3 disk4


The above command will add disk3 as a new member of the RAID volume disk4 (which was created as a result of the enableRAID command).

One caveat - the syntax of various diskutil commands has changed over the OS versions - some versions want disk IDs (e.g. 'disk1', 'disk2'), some want slices (e.g. 'disk2s2' as taken from the last column of diskutil list), so don't be too concerned if the commands don't work exactly as I've posted them - I don't completely remember which OS version requires which format, nor know which version you're running.
12 replies
Question marked as Top-ranking reply

Mar 25, 2010 8:51 AM in response to tiger07

Disk Utility.app will always erase the drives when creating a mirror.

The solution is to use the command line to convert the old drive to a degraded mirror (e.g. a mirror with only one disk), which you can then 'repair' by adding the second disk in (either via the command line or the GUI).

Start off in the terminal by getting a list of all your disk devices via:

diskutil list


This will show each disk along with its device id, such as:

/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID partitionscheme *500.1 GB disk0
1: EFI 209.7 MB disk0s1
2: Apple_HFS My Mac 499.8 GB disk0s2


You'll have one such block for each disk. Once you identify which disk is the 'old' disk that you want to retain the data on you can use diskutil again. For example, if the disk was disk2 you would:

diskutil enableRAID mirror disk2


This will convert disk2 into a degraded RAID mirror volume without destroying its contents. If you run diskutil list again you'll see a new RAID device has been added.

If you're comfortable enough in the command line you can 'repair' the mirror by adding the second drive in:

diskutil addToRAID member disk3 disk4


The above command will add disk3 as a new member of the RAID volume disk4 (which was created as a result of the enableRAID command).

One caveat - the syntax of various diskutil commands has changed over the OS versions - some versions want disk IDs (e.g. 'disk1', 'disk2'), some want slices (e.g. 'disk2s2' as taken from the last column of diskutil list), so don't be too concerned if the commands don't work exactly as I've posted them - I don't completely remember which OS version requires which format, nor know which version you're running.

Mar 26, 2010 8:33 AM in response to Jeff Kelleher

That disk is quite big I dont have another disk for backup the old one in external disk.


I rebooted the server and run the enableRAID and it worked. Now I have new disk which is disk4

I run command diskutil addToRAID member disk4 disk3 (disk3 is the new desk) and press enter I get a message "most options require root to the device " on next line I get help commands.

I did su root
I still get the same message.

Now when I do diskutil list I have disk5 instead of disk3.

If I want to use Applications->Utilities->Disk Utility Now I have the disk mirror and status Degragated. When I drug and drop the new disk in the box Rebuilt activates with status New. When I press Rebuilt I get a message " Rebuilding a RAID set takes considerable amount of time. All data on the replacement disk will be lost"

Does it going to delete all my data from old disk?


Thanks
Tiger07

Message was edited by: tiger07

Message was edited by: tiger07

Mar 26, 2010 9:30 PM in response to tiger07

It's fine to use Disk Utility.app to repair the degraded mirror - it's not clear why the command line option didn't work.

When I press Rebuilt I get a message " Rebuilding a RAID set takes considerable amount of time. All data on the replacement disk will be lost"
Does it going to delete all my data from old disk?


No, it's going to erase any data on the replacement disk - i.e. the one you're adding to the RAID. It won't affect data already on the degraded RAID.

Mar 29, 2010 6:07 AM in response to Camelot

Thanks a lot for all your support. I rebuild it and now both disks are working fine I tested like plugged out the old disk and left the new plugged in and all data are there. I rebooted the server now when I go to Applications->Utility->Disk Utility and then RAID I can see there are both desk with status Degraded.

My last question.
How I know on which disk i am currently working and after how long the data gets transferred from disk1 to disk2?

Regards
Tiger07

Mar 29, 2010 7:48 AM in response to tiger07

Oops. In this setup there is no automatic rebuild of mirror RAID, so if you broke the mirror by disconnecting one of the drives the RAID goes degraded and will stay that way until you repair it. It's probably the main reason why I don't recommend RAID using external drives - they're too easy to break from just a cable coming loose.

You'll need to manually repair the mirror by removing the 'FAILED' drive in the array then re-adding it to the array.

Apr 17, 2010 2:02 PM in response to tiger07

Isn’t is possible to do this in Disk Utility without harming any of the data on your source disk?

1) Create a mirrored RAID set with only the source disk in it by dragging *only the source disk* to the right-hand side of the window under the “RAID” tab.
2) Click enable. The result will be an online “Mirrored RAID” with only one disk in it.
3) Next, add your second disk to the raid set and click “Rebuild”

I’m pretty sure this works without harming the data on the initial source disk, but I stand open to correction from the disk utility warnings that pop up at each step.

Oh, and I don’t know if this works in 10.3.9.

Apr 20, 2010 11:40 AM in response to Jeff Kelleher

Ryan Androsoff wrote:
Isn’t is possible to do this in Disk Utility without harming any of the data on your source disk?

1) Create a mirrored RAID set with only the source disk in it by dragging *only the source disk* to the right-hand side of the window under the “RAID” tab.
2) Click enable. The result will be an online “Mirrored RAID” with only one disk in it.
3) Next, add your second disk to the raid set and click “Rebuild”

I’m pretty sure this works without harming the data on the initial source disk, but I stand open to correction from the disk utility warnings that pop up at each step.

Oh, and I don’t know if this works in 10.3.9.


I can confirm that this works using AppleRaid2 - I had to do it the other day. There’s a great article on AppleRaid2 here: http://www.afp548.com/article.php?story=appleraid2-in-depth

According to the article, you can enable a mirrored RAID from one source disk in 10.3 as well. The article notes that doing this is a relatively risky process and, like Jeff says, having a backup is a good idea.

RAID my disk

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.