Linux RAID-1 [9]: Removing an array

The last step having set up a new array is to remove the old one from the computer. This is relatively straightforward.

Firstly the array has to be unmounted, which is a simple umount command with the path, in this case umount /oldhome. The next thing is to run a mdadm command to remove the array from the disk.

mdadm –manage –stop /dev/md0

is the command that will stop the running md0 RAID array.

Then another command removes the array:

mdadm –remove /dev/md0

Final action is to remove the superblock on the individual disks (only one disk present in this case as the failed drive has already been taken out of the computer):

mdadm –zero-superblock /dev/sdd

We also need to remove its entries from /etc/fstab  and from /etc/mdadm/mdadm.conf

At this point GDU is showing me the disk is just a disk with nothing on it, it still shows “Block device /dev/md0” however, I have not got much of an idea whether that will just disappear the next time the computer is restarted, I assume it will.



by

Tags: