Sysadmin war stories: (disk)size does matter
April 26, 2009,
When you have a RAID system you need to keep a few things in mind about disk sizes and never use the full disk. Here is why.
Every system adminstrator who has been around for a few years has a few war stories. We have been around for a little while, so we have plenty of them. Some of them are interesting, others embarrassing and others are just plain weird. The best stories are where you actually learn something, so you can quickly fix things in the future when something similar happens.
Disk size and RAID
One thing you have to be careful when setting up a RAID setup is that the partitions you use for RAID are all of the same size, or at least that you use the size of the smallest partition. This once bit us. We had a RAID setup, with two identical disks. One of the disks failed and since the disk still had warranty we sent it back to our supplier. They did not have an identical disk in stock so sent us a replacement disk, assuring it was the exact same size.
We went to the datacenter and replaced the old disk. Of course, we didn't just rip it out, but used the proper tools to put the RAID into degraded mode, inserted the new disk, partitioned it properly and then rebuilt it. At that point it turned out that the disk was not the same size, but actually a few GB smaller due to a different layout. Since we had used the whole disk on the old setup this was a problem. The solution was to backup the data and repartition the old disk to make the partition smaller. After that we could rebuild the last (and largest) partition of the RAID, restore the backup and be back in business.
As a precaution we decided to never use the full disks in a RAID system, but to always have a bit of a buffer in case we end up with a smaller disk again for some reason.