Hi.
it is quite difficult to suggest appropriate actions on your array without some knowledge of your specific configuration.
Does your raid 1 rely on partitions on two hard disks ? Or does it rely on raw hard disks ?
Loot at your /etc/raidtab file and see what devices are mentioned. The following would use some partitions on sda and sdb for a /dev/md0 configured as raid 1 array
raiddev /dev/md0
raid-level 1
nr-raid-disks 2
persistent-superblock 1
chunk-size 16
device /dev/sda3
raid-disk 0
device /dev/sdb3
raid-disk 1
while the following would use whole hard disks sda and sdb
raiddev /dev/md0
raid-level 1
nr-raid-disks 2
persistent-superblock 1
chunk-size 16
device /dev/sda
raid-disk 0
device /dev/sdb
raid-disk 1
But since you seem to have succeeded in growing raw disk space, i suppose that you growed physical space (for example, with a hardware controler which is able to grow luns by itself or, if you replaced your hard disk one by one, having mdtools rebuild the replaced disk, or something else)
First of all, ensure that your mirror is clean. Use
# cat /proc/mdstat
md0 : active raid1 sda[1] sdb[0]
5120320 blocks [2/2] [UU]
If you can read [UU] it's ok.
Now, if your array relies on partitions, you should grow them. (on the example above, it does not since md0 relies on sda and sdb). You can use some specific tools like qtparted to grow these partitions. This step is necessary if you use a hardware controller to grow a LUN but if you replaced your 40 Gb HDs by 80 Gb ones, then you probably created larger partitions than the previous ones and you can skip this step.
Now, you have a raid 1 array of 40 Gb that relies on 80 Gb devices (disks or partitions). In order to grow the mirror, you should recreate it. This is why it is very important that your array is clean before you grow it.
Use mkraid -R /dev/md0 (if md0). You will see messages telling that it will destroy all your data, but don't panic. This command does initialize the mirror by copying the whole first device to the second one. But since any of the two devices contain your data, you don't lose anything and you don't even need to care what device is considered the first by mdtools (mentioned in /etc/raidtab).
So, now you should have a 80 Gb array. You can monitor raid initialisation by looking at /proc/mdstat, but you don't have to wait to the end of this process. You can try mounting your filesystem to check everything is ok.
The last thing you have to do is to grow your filesystem. If you mounted it, you have probably seen that your filesystem is still 40 Gb large. The followind commands are valid for ext2/ext3 filesystems, but you can find equivalent for xfs, reiserfs or whatever you use.
First, check it. I think the resize command complains if your filesystem has not been checked for a while.
# fsck.ext3 -fvy /dev/md0 # (or fsck.ext2 for ext2)
You can now resize your filesystem with
# resize2fs -p /dev/md0 # it's resize2fs also for ext3
And then check it again
# fsck.ext3 -fvy /dev/md0 # (or fsck.ext2 for ext2)
The check commands will probably report some warnings concerning block sizes or something...
And it's finished.
I have succesfully applied this procedure several times on my servers with no problem. But unless you are a real gambler, I suggest that you do some backups before trying this
Hope that helps... and good luck !
Regards