LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-09-2012, 09:06 PM   #1
depam
Member
 
Registered: Sep 2005
Posts: 861

Rep: Reputation: 30
Replicating a mirrored drive on a new server


We have a debian server that is mirrored (RAID1) and wants to replicate everything on the new server. What I was thinking is to take out the disk from the original server and putting it on a second one and add new disks on both server to remirror it back. Now, my question is will this be possible and what are the steps that needs to be taken? I was also wondering if there is a possible way of detecting the new disk without needing for a reboot?
 
Old 10-10-2012, 02:45 AM   #2
Steviepower
Member
 
Registered: May 2010
Location: Eindhoven
Distribution: ubuntu/debian
Posts: 152

Rep: Reputation: 25
This seems like a really awkward way to replicate a drive. Usually replicating a drive is quite easy, especially if you are using the exact same type of drive.
What kind of drive is it and what do you want to do with it?
To me replicating a drive starts with the dd command, the basis is
Code:
dd if=[name of the input file,drive,whatever you want to make a copy of] of=[where you want to write the copy to]
The destination (and source for that matter) can both be nearly anything. the if could be "/dev/[your raid array]" or a file or network stream that offers the right kind of data to write to the disk. The of could be a file that holds all the data on a different network location and then on the second server(the new one) you just use the network location as input file(if) and the raid array as output file(of).

The dirty way you are talking about is just bad... it's running the risk of losing everything and I'm not even sure it's easier. Of course you could try it and if your drives are hot swapable you can just remove them and put them back in. http://www.debuntu.org/how-to-rescan...hout-rebooting might help you out on detecting a new drive if it does not automatically is recognised by your raid hardware. If you're using software raid I would like to point you back to my first suggestion.

good luck!
 
Old 10-11-2012, 02:37 AM   #3
depam
Member
 
Registered: Sep 2005
Posts: 861

Original Poster
Rep: Reputation: 30
Thanks for your response. I understand your point and its really something I don't want to do. However, the downtime is not generous at all on this server. If they can just give a downtime, I can do a clonezilla or like you said a dd of the drive. And yes the command you stated works like a charm to detect the newly inserted drive.
 
Old 10-12-2012, 06:09 AM   #4
Steviepower
Member
 
Registered: May 2010
Location: Eindhoven
Distribution: ubuntu/debian
Posts: 152

Rep: Reputation: 25
I'm not sure why you need downtime, if you will just run dd as root and dont write out to the same drive... it shouldn't be too much of a problem to do this live.
 
Old 10-12-2012, 08:27 AM   #5
depam
Member
 
Registered: Sep 2005
Posts: 861

Original Poster
Rep: Reputation: 30
Because the drive that I want to copy is the one inserted in the server and is running the OS. I am not sure whether DD will work like this until unless you unmount all fs and boot up a rescue CD to do this.
 
  


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
DNS does not seem to be replicating lce411 Linux - Server 1 08-21-2012 11:17 AM
mdadm created mirrored drive maintenance? struggled_newbie Linux - Hardware 1 11-15-2011 04:50 PM
Failed Hardware Mirror Disk- Want to convert one drive to non-mirrored runatyr Linux - Hardware 2 08-31-2010 01:19 AM
RHEL server 5.2 x86_64 installed to mirrored drive fails to mirror liontooth Red Hat 0 07-17-2008 11:14 AM
Linux-based replicating file server options rolliehawk Linux - Enterprise 4 03-01-2007 04:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:00 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