0

There were 4 drives in a raid array md2, md1, m0. 2 drives of 6TB size and 2 drives of 1TB size. I removed both the drives of 1TB size from /dev/md2. Now there are 2 drives of 6TB size each. But when df -h is done, /dev/md2 which is mounted at root(/) shows as 875GB(~=1TB) instead of 6TB. How do i make /dev/md2 to show the correct size.

Follwoing steps I performed to remove the drives from raid.

mdadm /dev/md2 -r /dev/sda3

mdadm /dev/md2 --fail /dev/sdc3
mdadm /dev/md2 -r /dev/sdc3

mdadm --grow /dev/md2 --raid-devices=2
0

1 Answer 1

0

Your raid devices consist of logical partitions, not full disks. Verify the partition sizes with the fdisk -l or parted -l commands.

Update

Seems like you've cloned the partition table from small disk. So you should:

  • remove one of the new partitons from the raid
  • change the partition size
  • add the partition back into the raid
  • sync the data
  • do the same with other partition
  • change the raid size with mdadm --grow /dev/md2 --size=max command.
  • change the filesystem size (for EXT fs use resize2fs command, for example)

Readings:

9
  • fdisk -l shows Disk /dev/md2: 889.6 GiB. But cat /proc/mdstat shows that /dev/md2 uses drive sdb and sdd which is of size 6TB each. But df -h shows /dev/md2 as 875Gb instead of 6TB
    – user532962
    Jul 24, 2019 at 18:03
  • Check the disks, not the raid devices. fdisk -l /dev/sda, fdisk -l /dev/sdb and so on. What are sizes of the partitions? Jul 24, 2019 at 18:05
  • t shows the correct size. /dev/sda is set as 894.3 GiB, /dev/sdb to 5.5 TiB, dev/sdc to 894.3 GiB and /dev/sdd to 5.5 TiB
    – user532962
    Jul 24, 2019 at 18:09
  • Paste the full outputs of mdadm --detail /dev/md2 and fdisk -l into the question. Jul 24, 2019 at 18:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .