Solved

Red Hat Linux USB backup solution.

Posted on 2006-07-17
10
645 Views
Last Modified: 2013-12-06
Hello everyone,

I am looking for a way to set up a USB backup solution on my Red Hat box. I am curretnly using the PC as a webserver and I would like to have the internal hard drive mirrored to an External USB harddrive that I can swith to in Case my original harddrive crashes.

What I want is:
1) Have a USB haddrive hooked up to my webserver.
2)  Have the drive mirror the original drive inside the computer.
3) If the internal harddrive fails I can just, replace the internal haddrive with the now detached usb drive (which would become internal)
and have the webserver up again in no time.

Any recommendations?

Thanks in advanced!
0
Comment
Question by:caragol
  • 5
  • 4
10 Comments
 
LVL 40

Expert Comment

by:noci
ID: 17122780
The problem might be performance...

Is the USB drive of roughly the same type as your internal drive? When writing to a mirrored pair (mirrorred by the kernel, not by rsync & the like)
a write succeeds when both writes are done, so if you have f.e. a 10K rpm disk internaly and a 5400 rpm disk in the USB driver that might
create a bottleneck.

Otherwise mirroring can be done between any 2 equal sized partitions. jast have a look at mdadm etc.
0
 

Author Comment

by:caragol
ID: 17122870
Well I have not even bought the USB drive yet. I am just looking for solutions to create a mirror image of my current drive, as easy as possible. I am no expert at linux and I would appreciate if the solution was easy to implement.

Right now the web server is on production so it's hard for me to open up the computer and install drives etc. Even more, I have never done this on a  Unix Machine so bare with me and try to explain as much as possible. If you think there are other easier or more reasonable solution to my problems and I am open for suggestions.

Eitherway I am looking for a fail safe way to replace my webserver in 10 minutes or less in case it crashes.
0
 
LVL 22

Expert Comment

by:pjedmond
ID: 17123061
>Any recommendations?

Don't use USB!

Use something like this:

http://www.maplin.co.uk/Module.aspx?TabID=1&ModuleNo=37674&doy=17m7

It fits into an open 5.25in enclosure, and the hard drive can be pulled out manually without opening up your system. If you have 2 of them, then your main hard drive is configured as a primary (and your CD as the secondary) on one interface, and the second enclosure can contain your backup. to which you image the original. In the event of a drive failure, you shut down, replace the original with the image, and put a new hard drive in for imaging.

Similar enclosures exist for SATA drives. (or indeed if you need better performance, then you might start to look at scsi RAID with 'hot swap'.

(   (()
(`-' _\
 ''  ''
0
 
LVL 40

Expert Comment

by:noci
ID: 17123122
OK,

first look into the time it takes to replace parts...,

You'll probably want to go for some rackmounted disks that can be hotswapped. (ie. replaced without powerdown).
That are not tightly screwed inside your system.

Then place 2 (or if expenses allow) 3 disk in that rack, 2 will be mirrored the 3rd will be hot standby, that means the
lowlevel drivers will pull that disk in place of the failing one. (Of course you can also put 2 -> 3 disks inside your system)
You can sleep on to notice next morning you have to order a replacement disk if one fails.
Replace the defective one with the new arrival and configre that one as a spare. When you don't have a diskrack,
then you can at least plan your downtime to replace a defective disk).
BTW Most Diskracks are SCSI, although firewire also exists.
Prefereably members of a mirrorset are on different controllers so you also cover controller failure as well as disk failure,
and gain some performance benefits for being able to do update to both devices at the same time.

Info about mirroring:
http://gentoo-wiki.com/HOWTO_Gentoo_Install_on_Software_RAID
http://gentoo-wiki.com/HOWTO_setup_evms

These are gentoo oriented but should be applicable to a wider audience. ( emerge is the gentoo package manager,
equivalent to rpm + up2date on RedHat) If the docs tell you to emerge a package you should be able to find an equivalent one.

If you have more specific questions fire ahead
0
 

Author Comment

by:caragol
ID: 17123314
Noci...

Ok So how hard would it be to set up this software RAID solution? I just need to install another HD on my computer plug it in, boot, and configure it?
I need minimal downtime because this server is live and bringing it down is terrible. That's why I was looking at USB because this way I don't have to turn it off.

Also as said above, the easier the better, because I truly don't have much linux experience.

best regards.
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 40

Expert Comment

by:noci
ID: 17123686
FIRST: MAKE A BACKUP!!!!!!!

Easiest would be to first create the raid1 set(s) needed on a spare set of disks.
and copy all your data over.

First choose your options for the hard drives:
  External rack or the encosures pjedmond described.
  preferably in a external rack. (you would then have down time for installing the controller(s). and plugging them in.
  look for controllers that are bootable.

partition types are not (83/82) ext2/swap but fd (raidmember)

Starting a raidset from scratch is relatively easy
  create the partitions and define them as raid partitions,
  combine them to raid volumes,
  copy data over,  (part can be done during production, static data), parts that can change during production
  have to be done during downtime.
  see that the grub/lilo loader is on BOTH members bootsectors!!! [possibly the hotspare too]
    (this is not mirrorred at all)
    grub is a little easier on the maintenance as the grub.conf file resides within the (/boot) filesystem.
  reboot from your raid rack.
  optionaly add old disk as a spare member.
 
Cheapest on disks:
More trouble some:
  insert a new disk into your system,
  partionit, as you would do for a raid set,  but with your new disk configured corectly and a nonexistent! device for second disk
  copy all data over
  boot from the single member raid1 set and replace the bogus member with the old drive
  when a disk fails
 
0
 

Author Comment

by:caragol
ID: 17123870
To be honest I don't think I have enough linux knowledge or am confortable enough with linux to pull that solution off.
Right now I am looking at some of these solutions which seem to be fairly easy and documented: http://howtoforge.com/taxonomy_menu/1/34


0
 
LVL 40

Accepted Solution

by:
noci earned 300 total points
ID: 17124664
That can work too, but you have to understand that it's not autorecovering like the mirrored disks
and you might miss some data:

- diskdown during a copy operation might ruin some files
- all updates between the last copy operation and the diskdown event are lost.

Most important is that you choose something you can manage.

For the future setup something resembling your system in vmware or qemu
and toy around with it. The worst that could happen then is that you
have to install / test something new again.
(vmware is free for use (without support)) atm.

0
 

Author Comment

by:caragol
ID: 17155104
well noci for your efforts you take the 300 points... even though I am still looking for options.
; )
0
 
LVL 40

Expert Comment

by:noci
ID: 17157941
I'll stay subscribed,
but now I am on holiday for a few weeks...

Please ask along if you need more info
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the most frequently asked questions on EE in the "Windows Installer" zone is how to eliminate self-triggered installation of some product.  The problem occurs when, suddenly, whenever a certain application is launched, or even when a folder i…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now