raid5 size reduced after system reinstall, how to fix?
From: Marcus Lell <hidden>
Date: 2021-01-14 08:44:03
Hello,
after reinstalling gentoo on my main system,
I had to find out, that my clean raid5 has been resized
from ca. 18,2TB to ca. 2,2 TB
.
I don't have any clue, why..
First, the array gets assembled successfully.
lxcore ~ # cat /proc/mdstat
Personalities : [raid1] [raid6] [raid5] [raid4]
md0 : active raid5 sdd1[2] sdb1[1] sdc1[0]
2352740224 blocks super 1.2 level 5, 64k chunk, algorithm 2 [3/3] [UUU]
bitmap: 0/9 pages [0KB], 65536KB chunk
unused devices: <none>
lxcore ~ # mdadm --detail /dev/md0
/dev/md0:
Version : 1.2
Creation Time : Sat Nov 10 23:04:14 2018
Raid Level : raid5
Array Size : 2352740224 (2243.75 GiB 2409.21 GB)
Used Dev Size : 1176370112 (1121.87 GiB 1204.60 GB)
Raid Devices : 3
Total Devices : 3
Persistence : Superblock is persistent
Intent Bitmap : Internal
Update Time : Tue Jan 12 14:58:40 2021
State : clean
Active Devices : 3
Working Devices : 3
Failed Devices : 0
Spare Devices : 0
Layout : left-symmetric
Chunk Size : 64K
Consistency Policy : bitmap
Name : lxcore:0 (local to host lxcore)
UUID : 0e3c432b:c68cda5b:0bf31e79:9dfe252b
Events : 80471
Number Major Minor RaidDevice State
0 8 33 0 active sync /dev/sdc1
1 8 17 1 active sync /dev/sdb1
2 8 49 2 active sync /dev/sdd1
but the partitions are ok
lxcore ~ # fdisk -l /dev/sdb1
Disk /dev/sdb1: 9.1 TiB, 10000830283264 bytes, 19532871647 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
same with sdc1 and sdd1
Here is the problem:
lxcore ~ # mdadm --examine /dev/sdb1
/dev/sdb1:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x1
Array UUID : 0e3c432b:c68cda5b:0bf31e79:9dfe252b
Name : lxcore:0 (local to host lxcore)
Creation Time : Sat Nov 10 23:04:14 2018
Raid Level : raid5
Raid Devices : 3
Avail Dev Size : 19532609759 (9313.87 GiB 10000.70 GB)
Array Size : 2352740224 (2243.75 GiB 2409.21 GB)
Used Dev Size : 2352740224 (1121.87 GiB 1204.60 GB)
Data Offset : 261888 sectors
Super Offset : 8 sectors
Unused Space : before=261800 sectors, after=17179869535 sectors
State : clean
Device UUID : a8fbe4dd:a7ac9c16:d1d29abd:e2a0d573
Internal Bitmap : 8 sectors from superblock
Update Time : Tue Jan 12 14:58:40 2021
Bad Block Log : 512 entries available at offset 72 sectors
Checksum : 86f42300 - correct
Events : 80471
Layout : left-symmetric
Chunk Size : 64K
Device Role : Active device 1
Array State : AAA ('A' == active, '.' == missing, 'R' == replacing)
same with /dev/sdc1 and /dev/sdd1
It shows, that only 1121.68GB are used instead of the
available 9.1TB, so the array size results in 2.2TB
Will a simple
mdadm --grow --size=max /dev/md0
fix this and leave the data untouched?
Any further advice?
Have a nice day.
marcus
please CC me, I'm not subscribed.