[mythtv-users] Linux software raid question

Yan-Fa Li yanfali at gmail.com
Fri Jun 6 17:22:59 UTC 2008

On Fri, Jun 6, 2008 at 8:56 AM, scram69 <scram69 at gmail.com> wrote:
> One question - I have read both that it is and is not possible to move
> a raid-5 to larger disks by replacing them one-by-one.  I would think
> this sort of procedure would be desirable for us myth users who
> consistently seem to build "budget-conscious" machines and then run
> out of space for our favorite shows.
> The wiki page on "Growing" makes the following statement:
> "It is possible to move whole RAID array to bigger disc drives by
> replacing one by one."
> which is followed by:
> "This section, about how to do it, needs to be written by someone who did this."
> Has anyone, that we know of, done this?

I've done it at least 3 or 4 times now.  I use RAID + LVM + XFS.
Rough procedure is:

1. add new larger disk to system.  Partition it with partitions the
same size or slightly larger
   than the disk you are replacing.  Leave the extra space unused for
now until you have migrated
   the existing data.
2. fail all the partitions of the physical disk you want to remove
manually (mdadm --manage -f)
3. hot remove the failed partitions (mdadm --manage -r)
4. hot add all the partitions you removed using the new larger disk.
(mdadm --manage -a).  Let system
   rebuild the array with the new disk.  This could take a long time.
5. rinse and repeat until all your old disks are replaced with new larger ones
6. create new partitions in the empty space on the new larger disks
and raid them.
7. add new partitions to physical volumes (pvcreate)
8. add physical volumes to volume group (vgextend)
9. extend Logical Volume to use space in volume group (lvextend)
10. extend XFS (xfs_growfs)


More information about the mythtv-users mailing list