Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Red Hat Linux USB backup solution.

Posted on 2006-07-17
Medium Priority
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!
Question by:caragol
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
LVL 40

Expert Comment

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.

Author Comment

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.
LVL 22

Expert Comment

ID: 17123061
>Any recommendations?

Don't use USB!

Use something like this:


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

(   (()
(`-' _\
 ''  ''
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

LVL 40

Expert Comment

ID: 17123122

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:

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

Author Comment

ID: 17123314

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.
LVL 40

Expert Comment

ID: 17123686

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

Author Comment

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

LVL 40

Accepted Solution

noci earned 900 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.


Author Comment

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

Expert Comment

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

Please ask along if you need more info

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
Create a Windows 10 custom Image with custom task bar and custom start menu using XML for deployment.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
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

618 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