Tuesday, August 27, 2019

growing mdadm on ubuntu

I use a few flavours of Linux and love to use Linux servers due to hardware requirements (or lack thereof). A while back I set up Ubuntu 18.04 LTS for a file server.

The OS is running mainly on a 1TB drive initially with 3, 3TB drives. Since this server is not needed for speed but more redundancy I setup RAID 5 on it. This gave me around 6.3TB useable space.

I installed Microsoft SQL and it has been running like a dream.

That was until we ran out of space! So I acquired 2 more 3TB drives.

I hooked up the drives to the server and checked to make sure all drives are detected this gave the 6 drives as follows.


  • sdc (OS 1TB)
  • sdd (old 3TB)
  • sde (old 3TB)
  • sdf (old 3TB)
So first up was to figure out what the new drives are named.

sudo fdisk -l 
So sdc is used as OS as intended. Next up, check which drives are currently used in the array.
sudo mdadm --detail /dev/md0
This gave me sdd, sde and sdf as it should be. So the new drives are sda and sdb. This is quite simple.
The -n5 was to say 5 drives will now be used in the RAID setup.
sudo mdadm --grow /dev/md0 -n5
sudo mdadm --grow /dev/md0 --size=max
Thankfully I also have Webmin running on this server which broke the news this process of adding 2 new drives to this array will take anything from around 20 to 60 hours. While the array is growing the array is still usable.

growing mdadm on ubuntu

I use a few flavours of Linux and love to use Linux servers due to hardware requirements (or lack thereof). A while back I set up Ubuntu 18....