Solved

Red Hat Linux USB backup solution.

Posted on 2006-07-17
10
655 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
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
 
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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

The purpose of this article is to demonstrate how we can use conditional statements using Python.
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
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.
Suggested Courses

737 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