# Help with RAID on RL9.2

**URL:** <https://forums.rockylinux.org/t/help-with-raid-on-rl9-2/10170>\
**Category:** Rocky Linux Help & Support\
**Created:** [June 4, 2023, 8:02pm UTC](https://forums.rockylinux.org/t/help-with-raid-on-rl9-2/10170 "2023-06-04T20:02:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hspindel](https://avatars.discourse-cdn.com/v4/letter/h/3bc359/32.png) [@hspindel](https://forums.rockylinux.org/u/hspindel)\
**Post date:** [June 4, 2023, 8:02pm UTC](https://forums.rockylinux.org/t/help-with-raid-on-rl9-2/10170/1 "2023-06-04T20:02:00Z")

</div>

I recently had to reinstall RL9.2 from scratch on a server with 4 identical drives. During the install, I opted for manual partitioning, selected 3 of the 4 drives, and asked that /home be configured as a RAID 5 with the intention of adding the 4th drive as a spare later.

When I tried to use the command  
mdadm --add /dev/md125 /dev/sdi2  
mdadm complains “Cannot open /dev/sdi2: Device or resource busy”.

cat /proc/mdstat reports:  
Personalities : [raid6] [raid5] [raid4]  
md124 : active (auto-read-only) raid5 sdh4[3] sdg4[1] sdf6[0]  
6988820480 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/2] [UU\_]  
bitmap: 0/27 pages [0KB], 65536KB chunk

md125 : active raid4 sdh2[3] sdg2[1] sdf4[0]  
700628992 blocks super 1.2 level 4, 512k chunk, algorithm 0 [3/3] [UUU]  
bitmap: 2/3 pages [8KB], 65536KB chunk

md126 : active (auto-read-only) raid5 sdh6[3] sdg6[1] sdf8[0]  
48896000 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/3] [UUU]  
bitmap: 0/1 pages [0KB], 65536KB chunk

md127 : inactive sdi2 [3] (S)  
3875872768 blocks super 1.2

Does the (S) on md127 mean that RL automatically created it as a spare?

* * *

lsblk reports:  
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS  
sda 8:0 1 114.6G 0 disk  
â””â”€sda1 8:1 1 114.6G 0 part  
sdb 8:16 1 0B 0 disk  
sdc 8:32 1 0B 0 disk  
sdd 8:48 1 0B 0 disk  
sde 8:64 1 0B 0 disk  
sdf 8:80 0 3.6T 0 disk  
â”œâ”€sdf1 8:81 0 1M 0 part  
â”œâ”€sdf2 8:82 0 1G 0 part /boot  
â”œâ”€sdf3 8:83 0 28.6G 0 part  
â”‚ â”œâ”€rl\_server200-root 253:0 0 70G 0 lvm /  
â”‚ â””â”€rl\_server200-swap 253:2 0 15.7G 0 lvm [SWAP]  
â”œâ”€sdf4 8:84 0 334.2G 0 part  
â”‚ â””â”€md125 9:125 0 668.2G 0 raid4 /home  
â”œâ”€sdf5 8:85 0 1G 0 part  
â”œâ”€sdf6 8:86 0 3.3T 0 part  
â”‚ â””â”€md124 9:124 0 6.5T 0 raid5  
â”œâ”€sdf7 8:87 0 5.2G 0 part  
â”‚ â””â”€rl\_server2-swap 253:1 0 15.7G 0 lvm  
â””â”€sdf8 8:88 0 23.3G 0 part  
â””â”€md126 9:126 0 46.6G 0 raid5  
sdg 8:96 0 3.6T 0 disk  
â”œâ”€sdg1 8:97 0 28.6G 0 part  
â”‚ â””â”€rl\_server200-root 253:0 0 70G 0 lvm /  
â”œâ”€sdg2 8:98 0 334.2G 0 part  
â”‚ â””â”€md125 9:125 0 668.2G 0 raid4 /home  
â”œâ”€sdg4 8:100 0 3.3T 0 part  
â”‚ â””â”€md124 9:124 0 6.5T 0 raid5  
â”œâ”€sdg5 8:101 0 5.2G 0 part  
â”‚ â””â”€rl\_server2-swap 253:1 0 15.7G 0 lvm  
â””â”€sdg6 8:102 0 23.3G 0 part  
â””â”€md126 9:126 0 46.6G 0 raid5  
sdh 8:112 0 3.6T 0 disk  
â”œâ”€sdh1 8:113 0 28.6G 0 part  
â”‚ â””â”€rl\_server200-root 253:0 0 70G 0 lvm /  
â”œâ”€sdh2 8:114 0 334.2G 0 part  
â”‚ â””â”€md125 9:125 0 668.2G 0 raid4 /home  
â”œâ”€sdh4 8:116 0 3.3T 0 part  
â”‚ â””â”€md124 9:124 0 6.5T 0 raid5  
â”œâ”€sdh5 8:117 0 5.2G 0 part  
â”‚ â””â”€rl\_server2-swap 253:1 0 15.7G 0 lvm  
â””â”€sdh6 8:118 0 23.3G 0 part  
â””â”€md126 9:126 0 46.6G 0 raid5  
sdi 8:128 0 3.6T 0 disk  
â”œâ”€sdi1 8:129 0 28.6G 0 part  
â””â”€sdi2 8:130 0 3.6T 0 part  
â””â”€md127 9:127 0 0B 0 md  
sr0 11:0 1 1024M 0 rom

==================

How do I recover from this and add sdi as a RAID spare?

# P.S. I don’t know what all the funny characters in lsblk are about.

df reports:  
Filesystem 1K-blocks Used Available Use% Mounted on  
devtmpfs 4096 0 4096 0% /dev  
tmpfs 16284808 0 16284808 0% /dev/shm  
tmpfs 6513924 11284 6502640 1% /run  
/dev/mapper/rl\_server200-root 73364480 5826484 67537996 8% /  
/dev/sdf2 1038336 472292 566044 46% /boot  
/dev/md125 700286888 43740960 656545928 7% /home  
tmpfs 3256960 112 3256848 1% /run/user/1000  
[//192.1.1.12/rocky-dd](https://192.1.1.12/rocky-dd) 17578326008 13072738248 4505587760 75% /mnt/rocky-dd

===================

df /home tells me that /home is mounted on md125. I am also confused as to why mdstat also tells me I have md124, md126, and md127 present. I didnt intend to create any of those.

---

<div class="post-metadata">

**Author:** ![hspindel](https://avatars.discourse-cdn.com/v4/letter/h/3bc359/32.png) [@hspindel](https://forums.rockylinux.org/u/hspindel)\
**Post date:** [June 4, 2023, 8:31pm UTC](https://forums.rockylinux.org/t/help-with-raid-on-rl9-2/10170/2 "2023-06-04T20:31:26Z")

</div>

An update: found out about mdadm --query. Here are the results:

[root@server2 proc]# mdadm --query /dev/md125  
/dev/md125: 668.17GiB raid4 3 devices, 0 spares. Use mdadm --detail for more detail.  
[root@server2 proc]# mdadm --query /dev/md124  
/dev/md124: 6.51TiB raid5 3 devices, 1 spare. Use mdadm --detail for more detail.  
[root@server2 proc]# mdadm --query /dev/md126  
/dev/md126: 46.63GiB raid5 3 devices, 0 spares. Use mdadm --detail for more detail.  
[root@server2 proc]# mdadm --query /dev/md127

* * *

As before, md125 is where my /home is. The query command says this is a RAID 4 instead of a RAID 5, which is not what I asked for. Also it says no spares. md124 does have a spare. I don’t know what md124 is used for and don’t know how to find out.

---

<div class="post-metadata">

**Author:** ![brian](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/brian/32/5777_2.png) [@brian](https://forums.rockylinux.org/u/brian)\
**Post date:** [August 25, 2023, 3:11am UTC](https://forums.rockylinux.org/t/help-with-raid-on-rl9-2/10170/3 "2023-08-25T03:11:55Z")

</div>


