Removing the drive from the RAID array
This section covers the steps required to remove a storage drive from the RAID array, before physically removing the drive from the storage enclosure.
In the example, we assume that a drive has failed.
To check the status of the RAID array, use the following command:
# cat /proc/mdstat
Following is an example output:
Personalities : [raid1] [raid6] [raid5] [raid4] [raid0]
md124 : active raid0 md125[0]
4657247232 blocks super 1.2 512k chunks
md125 : active raid5 dm-7[7] dm-6[6] dm-5[5] dm-4[4] dm-3[3](F) dm-2[2] dm-1[1] dm-0[0]
4657379328 blocks super 1.2 level 5, 16k chunk, algorithm 2 [7/6] [UUU_UUU]
[>....................] recovery = 1.5% (12246008/776229888) finish=62.7min speed=202807K/sec
bitmap: 0/6 pages [0KB], 65536KB chunk
md126 : active raid1 sda[1] sdb[0]
118778880 blocks super external:/md127/0 [2/2] [UU]
md127 : inactive sda[1](S) sdb[0](S)
6306 blocks super external:imsm
unused devices: <none>
To view detailed information about the status of the RAID array, use the following command:
# mdadm --detail /dev/md/md5
Following is an example output:
/dev/md/md5:
Version : 1.2
Creation Time : Mon Aug 20 11:03:31 2018
Raid Level : raid5
Array Size : 4657379328 (4441.62 GiB 4769.16 GB)
Used Dev Size : 776229888 (740.27 GiB 794.86 GB)
Raid Devices : 7
Total Devices : 8
Persistence : Superblock is persistent
Intent Bitmap : Internal
Update Time : Mon Aug 20 11:50:30 2018
State : clean, degraded, recovering
Active Devices : 6
Working Devices : 7
Failed Devices : 1
Spare Devices : 1
Layout : left-symmetric
Chunk Size : 16K
Consistency Policy : bitmap
Rebuild Status : 20% complete
Name : any:md5
UUID : 5f7b873c:16d6d418:7b5f6fde:247566a7
Events : 162
Number Major Minor RaidDevice State
0 253 0 0 active sync /dev/dm-0
1 253 1 1 active sync /dev/dm-1
2 253 2 2 active sync /dev/dm-2
7 253 7 3 spare rebuilding /dev/dm-7
4 253 4 4 active sync /dev/dm-4
5 253 5 5 active sync /dev/dm-5
6 253 6 6 active sync /dev/dm-6
3 253 3 - faulty /dev/dm-3
In this example, dm-3 is marked as failed (dm-3[3](F)).
To remove a drive from the RAID array, follow these steps:
The drive is now removed from the RAID array.
The drive can now be physically removed from storage block slot 5. Follow the steps in Removing a hot-swap drive
Give feedback