LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 05-24-2012, 06:22 PM   #1
Delta_X
LQ Newbie
 
Registered: Oct 2008
Posts: 20

Rep: Reputation: 1
Ubuntu Server 12.04 MDADM RAID 0 Clone Question


I have a running install of Ubuntu Server 12.04 64-bit on a Dell Precision T3400 Workstation PC. The install currently runs off of a single 1TB drive.

I would like to install two 500 GB drives in RAID 0 with MDADM and I am wondering if it is possible to clone that single 1TB drive to the RAID 0 array.

Would it be possible by using DD and a Live CD to create the raid array and then DD the 1TB to it? Or would I lose the array once I shutdown the Live CD.
Would I be better and would it be possible, to do a fresh install and setup the drives as RAID 0 then boot from a live CD and clone the single drive to the raid array after I mount it?

Or would it be best to just completely start over again from a fresh install?

Thanks as always.
 
Old 05-24-2012, 10:06 PM   #2
sag47
Senior Member
 
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
Blog Entries: 36

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
I would say no. First thing, since I assume you're talking about running your system partition on RAID 0 you need to have the boot partition on a single drive in a non-raid configuration. When you have a software RAID setup you need a non-RAID method of telling the computer how to interpret that RAID setup.

This basically means you need to have your boot partition on your 1TB drive to initialize the RAID0 or you need to leave some space on both of your RAID0 drives so that you can put a boot partition on one of them to initialize the RAID0 array.

If you were talking about a simple data partition then the answer would be easy because I would just recommend rsync in that case.

I just saved you about 4 hrs of work and troubleshooting. A buddy of mine spent an entire work day figuring that out about RAID0 with mdadm on the root system.
 
Old 05-24-2012, 11:01 PM   #3
Delta_X
LQ Newbie
 
Registered: Oct 2008
Posts: 20

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by sag47 View Post
I would say no. First thing, since I assume you're talking about running your system partition on RAID 0 you need to have the boot partition on a single drive in a non-raid configuration. When you have a software RAID setup you need a non-RAID method of telling the computer how to interpret that RAID setup.

This basically means you need to have your boot partition on your 1TB drive to initialize the RAID0 or you need to leave some space on both of your RAID0 drives so that you can put a boot partition on one of them to initialize the RAID0 array.

If you were talking about a simple data partition then the answer would be easy because I would just recommend rsync in that case.

I just saved you about 4 hrs of work and troubleshooting. A buddy of mine spent an entire work day figuring that out about RAID0 with mdadm on the root system.
Thanks for the help I do appreciate it!

So I would be OK creating a 512MB partition on each of the 500GB drives NON-RAID and installing grub2 to that section on one of the drives (say sda1), or would I be able to just dd the grub area to that partition?

Then I can set the remaining space of both drives (sda2 and sdb2) as the RAID 0 array with MDADM and dd the rest of the filesystem to that?
 
Old 05-28-2012, 05:04 PM   #4
sag47
Senior Member
 
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
Blog Entries: 36

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Basically what I was saying is I don't think you'll be able to use dd to move from your old way of booting to your new RAID0 method. It may be theoretically possible given if you know the internals of the filesystem and boot sectors but I'm not that proficient so unless someone else states how exactly to do that I would say your best bet is to install fresh on the RAID system and then migrate your data over. Otherwise you may be opening a very complicated can of worms if you use dd in that manner.
 
Old 05-29-2012, 03:54 PM   #5
Delta_X
LQ Newbie
 
Registered: Oct 2008
Posts: 20

Original Poster
Rep: Reputation: 1
I had a feeling that I may have ran into issues in doing that.

I ended up doing a fresh install and setting up a 126mb partition on each of the 500GB drives, one drive was set to mount that partition as /boot the other was set to 'Do not use' I then created a partition with the rest of the space on both drives and added that to the RAID 0 array and mounted that to /

The install went fine and boots correctly. This box is only a webserver that runs one piece of software on that so it didn't take long to setup after I got it installed.
 
Old 05-29-2012, 05:14 PM   #6
sag47
Senior Member
 
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
Blog Entries: 36

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Cool, glad you found a setup that worked for you which was relatively painless.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Raid 1+0 MDADM question al0cer Linux - Newbie 1 08-30-2011 02:14 AM
Question @ RAID 1 with mdadm twfactory Linux - Server 2 09-11-2009 11:33 AM
mdadm.conf and RAID 1 on Ubuntu jcorrea920 Linux - Software 11 07-06-2006 03:14 PM
Mdadm Raid question stefaandk Linux - General 12 08-16-2005 02:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 02:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration