Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: How to move a software RAID to another machine?

  1. #1
    Join Date
    Nov 2006
    Beans
    129

    How to move a software RAID to another machine?

    So I have two computers, my old one and my new one. The old one has two 250GB drives that I had setup into a software RAID 0 when I installed Ubuntu on it many moons ago. How can I set those up in the new machine, which already has Ubuntu installed on it without loosing any of the data? I'd like to mount then as like /storage or something.

  2. #2
    Join Date
    Feb 2007
    Location
    Cameron Park CA USA
    Beans
    4,571
    Distro
    Ubuntu Development Release

    Re: How to move a software RAID to another machine?

    I've had no troubles moving mdadm raid arrays from one machine to another. On the new machine simply plug the drives into the SATA slots, order makes no difference. Then boot, install mdadm and then:

    Code:
    sudo mdadm --assemble --scan
    And the array comes up. Now mount in the usual manner using the /dev/md[n] name, into the fstab file also.

    Let us know if you have issues. No matter what, do not do a --build or --create. For sure all data is loss then.
    Regards, frank, at http://yantrayoga.typepad.com/noname/
    Homebuilt Lian-Li PC-Q33WB, Intel i7-4790K 4.6GHz, SSDs,32G RAM | Dell Laptop 13.3".
    Oracle VBox w/ WinXP/Win10 running Xara Designer, PaintShopPro, and InDesign CS.

  3. #3
    Join Date
    Nov 2006
    Beans
    129

    Re: How to move a software RAID to another machine?

    Quote Originally Posted by fjgaude View Post
    I've had no troubles moving mdadm raid arrays from one machine to another. On the new machine simply plug the drives into the SATA slots, order makes no difference. Then boot, install mdadm and then:

    Code:
    sudo mdadm --assemble --scan
    And the array comes up. Now mount in the usual manner using the /dev/md[n] name, into the fstab file also.

    Let us know if you have issues. No matter what, do not do a --build or --create. For sure all data is loss then.
    Wow, that's WAY easier than I thought it'd be. I'll give it a shot tomorrow and let you know how it goes.

  4. #4
    Join Date
    Mar 2007
    Beans
    1

    Re: How to move a software RAID to another machine?

    Well, how did it go?

  5. #5
    Join Date
    May 2007
    Location
    Indiana
    Beans
    29
    Distro
    Ubuntu 6.06 Dapper

    Re: How to move a software RAID to another machine?

    Maybe someone in this thread can help me - I built a RAID 5 array using six SCSI disks, formatted and mounted it - works great until I reboot, and then four of the disks no longer have a partition table and the array cannot be assembled - any ideas?

    The RAID superblocks seem to be fine, if I create a new disklabel and partition it EXACTLY the same as it was before, it will assemble and work just fine, until the next reboot...

  6. #6
    Join Date
    Nov 2006
    Beans
    129

    Re: How to move a software RAID to another machine?

    Worked like a champ! Sorry for the late reply, and thanks for the help.


  7. #7
    Join Date
    Nov 2006
    Beans
    129

    Re: How to move a software RAID to another machine?

    Quote Originally Posted by prince_of_hackers View Post
    Maybe someone in this thread can help me - I built a RAID 5 array using six SCSI disks, formatted and mounted it - works great until I reboot, and then four of the disks no longer have a partition table and the array cannot be assembled - any ideas?

    The RAID superblocks seem to be fine, if I create a new disklabel and partition it EXACTLY the same as it was before, it will assemble and work just fine, until the next reboot...
    Are you referencing them from UUID?

  8. #8
    Join Date
    May 2007
    Location
    Indiana
    Beans
    29
    Distro
    Ubuntu 6.06 Dapper

    Re: How to move a software RAID to another machine?

    Yes - although detection doesn't seem to be the problem. The kernel detects the array from the persistant superblock on the first hard drive, but because the rest of the RAID partitions are gone, it can't find them to assemble the array.

  9. #9
    Join Date
    May 2007
    Location
    Indiana
    Beans
    29
    Distro
    Ubuntu 6.06 Dapper

    Re: How to move a software RAID to another machine?

    OK, I figured it out - unlike a regular ext filesystem, software raid will overwrite the disklabel at the beginning of the hard disks. To fix this, I started the partitions used as elements of the raid array on cylinder one instead of the default cylinder zero, and everything seems to work great now.

  10. #10
    Join Date
    Jul 2008
    Beans
    2
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: How to move a software RAID to another machine?

    I have a similar situation where I am moving my raid to newly OSed harddrive, but I have a logical volume defined with my raid. I originally built my raid 5 by following the procedures from the following site: http://starnixhacks.blogspot.com/200...ware-raid.html. I used the assemble and scan option of mdadm, and that seemed fine. I have /dev/md0 now. Now I'm just missing /dev/volgroup00/logvol00 to mount to /mnt/data. Do I need to export the volume first, so I can import it using vgimport? I would appreciate any help. Thanks in advance.
    Last edited by rorona; September 30th, 2008 at 06:42 PM.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •