FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 02-07-2008, 05:41 AM
Rasmus Andersen
 
Default resize raid1 array

Hello,

I had a raid1/mirror array of two 200G disks. Then one failed and I
thought 'lets get two 500G disks and just ease them in, they are cheap'.
So I added the full 500G partition from the first disk to the degraded
array, watched the resync, removed the remaining 200G disk and added the
last 500G disk.

My hope now was that I would be able to tell the kernel that md0 now is
500G, not 200G. But alas, I have not been able to do so. Is there a way
to do this? Or is the only way forward to shrink the partitions and
create new 300G ones alongside?

Thanks,
Rasmus
--
gentoo-user@lists.gentoo.org mailing list
 
Old 02-07-2008, 10:50 AM
"Simon Turner"
 
Default resize raid1 array

Hi Rasmus,
you will first need to resize your md device. Using mdadm, that
would be done with --grow (check the man, `mdadm /dev/md123 --grow
--size=500G` should do the trick).

But that will leave your filesystem intact at the current size, so
you'll have to resize the filesystem next. I know ext2&3 support
"growing" but I don't know about other filesystems.

However, since it's a simple raid one, you could create a new raid
device with one drive, format it at 500G, copy the stuff over from the
old raid1, drop the old raid1 device and add it to the new one.

Simon

On 2/7/08, Rasmus Andersen <rasmus@avlebavle.dk> wrote:
> Hello,
>
> I had a raid1/mirror array of two 200G disks. Then one failed and I
> thought 'lets get two 500G disks and just ease them in, they are cheap'.
> So I added the full 500G partition from the first disk to the degraded
> array, watched the resync, removed the remaining 200G disk and added the
> last 500G disk.
>
> My hope now was that I would be able to tell the kernel that md0 now is
> 500G, not 200G. But alas, I have not been able to do so. Is there a way
> to do this? Or is the only way forward to shrink the partitions and
> create new 300G ones alongside?
>
> Thanks,
> Rasmus
> --
> gentoo-user@lists.gentoo.org mailing list
>
>


--
When Earth was the only inhabited planet in the Galaxy, it was a
primitive place, militarily speaking. The only weapon they had ever
invented worth mentioning was a crude and inefficient nuclear-reaction
bomb for which they had not even developed the logical defense. -
Asimov
--
gentoo-user@lists.gentoo.org mailing list
 
Old 02-07-2008, 11:31 AM
Rasmus Andersen
 
Default resize raid1 array

On Thu, Feb 07, 2008 at 06:50:57AM -0500, Simon Turner wrote:
> Hi Rasmus,
> you will first need to resize your md device. Using mdadm, that
> would be done with --grow (check the man, `mdadm /dev/md123 --grow
> --size=500G` should do the trick).

Ah yes, thanks for that. For some reason I had not noted that use of
--grow... mdadm /dev/md0 --grow --size=max did the trick nicely thanks.

> But that will leave your filesystem intact at the current size, so
> you'll have to resize the filesystem next. I know ext2&3 support
> "growing" but I don't know about other filesystems.

I use LVM(2) and ext3 so I am ok there.

> However, since it's a simple raid one, you could create a new raid
> device with one drive, format it at 500G, copy the stuff over from the
> old raid1, drop the old raid1 device and add it to the new one.

Yes, thats true. But since this is my root, var, home, etc etc that
would require me to go to single-user mode for the duration of the copy.
The resync-in-background is much nicer

Thanks for your help.

Cheers,
Rasmus
--
gentoo-user@lists.gentoo.org mailing list
 
Old 02-07-2008, 12:53 PM
"Simon Turner"
 
Default resize raid1 array

Getting OT but...

Something I like with Raid1 is when I want to upgrade, update or
modify in any way the installation. I simply degrade the array right
before the modif so that I work on only one device (say sda1) and the
other (say sdb1) become the pre-modif backup. The the modification is
done at the normal speed of a single drive, not hammed by the slow
writes of the raid1, once done and tested I can re-add sdb1 and sync.

Or if there is any complication during the modif, you get the great
warm feeling of having a perfect backup in sdb1. =)

Simon

On Feb 7, 2008 7:31 AM, Rasmus Andersen <rasmus@avlebavle.dk> wrote:
> On Thu, Feb 07, 2008 at 06:50:57AM -0500, Simon Turner wrote:
> > Hi Rasmus,
> > you will first need to resize your md device. Using mdadm, that
> > would be done with --grow (check the man, `mdadm /dev/md123 --grow
> > --size=500G` should do the trick).
>
> Ah yes, thanks for that. For some reason I had not noted that use of
> --grow... mdadm /dev/md0 --grow --size=max did the trick nicely thanks.
>
> > But that will leave your filesystem intact at the current size, so
> > you'll have to resize the filesystem next. I know ext2&3 support
> > "growing" but I don't know about other filesystems.
>
> I use LVM(2) and ext3 so I am ok there.
>
> > However, since it's a simple raid one, you could create a new raid
> > device with one drive, format it at 500G, copy the stuff over from the
> > old raid1, drop the old raid1 device and add it to the new one.
>
> Yes, thats true. But since this is my root, var, home, etc etc that
> would require me to go to single-user mode for the duration of the copy.
> The resync-in-background is much nicer
>
> Thanks for your help.
>
> Cheers,
>
> Rasmus
> --
> gentoo-user@lists.gentoo.org mailing list
>
>



--
When Earth was the only inhabited planet in the Galaxy, it was a
primitive place, militarily speaking. The only weapon they had ever
invented worth mentioning was a crude and inefficient nuclear-reaction
bomb for which they had not even developed the logical defense. -
Asimov
--
gentoo-user@lists.gentoo.org mailing list
 

Thread Tools




All times are GMT. The time now is 02:35 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org