Solved

Red Hat Linux USB backup solution.

Posted on 2006-07-17
10
639 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 39

Expert Comment

by:noci
Comment Utility
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
Comment Utility
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
Comment Utility
>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 39

Expert Comment

by:noci
Comment Utility
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
Comment Utility
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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 39

Expert Comment

by:noci
Comment Utility
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
Comment Utility
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 39

Accepted Solution

by:
noci earned 300 total points
Comment Utility
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
Comment Utility
well noci for your efforts you take the 300 points... even though I am still looking for options.
; )
0
 
LVL 39

Expert Comment

by:noci
Comment Utility
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

In my business, I use the LTS (Long Term Support) versions of Linux. My workstations do real work, and so I rarely have the patience to deal with silly problems caused by an upgraded kernel that had experimental software on it to begin with from a r…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

771 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