It should be do-able, but is always a good idea to have a current, valid, verified backup of any data you wish to retain in the event of a failure.
helpful to have:
fdisk -l
cat /proc/mdstat
I'm going to pretend that this is used solely for data and the OS is on another disk or set of disks to make it easier for me. Also, we have sda and sdb, each with a single partition sd[ab]1 which is type fd Linux raid auto and a member of sw raid 1 /dev/md0 which has an ext3 filesystem on it mounted at /data/. I think that should cover it and be about as simple a setup as i can come up with at the moment...
general idea:
- backup data you want to keep
- run fsck on unmounted /dev/md0 (good to be sure)
- depending on how brave you feel you can mount it after confirming fsck is good, \
otherwise, keep fs offline
- fail disk/partition (sda1) from array and remove it
Code:
mdadm /dev/md0 -f /dev/sda1 -r /dev/sda1
- replace sda 500GB disk with 1TB disk
- create 1TB sda1 partition on new sda (1TB) drive as type fd linux raid auto
- add it as member to md0
Code:
mdadm -a /dev/md0 /dev/sda1
- once resync completes do the same with 2nd 500GB member
Code:
watch -d cat /proc/mdstat
mdadm /dev/md0 -f /dev/sdb1 -r /dev/sdb1
<swap 500GB sdb for 1TB sdb and partition it>
mdadm -a /dev/md0 /dev/sdb1
watch -d cat /proc/mdstat
- should have two 1TB partitions with a 500GB raid1 (md0) running
- grow raid1 to use the unused space
Code:
mdadm -G /dev/md0 --size max
watch -d cat /proc/mdstat
- once sync completes, grow the filesystem (i prefer to wait for sync completion here)
- check it all out and make sure it is what you want it to be
Should also check the commands, switches, and options for accuracy.