Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
05-30-2012, 08:42 PM
|
#1
|
LQ Newbie
Registered: Apr 2012
Posts: 12
Rep: 
|
Mirror HDD in redhat 5
Hi,
Firstly, thank you for checking this post.
This might be a very simply question for you guys, but any help will be really appreciated.
We have a Sun X2200M2 server running Redhat 5 with 2 x 250G disk software RAID 1 in production environment.
we want to test some commands in that system which we do not know the impact. so we prefer to mirror the exactly same HDD from that server in to our testing x2200M2 with same hardware environment.
is there a good solution we have do that disk mirror?
again, thank you for the help.
Andy
|
|
|
05-30-2012, 09:20 PM
|
#2
|
LQ Newbie
Registered: Aug 2005
Location: Emerald, Queensland, Australia
Distribution: Kubuntu => moving => Debian 6
Posts: 27
Rep:
|
rsync
I think rsync would be best for this. It comes with most distributions. Read the man page for more details, and/or find an online tutorial like this one: http://everythinglinux.org/rsync/.
|
|
|
05-30-2012, 09:28 PM
|
#3
|
Member
Registered: Apr 2012
Location: /root
Distribution: Ubuntu, Redhat, Fedora, CentOS
Posts: 190
Rep:
|
you can do it using different tools and command, generally DD command is common for disk imaging or mirrors and works great too. also some tools like partimage can solve your problem.
Using of DD command
Code:
dd if=/dev/HARDDISK-LOGICAL-VOLUME of=/dev/NEW_HARDDISK
you can also take the backup into a image file and than restore on another harddrive.
TO backup into file
Code:
dd if=/dev/HARDDISK-LOGICAL-VOLUME of=/opt/disk-HDD-imagefile
To restore file on another HDD
Code:
dd if=disk-HDD-imagefile-with-path of=/dev/HARDDISK-DISK-DRIVE
more resources for "DD" command
http://www.thegeekstuff.com/2010/10/...mand-examples/
http://www.linuxquestions.org/questi...ommand-362506/
also you can create a disk partition layout and just copy paste all the files from one disk to another disk will work same
you understand it here.
http://linux-sxs.org/administration/mirror_hdd.html
also you can install partimage utility, another powerfull utility for disk mirror, but i believe that it is not shipped with Redhat 5 by default you need to download it and install it.
http://www.debiantutorials.org/back-...ndows-204.html
|
|
1 members found this post helpful.
|
05-30-2012, 09:33 PM
|
#4
|
Member
Registered: Apr 2012
Location: /root
Distribution: Ubuntu, Redhat, Fedora, CentOS
Posts: 190
Rep:
|
@ BeerISGood,
rsync will not make HDD bootable, it will not take the backup of MBR so HDD will not boot even after rysnc.
|
|
|
05-30-2012, 10:58 PM
|
#5
|
LQ Newbie
Registered: Apr 2012
Posts: 12
Original Poster
Rep: 
|
Hi em31amit,
Thank you for your post. the only question i have now is the x2200 M2 server only has two disk slots which are in used for RAID 1.
so, you mean i need pull out one of disk and insert a new disk in and then run that DD command to mirror the whole disk?
if i pull out one of HDD, would new disk get sync automatically after i insert in? because of raid 1?
sorry, my question may be really sounds stupid. but appreciate your comments.
Andy
|
|
|
05-30-2012, 11:20 PM
|
#6
|
LQ Newbie
Registered: Aug 2005
Location: Emerald, Queensland, Australia
Distribution: Kubuntu => moving => Debian 6
Posts: 27
Rep:
|
Quote:
Originally Posted by em31amit
@ BeerISGood,
rsync will not make HDD bootable, it will not take the backup of MBR so HDD will not boot even after rysnc.
|
Fair enough. I was thinking more of mirroring a file structure than a physical drive. DD is the way.
|
|
|
05-30-2012, 11:39 PM
|
#7
|
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.x
Posts: 18,434
|
You should check your actual HW, but according to this http://www.solarsystems.com/products...200_m2_server/ that system has hot-swappable disks, so you could pull one out, load a blank, the use the swapped out one to start a new system...
|
|
1 members found this post helpful.
|
05-30-2012, 11:44 PM
|
#8
|
LQ Newbie
Registered: Apr 2012
Posts: 12
Original Poster
Rep: 
|
Thank you all.
I will give it try.
Andy
|
|
|
05-30-2012, 11:57 PM
|
#9
|
Member
Registered: Apr 2012
Location: /root
Distribution: Ubuntu, Redhat, Fedora, CentOS
Posts: 190
Rep:
|
are you using software raid or hardware raid on your server, you need to take care of that too and also for hot swapping drive is good way to do, but still you should make sure while hot-swapping drive that you have detach from OS and again rescan when attached, you need to rescan the scsi-bus else os will not show to you into the /dev path and also in fdisk -l output
this is the command to scan scsi bus hdd on rhel5
Code:
echo "- - -" > /sys/class/scsi_host/hostX/scan
|
|
|
All times are GMT -5. The time now is 06:00 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|