LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 01-25-2007, 01:36 PM   #1
griffinmt
LQ Newbie
 
Registered: Sep 2004
Location: Midland, MI
Distribution: Fedora V11
Posts: 11

Rep: Reputation: 0
Question Software Raid Reconfiguration


Running Fedora V6

During the build, I configured to run software raid on my two scsi drives.
The boot partion was set for raid 1,
the swap partion was set as raid 0 on two identical partitions, and the remainder was set as raid 1.

I would like to completely reconfigure, in a somewhat non-disruptive manner.

As such I would like to stop the boot raid1 and result in just an ordinary boot partion on the hardware boot device, leaving the other piece unused and available to be 'reconfigured'. Not sure of the correct and safe way to do this.

Also would like to stop the raid0 setup for the swap partion, freeing up the second half and just use the first part as a normal swap space. Recognize that I will have to (likely) reboot when I do this!

Can anyone suggest the correct plan of attack. I am not used to the Linux 'mindset' yet, but do have experience with other platforms.

Thanks,
Martyn
 
Old 01-25-2007, 03:38 PM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 326Reputation: 326Reputation: 326Reputation: 326
To remove a device from a RAID1 array (for example, /dev/hdb1 from /dev/md0):

Mark the device failed: mdadm /dev/md0 --fail /dev/hdb1
Remove the device from the array: mdadm /dev/md0 --remove /dev/hdb1

This will leave the array as if one of the devices failed (fully functioning, but degraded).

To remove the swap fram RAID0, (no reboot needed), assuming the RAID0 device is /dev/md1 composed of /dev/hda2 and /dev/hdb2:

Turn off swapping: swapoff -a
Stop the array: mdadm -S /dev/md1
Reinitialize the one device to use for swap: mkswap /dev/hda2
Change the swap device in the fstab: vi /etc/fstab
Start swapping in the device: swapon -a

That should do it.
 
Old 01-25-2007, 04:05 PM   #3
griffinmt
LQ Newbie
 
Registered: Sep 2004
Location: Midland, MI
Distribution: Fedora V11
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks for that simple straight forward answer.

I have done what you indicated and the results are as expected.

But it still leaves me with one remaining task.

I would like to remove the reference to md0 (and md2 in my case).
Rather than running as a failed set of raid 1 volumes, I would really like to revert it back to native volumes on sda1 and sda3.

I assume that I cannot just change the fstab entries from /dev/md0 to /dev/sda1 etc and reboot??!!


Martyn
 
Old 01-25-2007, 04:22 PM   #4
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 326Reputation: 326Reputation: 326Reputation: 326
Actually, I suggest you leave it as is. There's no functional difference between a single device and a degraded RAID1, and this way you have the option of going back by adding a mirror drive again.

You could always copy the data to a newly formatted partition (remember to re-install grub if it's going to be a boot partition), but the only difference will be the name of the device, and the loss of the option to mirror.

You can always wipe it and do a clean install when you next upgrade (FC7 in April).
 
Old 01-25-2007, 05:06 PM   #5
griffinmt
LQ Newbie
 
Registered: Sep 2004
Location: Midland, MI
Distribution: Fedora V11
Posts: 11

Original Poster
Rep: Reputation: 0
What will happen if I wish to alter one of those partition sizes (via gpartd or similar). Will it let me reference md2 and automagically adjust its single member sda3.

Or do I directly alter sd3 and md2 will automagically tag along (so to speak)

Either way, I feel a bit better about it all now.
Thanks,
Martyn
 
Old 01-25-2007, 05:18 PM   #6
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 326Reputation: 326Reputation: 326Reputation: 326
I've never attempted to resize that way. Instead, I'd:

- split a mirror,
- create a new (resized) degraded array on one of the drives,
- copy the files over,
- redo the other drive,
- add the drive to the new array.

That way I'm always in a safe state.
 
Old 01-26-2007, 07:37 AM   #7
griffinmt
LQ Newbie
 
Registered: Sep 2004
Location: Midland, MI
Distribution: Fedora V11
Posts: 11

Original Poster
Rep: Reputation: 0
Ok, when the time comes I'll cross my fingers and do it that way.

Thanks,
Martyn
 
  


Reply

Tags
mdadm, raid1


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why can't I mount this md0 raid? (mdadm and software raid) cruiserparts Linux - Software 35 01-05-2013 03:35 PM
cheap sata raid or software raid? taiwf Linux - Hardware 4 10-13-2006 10:58 AM
Will a ex - Software Raid 1 disk boot without Raid software? carlosruiz Linux - Software 0 05-27-2006 01:12 PM
Can fake raid be converted to linux software raid? jmacdonald801 Linux - General 3 01-30-2005 12:33 PM
moving system from ide software raid to new box with scsi raid ftumsh Linux - General 0 10-28-2003 09:34 AM


All times are GMT -5. The time now is 11:21 AM.

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 Google+: linuxquestions
Open Source Consulting | Domain Registration