Linux Raid: Can mdadm –grow a raid1 while mounted

linuxmdadmraid

I have 2 500gb drives in a RAID1 setup that I needed to upgrade for more space. I mdadm –fail'ed each drive in turn and I used dd to copy each drive to it's respective larger drive (2tb each), removed the smaller drives and replaced them with the larger drives, and reassembled the array and forced a resync. So now I've got a 500gb RAID1 sitting on 2TB drives, and wish to grow them.

The plan is to use
mdadm –manage /dev/md0 –grow
to grow them, then boot a rescue cd, assemble the array under that environment, and do the resize2fs on them. Can I use mdadm –grow on a mounted and live filesystem? Also, do I need more options to make sure the grow operation stays raid1?

Best Answer

Sorry, I know I'm not replying the right way, but I couldn't figure out how to get my unregistered user registered.

I couldn't just copy the data over as I couldn't risk losing new data that showed up on the old drives during the copy. I had to have the server lose as little uptime as possible, so I couldn't take it down during the copy. I could really only spare enough downtime to swap drives.

Managed to make it work:

Removed one old drive plugged in one new drive synced the raid partiton across to the new drive unplugged the remaining old drive, replaced it with the remaining new drive synced again mdadm --grow'ed it resize2fs'ed it

the grow and the resize2fs happened live. It was fairly low drama.

Related Topic