LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 12-06-2009, 06:44 AM   #1
morphix
Member
 
Registered: Nov 2007
Location: Newcastle, Australia
Distribution: Ubuntu, Debian, Arch
Posts: 47

Rep: Reputation: 15
Software RAID1 + Grow Partitions


Hi,

Currently i have a server that is setup with 2 discs in RAID1.

Now, 1 disk is 80GB the other is 200GB, and so only 80GB is really being used.

As i am personally relatively new to linux software RAID, i need some assistance.

I am wanting to both replace the 80GB drive with 200GB drive (to match the other drives size) and then grow the last RAID MD (MD4 for eg.) to the rest of the drive (roughly 120gb).

Can someone please advise me the best way and quickest, preferably the quickest to have the system back up and running but both add new drive and grow a RAID partition all at the same time.

The system is using SATA2.
 
Old 12-06-2009, 06:06 PM   #2
janoszen
Member
 
Registered: Oct 2009
Location: Budapest
Distribution: Mostly Gentoo, sometimes Debian/(K)Ubuntu
Posts: 143

Rep: Reputation: 22
LVM?

mdadm has a --grow option. After using it, you _MUST_ resize the filesystem as well. Note that I have never done this myself.

If I were you, I'd take the following steps (according to the manual):
  • Back up ALL data
  • Test if the boot loader is installed on both drives
  • Fail the 80 gb part of all md devices.
  • Remove the 80 gb disk and try to boot with only one disk.
  • Insert the new disk
  • Resize the MD partition
  • Use mdadm --resize to resize the RAID set
  • Resize the filesystem on the raid set
  • Copy the partition table to the new disk
  • Add the new drives to the raid
  • Install boot loader to the new drive
  • Wait for the resync to finish

You might want to read this: http://www.howtoforge.com/how-to-res...-software-raid

Last edited by janoszen; 12-06-2009 at 06:08 PM.
 
Old 12-06-2009, 09:10 PM   #3
morphix
Member
 
Registered: Nov 2007
Location: Newcastle, Australia
Distribution: Ubuntu, Debian, Arch
Posts: 47

Original Poster
Rep: Reputation: 15
Is there anyway to do this on a running system?

What is required when replacing the 80gb disc to 200gb disc?
Do i need to partition the new drive?
 
Old 12-06-2009, 10:13 PM   #4
morphix
Member
 
Registered: Nov 2007
Location: Newcastle, Australia
Distribution: Ubuntu, Debian, Arch
Posts: 47

Original Poster
Rep: Reputation: 15
I have tried to follow availabe guides but it doesnt seem to work.

Can someone explain to me how i go about using the free space left on the 200GB drive (about 120gb free) to resize the last partition to take up the remainder of free space?

Currently when i do resize and such, the partition size stays identical
 
Old 12-07-2009, 01:22 AM   #5
janoszen
Member
 
Registered: Oct 2009
Location: Budapest
Distribution: Mostly Gentoo, sometimes Debian/(K)Ubuntu
Posts: 143

Rep: Reputation: 22
Part table

It is possible you need to resize your partition table first. Otherwise I'm out of guesses since I'm lucky enough to have RAID controllers in my boxes.
 
Old 12-07-2009, 06:00 PM   #6
morphix
Member
 
Registered: Nov 2007
Location: Newcastle, Australia
Distribution: Ubuntu, Debian, Arch
Posts: 47

Original Poster
Rep: Reputation: 15
And how would i go about doing that without screwing up the contents of the drive?
 
1 members found this post helpful.
Old 12-07-2009, 06:21 PM   #7
redhat00
LQ Newbie
 
Registered: Jun 2009
Location: Atlanta
Posts: 12

Rep: Reputation: 1
Quote:
Originally Posted by morphix View Post
Hi,

Currently i have a server that is setup with 2 discs in RAID1.

Now, 1 disk is 80GB the other is 200GB, and so only 80GB is really being used.

As i am personally relatively new to linux software RAID, i need some assistance.

I am wanting to both replace the 80GB drive with 200GB drive (to match the other drives size) and then grow the last RAID MD (MD4 for eg.) to the rest of the drive (roughly 120gb).

Can someone please advise me the best way and quickest, preferably the quickest to have the system back up and running but both add new drive and grow a RAID partition all at the same time.

The system is using SATA2.

If you know LVM, it's very easy to do using the commands vgextend,pvmove, and vgreduce.

Last edited by redhat00; 12-07-2009 at 06:22 PM.
 
Old 12-09-2009, 09:19 PM   #8
morphix
Member
 
Registered: Nov 2007
Location: Newcastle, Australia
Distribution: Ubuntu, Debian, Arch
Posts: 47

Original Poster
Rep: Reputation: 15
The system i need to do this on, does not use LVM.

Its just Software RAID-1 with ext3 on 5 partitions and 1 being swap space.

I have managed to correctly grow and shrink primary partitions fine, can someone advise me how i would shrink or grow an extended partition on software raid?

Last edited by morphix; 12-10-2009 at 11:24 PM.
 
Old 12-10-2009, 11:24 PM   #9
morphix
Member
 
Registered: Nov 2007
Location: Newcastle, Australia
Distribution: Ubuntu, Debian, Arch
Posts: 47

Original Poster
Rep: Reputation: 15
no updates?
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How To Resize RAID Partitions (Shrink & Grow) (Software RAID) LXer Syndicated Linux News 1 05-01-2009 01:02 PM
LXer: How To Resize LVM Software RAID1 Partitions (Shrink & Grow) LXer Syndicated Linux News 0 01-09-2009 03:11 PM
Have software raid1, but like to change to raid1+0 or 0+1, how? spaceuser Debian 8 03-17-2008 03:07 PM
LXer: Linux desktops grow and grow and grow LXer Syndicated Linux News 0 11-23-2007 02:00 PM
Non-bootable software RAID1 partitions also cannot be mounted pcardout Linux - Server 4 06-28-2007 09:13 PM


All times are GMT -5. The time now is 08:37 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration