[CentOS] raid 1 disks upgrade

Coert Waagmeester

lgroups at waagmeester.co.za
Mon Jul 13 10:26:34 UTC 2009


On Mon, 2009-07-13 at 12:20 +0200, Tim Verhoeven wrote:
> On Mon, Jul 13, 2009 at 12:13 PM, Coert
> Waagmeester<lgroups at waagmeester.co.za> wrote:
> >
> > I have a machine with 2 SATA 250GB disks which I want to upgrade to 1TB
> > SATAs
> >
> > This is the partition structure on both disks:
> >
> > Disk /dev/sda: 250.0 GB, 250059350016 bytes
> > 255 heads, 63 sectors/track, 30401 cylinders
> > Units = cylinders of 16065 * 512 = 8225280 bytes
> >
> >   Device Boot      Start         End      Blocks   Id  System
> > /dev/sda1   *           1          25      200781   fd  Linux raid
> > autodetect
> > /dev/sda2              26        1971    15631245   fd  Linux raid
> > autodetect
> > /dev/sda3            1972       30401   228363975   fd  Linux raid
> > autodetect
> >
> > there are 3x RAID1 arrays.
> > First is for /boot
> > Second if for swap
> > Third is for LVM (contains / and other filesystems)
> >
> > What is the easiest way to get this upgraded?
> >
> > I thought that I could maybe dd all the LVM volumes and /boot into
> > files, setup the new RAID1 arrays on the 1TB disks, and dd everything
> > back? or is there an easier way?
> >
> 
> The software RAID 1 implementation of the kernel allows the array to
> be extended. First you replace each old disk with the new 1TB disks
> and each time rebuild the array. After this the array is still only
> 250GB but the partitions are already 1TB in size. Then use the --grow
> option of mdadm to increase the array to 1TB. Then it starts rebuilded
> the new space. When this is ready you can use the pvextend command to
> tell LVM that the PV has grown. Then the new space should be available
> in the volume group and you can increase the LV's and the filesystems
> inside them.
> 
> Regards,
> Tim
> 

Great, I will give that a try.

Thanks. I will ofcourse still make backups to be on the safe side.

Regards,
Coert




More information about the CentOS mailing list