From: Chris on
I run a Gentoo system (AMD64) on a RAID1 device. On one of the RAID devices
(md3) I have a volume group containing my lvm volumes. So far all works
well.
I moved the RAID system from my old 250GB disks onto two new 320GB disks. I
did this by just copying the partition tables of the old disks to the new
and resynced the RAID. This had to be done twice of course. Also this worked
fine.
But now I still have a RAID of the old 250GB size. I want to make use of the
larger disks. There are several guides in the net, but I did not find that
matches exactly my situation. What I learned, is this:

-set sda to failed
-resize partitions on sda using gparted
-add sda to raid again
-set sdb to failed
-resize partitions on sdb using gparted
-add sdb to raid again
-resize raid
-resize pysical volume
-resize logical volumes

Are there any pitfalls? Some important what I missed? Any hints are welcome.
Thanks, Chris

From: David Brown on
On 07/03/2010 13:56, Chris wrote:
> I run a Gentoo system (AMD64) on a RAID1 device. On one of the RAID devices
> (md3) I have a volume group containing my lvm volumes. So far all works
> well.
> I moved the RAID system from my old 250GB disks onto two new 320GB disks. I
> did this by just copying the partition tables of the old disks to the new
> and resynced the RAID. This had to be done twice of course. Also this worked
> fine.
> But now I still have a RAID of the old 250GB size. I want to make use of the
> larger disks. There are several guides in the net, but I did not find that
> matches exactly my situation. What I learned, is this:
>
> -set sda to failed
> -resize partitions on sda using gparted
> -add sda to raid again
> -set sdb to failed
> -resize partitions on sdb using gparted
> -add sdb to raid again
> -resize raid
> -resize pysical volume
> -resize logical volumes
>
> Are there any pitfalls? Some important what I missed? Any hints are welcome.
> Thanks, Chris
>

An alternative method that may be less risky is to add two new
partitions (about 70 GB each) to use the rest of the space on the new
disks. Put these two together as a new raid1 set, make a new LVM
physical volume on the new raid, and add that to the original volume
group. Then you can resize the logical volumes as you want (and resize
the file systems on those logical volumes, of course).

I think it's a little strange to upgrade 250 GB disks to 320 GB disks -
are you changing them to something much faster? Otherwise it seems a
lot of effort for a very small increase in size.

From: Chris on
David Brown wrote:

> On 07/03/2010 13:56, Chris wrote:
>> I run a Gentoo system (AMD64) on a RAID1 device. On one of the RAID
>> devices (md3) I have a volume group containing my lvm volumes. So far all
>> works well.
>> I moved the RAID system from my old 250GB disks onto two new 320GB disks.
>> I did this by just copying the partition tables of the old disks to the
>> new and resynced the RAID. This had to be done twice of course. Also this
>> worked fine.
>> But now I still have a RAID of the old 250GB size. I want to make use of
>> the larger disks. There are several guides in the net, but I did not find
>> that matches exactly my situation. What I learned, is this:
>>
>> -set sda to failed
>> -resize partitions on sda using gparted
>> -add sda to raid again
>> -set sdb to failed
>> -resize partitions on sdb using gparted
>> -add sdb to raid again
>> -resize raid
>> -resize pysical volume
>> -resize logical volumes
>>
>> Are there any pitfalls? Some important what I missed? Any hints are
>> welcome. Thanks, Chris
>>
>
> An alternative method that may be less risky is to add two new
> partitions (about 70 GB each) to use the rest of the space on the new
> disks. Put these two together as a new raid1 set, make a new LVM
> physical volume on the new raid, and add that to the original volume
> group. Then you can resize the logical volumes as you want (and resize
> the file systems on those logical volumes, of course).

I was already thinking about this. Alas, the disks are partitioned as four
primary partitions, so I can't add another one. The thought of recreating
all partitions and include extended into the raid does not make me happy...
but when I think again, it should be possible. Can I sync a raid partition
still on the primary partition to an extended/logical partition? What about
the sector count?

> I think it's a little strange to upgrade 250 GB disks to 320 GB disks -
> are you changing them to something much faster? Otherwise it seems a
> lot of effort for a very small increase in size.

The old ones (Samsung HD252HJ) were not reliable, the raid fell apart every
some weeks, in the end each day. The new (WD Caviar Blue) were available at
our local shop.
Chris

From: David Brown on
Chris wrote:
> David Brown wrote:
>
>> On 07/03/2010 13:56, Chris wrote:
>>> I run a Gentoo system (AMD64) on a RAID1 device. On one of the RAID
>>> devices (md3) I have a volume group containing my lvm volumes. So far all
>>> works well.
>>> I moved the RAID system from my old 250GB disks onto two new 320GB disks.
>>> I did this by just copying the partition tables of the old disks to the
>>> new and resynced the RAID. This had to be done twice of course. Also this
>>> worked fine.
>>> But now I still have a RAID of the old 250GB size. I want to make use of
>>> the larger disks. There are several guides in the net, but I did not find
>>> that matches exactly my situation. What I learned, is this:
>>>
>>> -set sda to failed
>>> -resize partitions on sda using gparted
>>> -add sda to raid again
>>> -set sdb to failed
>>> -resize partitions on sdb using gparted
>>> -add sdb to raid again
>>> -resize raid
>>> -resize pysical volume
>>> -resize logical volumes
>>>
>>> Are there any pitfalls? Some important what I missed? Any hints are
>>> welcome. Thanks, Chris
>>>
>> An alternative method that may be less risky is to add two new
>> partitions (about 70 GB each) to use the rest of the space on the new
>> disks. Put these two together as a new raid1 set, make a new LVM
>> physical volume on the new raid, and add that to the original volume
>> group. Then you can resize the logical volumes as you want (and resize
>> the file systems on those logical volumes, of course).
>
> I was already thinking about this. Alas, the disks are partitioned as four
> primary partitions, so I can't add another one. The thought of recreating
> all partitions and include extended into the raid does not make me happy...
> but when I think again, it should be possible. Can I sync a raid partition
> still on the primary partition to an extended/logical partition? What about
> the sector count?
>

The raid won't mind that one of the partitions is primary, and the other
logical, or that they are at different positions on the disk.

Of course, I assume you've got a good backup of all your data -
especially before following the advice of someone on Usenett...

>> I think it's a little strange to upgrade 250 GB disks to 320 GB disks -
>> are you changing them to something much faster? Otherwise it seems a
>> lot of effort for a very small increase in size.
>
> The old ones (Samsung HD252HJ) were not reliable, the raid fell apart every
> some weeks, in the end each day. The new (WD Caviar Blue) were available at
> our local shop.
> Chris
>
From: Chris on
Chris wrote:

> I run a Gentoo system (AMD64) on a RAID1 device. On one of the RAID
> devices (md3) I have a volume group containing my lvm volumes. So far all
> works well.
> I moved the RAID system from my old 250GB disks onto two new 320GB disks.
> I did this by just copying the partition tables of the old disks to the
> new and resynced the RAID. This had to be done twice of course. Also this
> worked fine.
> But now I still have a RAID of the old 250GB size. I want to make use of
> the larger disks. There are several guides in the net, but I did not find
> that matches exactly my situation. What I learned, is this:
>
> -set sda to failed
> -resize partitions on sda using gparted
> -add sda to raid again
> -set sdb to failed
> -resize partitions on sdb using gparted
> -add sdb to raid again
> -resize raid
> -resize pysical volume
> -resize logical volumes

Just to close the thread: it worked. I followed this guide:
http://www.howtoforge.com/how-to-resize-raid-partitions-shrink-and-grow-
software-raid
and had no problems. The enlarged raid works fine.
Chris