1. Check the RAID disk array information and confirm which to close. such as: Close md0 this array
[Email protected] ~]# Cat/proc/mdstat
Personalities: [RAID6] [RAID5] [RAID4]
Md0:active RAID5 sdb5[3] (S) sdb1[0] sdb2[1] sdb3[4]
1043456 Blocks Super 1.2 level 5, 512k chunk, Algorithm 2 [3/3] [UUU]
Unused devices:
2, unload md0 This array mount point:
[Email protected]Godben ~]# UMOUNT/MNT/RAID5
3. Stop md0 This array and release all resources related to the array:
[Email protected]godben ~]# mdadm-s/dev/md0
Mdadm:stopped/dev/md0
Note: If you do not unload (umount) the md0 array before stopping it, the following prompt will appear:
[Email protected]godben ~]# mdadm-s/dev/md0
Mdadm:cannot Get exclusive access to/dev/md0:perhaps a running process, mounted filesystem or active volume group?
4, clear the member disk array of Super block information, this step is very important!
[Email protected]godben ~]# mdadm--zero-superblock/dev/sdb[1-3,5]
5. Delete or comment The mount information on the/etc/fstab
[Email protected]Godben ~]# vim/etc/fstab
#UUID =796a27da-d899-4e64-a3bd-b468fb0c4f37/mnt/raid5 ext4 de faults 0 0
6. Delete or comment The/etc/mdadm.conf corresponding RAID information:
[Email protected]Godben ~]# vim/etc/mdadm.conf
#ARRAY/dev/md0 metadata=1.2 Spares=1 name=kashu.localdomain:0 Uuid=3895d28e:bdcaed28:136b4cf6:d2a858f5
7, if finished all the above operation, found/dev/under the md0 this device file exists, directly rm-f/dev/md0 can
This article is from the "Godben" blog, make sure to keep this source http://godben.blog.51cto.com/8919725/1708634
Completely shut down a RAID disk array under Linux