■
HDD交換前{2TB,2.5TB,3TB}=>4TB@RAID5
HDD交換後{3TB,2.5TB,3TB}=>5TB@RAID5
アンマウント
umount /mnt/raid5/
オンライン拡張
mdadm --grow /dev/md126 -z max
時間がかかる
オンライン再構築後
# cat /proc/mdstat
Personalities : [raid1] [raid6] [raid5] [raid4] md126 : active raid5 sdc1[5] sdd1[3] sde1[4] 4883515392 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/3] [UUU] bitmap: 0/10 pages [0KB], 131072KB chunk md127 : active raid1 sda1[3] sdb1[2] 2930134016 blocks super 1.2 [2/2] [UU] bitmap: 2/22 pages [8KB], 65536KB chunk unused devices:
ディスクチェック
# e2fsck -f /dev/md126
e2fsck 1.42.9 (28-Dec-2013) Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information /dev/md126: 6506/244178944 files (11.0% non-contiguous), 785230172/976691200 blocks
拡張
# resize2fs /dev/md126
resize2fs 1.42.9 (28-Dec-2013) Resizing the filesystem on /dev/md126 to 1220878848 (4k) blocks. The filesystem on /dev/md126 is now 1220878848 blocks long.
# mdadm --detail /dev/md126
/dev/md126: Version : 1.2 Creation Time : Sun Feb 5 00:22:35 2017 Raid Level : raid5 Array Size : 4883515392 (4657.28 GiB 5000.72 GB) Used Dev Size : 2441757696 (2328.64 GiB 2500.36 GB) Raid Devices : 3 Total Devices : 3 Persistence : Superblock is persistent Intent Bitmap : Internal Update Time : Fri Sep 6 09:54:36 2019 State : clean Active Devices : 3 Working Devices : 3 Failed Devices : 0 Spare Devices : 0 Layout : left-symmetric Chunk Size : 512K Consistency Policy : unknown Name : serv3:127 (local to host serv3) UUID : 59eb6cbf:57782701:f034a4f7:b9427151 Events : 98346 Number Major Minor RaidDevice State 3 8 49 0 active sync /dev/sdd1 5 8 33 1 active sync /dev/sdc1 4 8 65 2 active sync /dev/sde1
成功している。
マウント