UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
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?
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.