You are not logged in.

#1 2013-05-21 22:19:55

ghost333
Member
Registered: 2011-11-26
Posts: 25

[SOLVED] Need to make RAID 1 to an already installed and used HD.

I have never before used a RAID and i need some advice.

i have a hard drive already installed and running for some time now on my computer , but  there is a need to install a 2nd drive for backup.
instead of using backup manually(which is quite annoying)  i want to use a mirroring method like RAID 1, the problem starts when there is already an OS installed on the disk and data on MBR.
From what i read you need to wipe clean both of them and i don't want to go there.

So how can i clone an already installed disk, and then use a 2nd for RAID 1?
My best guess is to use dd and clone one disk to another , but can i set up the RAID after? will the OS start up properly?
This is a very dangerous procedure so that is why i  am asking first.
thanks in advance.

Last edited by ghost333 (2013-05-23 09:23:38)

Offline

#2 2013-05-21 22:35:09

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,229
Website

Re: [SOLVED] Need to make RAID 1 to an already installed and used HD.

ghost333 wrote:

.... but  there is a need to install a 2nd drive for backup.
instead of using backup manually(which is quite annoying)  i want to use a mirroring method like RAID 1

Any RAID level is NOT a backup. Do you need backup or redundancy for availability reasons?

Last edited by fukawi2 (2013-05-21 22:35:26)

Offline

#3 2013-05-21 22:44:34

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Need to make RAID 1 to an already installed and used HD.

There is https://wiki.archlinux.org/index.php/Co … em_to_RAID but I'm not sure if it will be of much help.

Offline

#4 2013-05-22 13:26:08

ghost333
Member
Registered: 2011-11-26
Posts: 25

Re: [SOLVED] Need to make RAID 1 to an already installed and used HD.

That helped a lot untill i reached the grub installation on the RAID disk, it discribes how to install grub-legacy and not grub2, from what information i gathered searching.I was able to install grub2 on the RAID disk( not the original the copyed one)
So i removed the original disk leaving only the fresh one to test if the copy and setup went fine, I reach the grub menu but the system refuses to boot and it throws me to a rescue console.


I tryed to manually edit the grub.cfg with different suggestions but to no success
(note that the exact message is not correct)
The most common error messages is :
" Failed to mount  as root  ( UUID=5519c7af-703d-40c5-8bd9-a6e9faeaf491 )   
"Can not found (md/0)"

here is the menuentry on the new disk:

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch GNU/Linux, with Linux core repo kernel' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-true-5519c7af-703d-40c5-8bd9-a6e9faeaf491' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_msdos
	insmod diskfilter
	insmod mdraid1x
	insmod ext2
	set root='mduuid/2791ffe42976c5397f6bbd30a7d1312c'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint='mduuid/2791ffe42976c5397f6bbd30a7d1312c'  5519c7af-703d-40c5-8bd9-a6e9faeaf491
	else
	  search --no-floppy --fs-uuid --set=root 5519c7af-703d-40c5-8bd9-a6e9faeaf491
	fi
	echo	'Loading Linux core repo kernel ...'
	linux	/boot/vmlinuz-linux root=UUID=5519c7af-703d-40c5-8bd9-a6e9faeaf491 ro  quiet
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initramfs-linux.img
}

something that might be of value: Before i make it to the grub2 menu , grub itself was throwing me to it's own rescue command line there i found out that:

ls (md/0)/ 

displays the contents of my root

while any:

ls (hd0,1)/   
ls (hd0,msdos1)/
or any other possible option

displayed a black line , without any errors

some info that might help:

root@markos-host /home/markos # blkid                                        
/dev/sda1: UUID="7d18d6ab-749f-4a56-bab8-50e0e0896d15" TYPE="ext4" 
/dev/sda2: UUID="61593687-b7c4-4e36-a17c-e46eb6b68417" TYPE="swap" 
/dev/sda3: UUID="9E388751388726FD" TYPE="ntfs" 
/dev/sda4: UUID="262E9CEF2E9CB96F" TYPE="ntfs" 
/dev/sdb1: UUID="2791ffe4-2976-c539-7f6b-bd30a7d1312c" UUID_SUB="4c090104-3667-378c-1ccd-7db2dffb52e2" LABEL="markos-host:0" TYPE="linux_raid_member" 
/dev/md0: LABEL="RAID-ONE" UUID="5519c7af-703d-40c5-8bd9-a6e9faeaf491" TYPE="ext4" 

sda1 is the old disk with all the data!
sdb1 is the new raid disk



fukawi2 wrote:

Any RAID level is NOT a backup. Do you need backup or redundancy for availability reasons?

i want in case my main drive fails, to be able to boot and work from the second and still have my data on it of course, sorry for the missunderstanding.

Last edited by ghost333 (2013-05-22 13:34:44)

Offline

#5 2013-05-22 16:57:45

ghost333
Member
Registered: 2011-11-26
Posts: 25

Re: [SOLVED] Need to make RAID 1 to an already installed and used HD.

Offline

#6 2013-05-22 21:53:01

czubek
Banned
Registered: 2012-03-08
Posts: 141

Re: [SOLVED] Need to make RAID 1 to an already installed and used HD.

My success with linux is so limited that whenever I have some I will tell about it. My home server has a flash card for the os and 2-500G drives in a raid 1 array. I use software raid to avoid committing to a particular hardware. Perhaps purchasing an additional hdd similar to your new one would be a good route. Neither will hold os software just the data you wish to save, (i.e. keep your original hdd and copy the data from it to the raid array). I would spend the extra$ in lieu of the risk of data loss. Want an excellent guide? Try Ellwood's "Building a Linux Server using Webmin" at woodel.com. It has an excellent discussion of raid together with a how-to.

Offline

#7 2013-05-23 09:23:21

ghost333
Member
Registered: 2011-11-26
Posts: 25

Re: [SOLVED] Need to make RAID 1 to an already installed and used HD.

Used Grub legacy and it worked... after that i was able to sync the disks... and then upgraded to grub2!
marking as solved.

Offline

#8 2013-05-23 16:55:37

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,201

Re: [SOLVED] Need to make RAID 1 to an already installed and used HD.

But....

I cannot let fukawi2's sage advice fade quietly into history.   RAID is not a backup. Full stop.

Raid provides a level of redundancy to allow servers to continue to operate during a hardware failure.  Raid 3 and 5 are used in systems where the bandwidth of a single drive cannot keep very high speed pipes full (Uncompressed Hi Def video, for example). 

<soapbox> A backup is a snapshot of a file system that has been tested.  There is no such thing as one backup.  If there is only one tested copy, you are not backed up.  If you don't have at least one tested copy off site, you are not backed up.  </soapbox>


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#9 2013-05-24 04:28:11

ghost333
Member
Registered: 2011-11-26
Posts: 25

Re: [SOLVED] Need to make RAID 1 to an already installed and used HD.

it is not limited to "servers only" i am afraid....And if a RAID 0 fails i doubt the system will contnue to operate ^_^;


I don't even want to comment to the "advice" part.



czubek thanks a lot . Iwill give it an eye, but my system seems to work fine now on a raid 1.

Last edited by ghost333 (2013-05-24 04:30:14)

Offline

#10 2013-05-24 04:42:04

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,229
Website

Re: [SOLVED] Need to make RAID 1 to an already installed and used HD.

No-one has said anything about RAID-0. And no-one said it was ONLY for servers. It is a common misconception that RAID offers some kind of backup; we do not want to encourage that misconception so forgive us for explaining something that you may already know. We're not mind-readers, and if you already know, well perhaps it might correct someone else's understanding in the future if they are reading this thread under the misconception that RAID will give them backup.

Horses and Water ewaller....

Last edited by fukawi2 (2013-05-24 04:43:55)

Offline

Board footer

Powered by FluxBB