LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 11-30-2006, 10:54 AM   #1
wcraft
LQ Newbie
 
Registered: Nov 2006
Posts: 1

Rep: Reputation: 0
Question Setting up RAID 1 on exisiting server...


I have an existing Fedora 5 server with twin SATA 250 drives. Right now, the LVM shows them configured as a single large volume.

I want to enable RAID 1 on these drives. The setup for mdadm looks very easy.

However, if I perform the mdadm setup and activate the RAID device, will it be a problem that LVM is wrapped around both disks?

Also, the Volume filesystem is EXT3.
- Do I HAVE to change this in order to use mdadm RAID?
- If so, will changing it kill my data?

Appreciate any help. Thanks.,
 
Old 11-30-2006, 11:03 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
you'd need to rebuild your system compeltely really. you'd need to totally reformat both drives as a single device with a different partition type. once done you would then partition the resulting /dev/md0, making it LVM, or seperate native ext3 partitions.
 
Old 11-30-2006, 01:04 PM   #3
WhatsHisName
Senior Member
 
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHEL, AltimaLinux, Rocky
Posts: 1,151

Rep: Reputation: 46
It could be done using just the two drives, but it would be a very complex process.

As acid_kewpie pointed out, the easiest and most straightforward option would be to reinstall.

The fastest option for retaining your current configurations and files would be to backup the system to another drive/server, repartition the drives, create the raid(s), set up LVM, restore the installation, edit grub.conf/fstab to reflect the new setup and then remake the initrd images (which could be done before you start the conversion).

It’s straightforward to do, but by no means trivial. And before anyone asks, no one is going to post a step-by-step protocol for doing it.

No matter how you decide to proceed, the first step should always be making a full backup.
 
Old 11-30-2006, 03:32 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
yeah i guess you technically could shrink the LVM PV off of one disk, recreate that single disk as a pre-degraded array, format it and copy the other drive across, then recreate as a full raid array.. pretty horrible though, and i'd imagine unliekly to go smoothly at all.
 
Old 11-30-2006, 04:53 PM   #5
WhatsHisName
Senior Member
 
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHEL, AltimaLinux, Rocky
Posts: 1,151

Rep: Reputation: 46
It gets really nasty. Been there, done that, won’t do it again.

A couple of weeks ago, I needed to convert a 2-drive mdadm-based raid1/lvm system to a 3-drive raid1/raid5/lvm setup. The idea was to degrade the original raids, create a degraded raid5 using two drives, create a new lvm physical volume on the new raid5, add it to the existing volume group, pvmove the physical extents off the degraded raid1, stop the original raid1 and recover the new raids using the newly available drive.

Turned out that pvmove would not run on degraded raids and, of course, I didn’t learn that until I had two sets of degraded raids running. But, not a lot to get worried about, since a good backup was sitting on another server if things went south.

Then the fun began. Renamed the old volume groups on the degraded raid1 so that the new ones could be created with the correct names, copied everything over from the original raid1 to the new setup, stopped the original raids, recovered the new raids and fired up mkinitrd.

But don’t be fooled by how simple that sounds. It seemed like every third command returned an error message.

Everything works fine now, but it would have been a lot easier to back up, dump the original setup, create the new raid5 setup and restore the installation, hence my suggestion above.
 
  


Reply

Tags
fedora 5, lvm, mdadm, raid



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
which type of raid and setting up a raid on Solaris fakie_flip Solaris / OpenSolaris 1 09-02-2006 06:14 PM
what software allows me to edit exisiting *.avi files? sirpelidor Linux - Software 21 03-05-2006 08:10 PM
Adding RAID array LSI 150-6 to exisiting Debian install Brian Puccio Linux - Hardware 2 05-23-2004 02:52 PM
Setting up Software Raid 1 on a Remote Server retep Linux - Software 1 10-03-2003 07:01 PM
Raid setting arkopolo Linux - Software 0 08-06-2003 10:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 12:01 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration