4

I have upgraded 3Tb drives in my RAID-5 to 5Tb one by one with same partitioning. I want to grow each of the partitions (at the end of the disc) to take the extra 2Tb.

I looked at parted resize but it is expecting a filesystem on the partition (and I don't think that is the filesystem on the RAID).

Each of the drives has 2 partitions, for example /dev/sdd1 and /dev/sdd2 (the raid partition).

How can I resize the raid partition on these drives? Can I do so while the system is running?

Ubuntu 14.04 Server

  • Also, mdadm -E /dev/sdd1 to make sure you're not using version 0.9 or 1.0 superblocks. Resize is much harder with those... – derobert Apr 09 '15 at 17:13

1 Answers1

1

No you should not be using resize on an partition that is part of a RAID and no you should not do so while mounted.

You probably should not use the parted that you have at all. AFAIK Ubuntu 14.04 comes with the outdated parted 2.3 (check with parted -v) and the resize command has been removed in 3.0.

Download and compile the source for 3.2 from here (main parted page is here) and make sure you have libdevmapper-dev and uuid-dev installed:

apt-get install libdevmapper-dev uuid-dev libreadline-dev

(you might need some more these were the ones I had to install additionally to what I already had on my not so clean system, based on the feedback from ./configure).

You should follow the instructions in the INSTALL file, which essentially are the usual ./configure && make && sudo make install.

The 3.2 version of parted has a resizepart command that takes a partition number and the new end of the partition as parameters. This works even on mounted partitions

Of course having a recent backup is a proper precaution if you do this.

Anthon
  • 79,293