Completely shut down a RAID disk array under Linux

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.