[CentOS] extend raid volume - new drive

Tue Apr 28 08:10:17 UTC 2009
D Tucny <d at tucny.com>

2009/4/25 dnk <d.k.emaillists at gmail.com>

> Hi there, I have a system with the following:
>
<snip>

>
> Disk /dev/md0: 1000.2 GB, 1000202174464 bytes
> 2 heads, 4 sectors/track, 244189984 cylinders
> Units = cylinders of 8 * 512 = 4096 bytes
>
> Disk /dev/md0 doesn't contain a valid partition table
>
>
> Now I just added a new hard drive (sdc).
>
> I was wondering how to go about (if possible) to add this drive to my
> existing partitions with LVM.
>
> Now I never setup this system (Another person had), and if i am
> reading the above right, it appears as though they did not use LVM for
> the raid.
>
> The system has the OS on a standalone drive, the home folder is on the
> two raided drives. I was hoping to extend my home folder to take
> advantage of my new drive.
>
> Recommendations?
>

It should be possible to extend your raid1 to a third drive pretty easily
which would give you an extra 500GB of space...

You'll probably want to look at mdadm using grow to take the array up to 3
drives and manage to add the new disk and once you're done extending the
array, you'll likely want to look at resize2fs to extend the filesystem to
use the extra space...

If you wanted to get a whole extra TB of space rather than just 500GB, it
would be a bit more complex, the simplest solution I can think of right now
would be something along the lines of backing up the existing home folder to
the new drive, destroying the existing array then creating a new degraded
raid5 array across the two old disks, restoring the home folder back to the
new array before adding the new disk into the array...

Of course... backups recommended before doing this...

d
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.centos.org/pipermail/centos/attachments/20090428/75df29c7/attachment-0005.html>