Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 01-12-2012, 09:33 AM   #1
Registered: Jul 2009
Location: Finland
Distribution: Slackware64-current
Posts: 55

Rep: Reputation: 19
Replacing RAID1 drives to new ones


I have two HDD's (1x80GB, 1x160GB) which have three partitons (root, home, swap) running Slackware64-current.
The thing is, I'm replacing the old drives to new ones (2x250GB) and I want to increase swap partition size from 2GB to 4GB to enable hibernation.
Now I have root partitions as md0, home partitions as md1 and swap partitions as md2 and then I also have RAID5 stack which has 3x2TB drives and I don't want to touch those.

What would be the steps to make this replacement smooth and easy?
Old 01-13-2012, 01:31 AM   #2
Richard Cranium
Senior Member
Registered: Apr 2009
Location: Carrollton, Texas
Distribution: Slackware64 14.2
Posts: 2,900

Rep: Reputation: 1311Reputation: 1311Reputation: 1311Reputation: 1311Reputation: 1311Reputation: 1311Reputation: 1311Reputation: 1311Reputation: 1311Reputation: 1311
This is a lot easier to do with LVM on top of raid. There, you would just install the new RAID1 devices, add them to your volume group, and issue a pvmove to have the extents moved off the old devices onto the new one(s).

Assuming that you don't start using LVM, about all that you can do is (depending if you have spare drive space) install the new two 250GB drives, create new raid partitions on them, mount them somewhere, and cp the old partitions onto the new ones. Change /etc/fstab on the new version of your root partition to use the new raid devices (instead of md0, md1, and md2). Add a new image section in your old lilo.conf file that will allow you to boot from the new /root partition device, re-run lilo and try to boot off the new partitions. Make sure that everything still works and you should be able to remove the old drives.

You can also just install one of the 250GB drives, create the RAID1 partitions with only one of the two drives present, do the same as above, and then add the other 250GB drive, partition it, and add the missing halves to your new RAID1 arrays. If you have the right type of enclosure, you can follow the directions in section 4.2.2 of /usr/doc/Linux-HOWTOs/Software-RAID-HOWTO to hot swap the drives.

I've got one of these on my main computer. The top two drives are a RAID1 array for linux and the bottom drive is for my Windows "stuff". I've used the procedure in Software-RAID-HOWTO to remove one of the drives from the running raid array, disconnect it from the system, pull that drive out, replace it with the new one, attach the new one to the system, create my raid partition(s) on it, copy the old data across (via pvmove, which you can't use), and try a few test boots. When things were working to my satisfaction, I powered down the remaining old drive and swapped it out for the new one, adding the new partitions and assigning them to the appropriate RAID1 devices.

As long as you don't copy things the wrong way, you should have no problem. If you think that you may do that and don't have a proper backup, just pull one of the two RAID1 drives and leave it off your system until you are sure things are working correctly. Sort of an instant backup since you should be able to use that one to re-create your system.
1 members found this post helpful.
Old 01-13-2012, 04:46 AM   #3
Senior Member
Registered: May 2008
Posts: 4,658
Blog Entries: 12

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
If I were in your situation I would refresh my latest System backup. Take the old disks out (unmodified) and put the new ones in. Then boot from the slackware installcd or other live distro, configure the new disks as required and restore the files from the latest backup (not forgetting to reinstall your bootloader).

If things go wrong, then you have a nice clean back-out plan: Put the old disks back in.

Last edited by GazL; 01-13-2012 at 04:48 AM.
2 members found this post helpful.
Old 01-13-2012, 05:39 AM   #4
Registered: Jul 2009
Location: Finland
Distribution: Slackware64-current
Posts: 55

Original Poster
Rep: Reputation: 19
Thanks both of you!

I think I need a little more time to get my hands dirty with LVM. I don't use it ATM but hey, let's change that now when I'm making other big changes to my system.
Making backups now... :-)


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
RAID1 with 3 live drives? GregIthaca Linux - Newbie 2 06-16-2010 05:25 PM
Software RAID1 on non-partitioned drives s.a. Linux - Software 7 01-16-2008 11:40 AM
LXer: Replacing A Failed Hard Drive In A Software RAID1 Array LXer Syndicated Linux News 0 01-30-2007 12:33 PM
HW raid5 or raid1, & how many drives? hank43 Linux - Enterprise 2 12-18-2006 09:03 AM
raid1 on mandrake 10 with 2x SATA drives karelvdm Mandriva 0 09-07-2004 08:27 AM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:14 PM.

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