V
V
vlarkanov2019-05-30 17:57:28
linux
vlarkanov, 2019-05-30 17:57:28

How to increase mdadm RAID10 size?

Hello. There is RAID10 on mdadm. Initially there were 4 disks on 4TB. I replaced them one by one with 8Tb disks (removed a disk from the raid, inserted a new larger one, did --add, waited for the gum).
Now I have this array:


# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md0 : active raid10 sda1[7] sdb1[6] sdc1[5] sdf1[ 4] sdd[0](F)
7813774336 blocks super 1.2 512K chunks 2 near-copies [4/4] [UUUU]
# mdadm --detail /dev/md0
/dev/md0:
Version : 1.2
Creation Time : Fri Jul 7 14:09:54 2017
Raid Level : raid10
Array Size : 7813774336 (7451.80 GiB 8001.30 GB)
Used Dev Size : 3906887168 (3725.90 GiB 4000.65 GB)
Raid Devices : 4
Total Devices : 5
Persistence : Superblock is persistent
May 30 Update : Thu 18:08:38 2019
State : clean
Active Devices : 4
Working Devices : 4
Failed Devices : 1
Spare Devices : 0
Layout : near=2
Chunk Size : 512K
Name : aegis2:0
UUID : 391d634a:690494ac:b60d4a98:d3526c65
Events : 101700
Number Major Minor RaidDevice State
4 8 81 0 active sync set-A /dev/sdf1
5 8 33 1 active sync set-B /dev/sdc1
7 8 1 2 active sync set-A /dev/sda1
6 8 17 3 active sync set-B /dev/sdb1
0 8 48 - faulty
#lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 7.3T 0 disk
└─sda1 8:1 0 7.3T 0 part
└─md0 9:0 0 7.3T 0 raid10 /data/backup
sdb 8: 16 0 7.3T 0 disk
└─sdb1 8:17 0 7.3T 0 part
└─md0 9:0 0 7.3T 0 raid10 /data/backup
sdc 8:32 0 7.3T 0 disk
└─sdc1 8: 33 0 7.3T 0 part
└─md0 9:0 0 7.3T 0 raid10 /data/backup
sde 8:64 1 14.6G 0 disk
└─sde1 8:65 1 14.6G 0 part /
sdf 8:80 0 7.3T 0 disk
└─sdf1 8:81 0 7.3T 0 part
└─md0 9:0 0 7.3T 0 raid10 /data/backup
sr0 11:0 1 1024M 0 rom

All disks have partitions of the same size:

# cat /sys/block/md0/md/dev-sda1/size
7813893120
# cat /sys/block/md0/md/dev-sdb1/size
7813893120
# cat /sys/block/md0/md/dev-sdc1/size
7813893120
# cat /sys/block/md0/md/dev-sdf1/size
7813893120

I'm trying to increase:

# mdadm --grow /dev/md0 --size=max
mdadm: component size of /dev/md0 unchanged at 3906887168K

Those. size does not change.
On a test virtual machine, this scheme worked.
What to do, comrades?
UPD: I guess that the problem is in the fifth member of the sdd[0](F) raid, which is not in the system. What to do with him?
# mdadm --manage /dev/md0 --fail /dev/sdd
mdadm: Cannot find /dev/sdd: No such file or directory
# mdadm --manage /dev/md0 --remove /dev/sdd
mdadm: Cannot find /dev/sdd: No such file or directory

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
taliano, 2019-05-30
@vlarkanov

mdadm /dev/md0 --remove detached

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question