LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
LinkBack Search this Thread
Old 03-12-2006, 08:46 AM   #1
lifeless1
LQ Newbie
 
Registered: Mar 2006
Distribution: Gentoo
Posts: 2

Rep: Reputation: 0
Question Powering up eSATA drives on the fly, can software RAID cope?


I'm running a Gentoo server system with a few hundred gigs of storage spread over several HDs. I've got all my system files and the home directories on two software-mirrored disks (for /, /usr and /var, three LVM2 volumes on top of an md RAID 1 volume on two physical disks, built using EVMS, although as a "compatibility volume", not a native EVMS volume; for /boot, a simple LVM-less md RAID 1 setup over the two disks is used).

The main storage disks, however, are JBOD, not RAIDed in any way. While the data on them isn't exactly critical, I'd like to see it get backed up every now and then.

Tape backup for several hundred gigs is obviously too cumbersome and costly for a home setup, so I'm thinking of getting an external SATA (eSATA) enclosure for two or three disks, running either RAID 1 or 5.

For various reasons, mainly cost, I've settled on a software RAID solution for these external drives as well. This means I can buy (or hack together) what is basically just a drive cage for 2-4 drives with its own power supply, a silent fan and a SATA->eSATA backplane, and equip the server with a cheap RAIDless SATA controller card with 2-4 eSATA ports.

The backups would be done roughly on a weekly basis, so there'd be no point in running the drives 24/7, but instead turning them on when needed, mounting them and proceeding with the backup operation, unmounting and turning the power off.

This finally brings me to my actual question.

The disks are brought up first with a genkernel-created initrd for accessing root, then again before mounting all the partitions during init. Simple enough, as all the disks this process applies to are internal and thus powered and connected constantly. But how does one achieve a software RAID for external drives using md/lvm2/evms, when these drives are powered up after the system has already booted and is running?

Say I connect the eSATA cables and turn on the power to the HD enclosure.

1. Does this trigger some automatic process (which one could monitor with dmesg | tail, for example) that causes the disks to be seen by the system (maybe with fdisk -l)? If not, how would one get the system to find the disks?

2. When the disks are seen, how do you bring up the md RAID 1/5, then the LVM2 volume on top of that? evms_activate may hold the key, but I just don't know for sure. Wouldn't the disks have to be present in some internal database or config file of EVMS for evms_activate to work, and wouldn't this cause EVMS to barf each time the machine is booted without the external disks powered on? Or is it smart enough to avoid this?

3. Assuming you get through items 1 and 2, great, then it's just a matter of mounting the damn things and backing up. But take the same process in reverse: how do you, after unmounting, selectively bring the EVMS/LVM2 volume and then the underlying md volume down for ONLY the external disks, making it safe to disconnect them and power them down?

Insights greatly appreciated.

Last edited by lifeless1; 03-12-2006 at 09:33 AM.
 
Old 03-12-2006, 12:37 PM   #2
Thoreau
Senior Member
 
Registered: May 2003
Location: /var/log/cabin
Distribution: All
Posts: 1,167

Rep: Reputation: 45
This reminds me of something...

http://www.leftlanenews.com/2006/02/...y-ride-videos/

You are going through all these gyrations, and for what? Software RAID is no backup medium for data integrity. Either cough up 100 bucks for a 3ware dual port card with 2 large drives, or get equal data integrity to your proposed setup with a single external usb hard drive.

I would assume that your data isn't critical, but you are focusing on backups- so perhaps it is. In which case transportable and persistent redundancy is it's function. Neither of which software RAID provides. You may not understand why I'm saying this. But you will when one drive fails on your software RAID array- or better yet, your boot partition. Oops. To see the beginning, you have to see the end. And that is my insight into the terrain in which you are currently deployed. Unpimp dir komputer.
 
Old 03-13-2006, 12:35 AM   #3
lifeless1
LQ Newbie
 
Registered: Mar 2006
Distribution: Gentoo
Posts: 2

Original Poster
Rep: Reputation: 0
Valid point. But even with hardware RAID (I've looked at a 4-port 3ware card in the past), I'd be using external drives since I have no more room in the server case. With 3ware, this would mean a 4-port SATA->eSATA adapter into the backplane of the server case. No problem there, these are widely available.

But the question about powering up the array remains. Is the 3ware (or some other hw RAID) card able to cope with the array being powered up (and down) after bootup? My gut feeling is that this would be even harder to achieve than with software RAID. Why not just run it 24/7 then, you might ask? Well, needless power consumption and decreased life of the backup drives, mostly (meaning that the drives will likely last longer if powered up once per week for several hours than if kept running 24/7).

Either way, I may have to rethink this one. To counter one of your points: I'm not looking for transportability (as in having an off-site backup) - while the backup is nice to have, it's not that critical. Also, how is software RAID less persistent than hardware RAID? Even if the server explodes, the data would still be accessible on two drives (assuming RAID 1). If the "source" disk inside the server dies simultaneously with one of the externally RAIDed drives, the data still exists in one external drive. What more would I need in terms of persistence, or am I misunderstanding your use of the word?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Software Raid with IDE: Should I be worried about failed drives? iammisc Linux - Hardware 2 02-26-2006 10:59 AM
Powering down SATA hard drives Dav Linux - Hardware 1 02-12-2005 09:17 AM
Software RAID-5 to regular drives...Possible without complete reformat? andrewjschmidt Linux - Software 3 08-15-2004 10:18 AM
Software RAID: 4 drives at once? GaX Linux - Hardware 2 01-08-2004 10:21 AM
Upgrading hard drives on Software raid 1 boot drives. linuxboy123 Linux - General 0 12-11-2003 03:28 PM


All times are GMT -5. The time now is 05:27 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration