Note: All of this can take a long time so it is best to do it in a on the console or in a vnc/freenx/screen session.
# First test all the blocks on the new drive. I've had more than one drive come with bad sectors.
$ badblocks -w -p 1 -v <new device>
$ badblocks -w -p 1 -v <new device>
# Because resizing a raid array doesn't always work right and can cause data loss, if I have enough free pvs, I'll move the data off the one being resized. In this case it isn't necessary to grow the array, I can just delete it and create a new bigger one. Unfortunately pvmove is quite slow, so this approach may take a few days.
$ pvmove <md>
# If I don't have enough free space or time to move the data off the array, then it's necessary to grow it in place.
$ mdadm <md> --add <new device>
# take note of how many devices are part of the array
$ mdadm --detail <md>
# watch /proc/mdstat and wait until the array is not rebuilding anything or else the following command will block
$ mdadm --grow --backup-file=/root/raid_resize_backup --raid-devices=<num> <md>
# wait until the reshape is finished
$ watch cat /proc/mdstat
$ pvresize <md>
$ mdadm --detail --scan > /etc/mdadm/mdadm.conf
How I resize a logical volume:
# Take note of how many free extents are available on which devices
$ pvdisplay -m
# Stop any processes using the volume
$ umount <logical>
$ lvextend -l +<number> <logical> <physical>
$ e2fsck -f <logical>
$ resize2fs <logical>
$ mount <logical>
# Start back up nfs, smb, etc. that were stopped earlier
$ mdadm <md> --add <new device>
# take note of how many devices are part of the array
$ mdadm --detail <md>
# watch /proc/mdstat and wait until the array is not rebuilding anything or else the following command will block
$ mdadm --grow --backup-file=/root/raid_resize_backup --raid-devices=<num> <md>
# wait until the reshape is finished
$ watch cat /proc/mdstat
$ pvresize <md>
$ mdadm --detail --scan > /etc/mdadm/mdadm.conf
How I resize a logical volume:
# Take note of how many free extents are available on which devices
$ pvdisplay -m
# Stop any processes using the volume
$ umount <logical>
$ lvextend -l +<number> <logical> <physical>
$ e2fsck -f <logical>
$ resize2fs <logical>
$ mount <logical>
# Start back up nfs, smb, etc. that were stopped earlier