How to stop RAID5 array while it is shown to be busy?
Posted
by
RCola
on Super User
See other posts from Super User
or by RCola
Published on 2012-03-25T15:20:46Z
Indexed on
2012/03/25
17:33 UTC
Read the original article
Hit count: 404
I have a raid5 array and need to stop it, but while trying to stop it getting error.
# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md0 : active raid5 sde1[3](F) sdc1[4](F) sdf1[2] sdd1[1]
2120320 blocks level 5, 32k chunk, algorithm 2 [3/2] [_UU]
unused devices: <none>
# mdadm --stop
mdadm: metadata format 00.90 unknown, ignored.
mdadm: metadata format 00.90 unknown, ignored.
mdadm: No devices given.
# mdadm --stop /dev/md0
mdadm: metadata format 00.90 unknown, ignored.
mdadm: metadata format 00.90 unknown, ignored.
mdadm: fail to stop array /dev/md0: Device or resource busy
and
# lsof | grep md0
md0_raid5 965 root cwd DIR 8,1 4096 2 /
md0_raid5 965 root rtd DIR 8,1 4096 2 /
md0_raid5 965 root txt unknown /proc/965/exe
# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md0 : active raid5 sde1[3](F) sdc1[4](F) sdf1[2] sdd1[1]
2120320 blocks level 5, 32k chunk, algorithm 2 [3/2] [_UU]
# grep md0 /proc/mdstat
md0 : active raid5 sde1[3](F) sdc1[4](F) sdf1[2] sdd1[1]
# grep md0 /proc/partitions
9 0 2120320 md0
While booting, md1 is mounted ok but md0 failed for some unknown reason
# dmesg | grep md[0-9]
[ 4.399658] raid5: allocated 3179kB for md1
[ 4.400432] raid5: raid level 5 set md1 active with 3 out of 3 devices, algorithm 2
[ 4.400678] md1: detected capacity change from 0 to 2121793536
[ 4.403135] md1: unknown partition table
[ 38.937932] Filesystem "md1": Disabling barriers, trial barrier write failed
[ 38.941969] XFS mounting filesystem md1
[ 41.058808] Ending clean XFS mount for filesystem: md1
[ 46.325684] raid5: allocated 3179kB for md0
[ 46.327103] raid5: raid level 5 set md0 active with 2 out of 3 devices, algorithm 2
[ 46.330620] md0: detected capacity change from 0 to 2171207680
[ 46.335598] md0: unknown partition table
[ 46.410195] md: recovery of RAID array md0
[ 117.970104] md: md0: recovery done.
# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md0 : active raid5 sde1[0] sdf1[2] sdd1[1]
2120320 blocks level 5, 32k chunk, algorithm 2 [3/3] [UUU]
md1 : active raid5 sdc2[0] sdf2[2] sde2[3](S) sdd2[1]
2072064 blocks level 5, 128k chunk, algorithm 2 [3/3] [UUU]
© Super User or respective owner