Mdadm – How can i destroy or delete an array : Memory, Storage, Backup and Filesystems So, you created an array and you messed up something? Now you would like to delete it? Please note: all data will be lost with this operation! 1. Stop the array Code: Select all # mdadm -S /dev/md0 2. Remove the disks from the array (in my example md0 is a raid5 array with 3 disks) Code: Select all # mdadm /dev/md0 -r /dev/sda # mdadm /dev/md0 -r /dev/sdb # mdadm /dev/md0 -r /dev/sdc 3. Destroy the array configuration from each disk (this will destroy all the data from your disks) Code: Select all # dd if=/dev/zero of=/dev/sda bs=1M count=1024 # dd if=/dev/zero of=/dev/sdb bs=1M count=1024 # dd if=/dev/zero of=/dev/sdc bs=1M count=1024 4. Remove the mdadm.conf file (if any) Code: Select all # rm /etc/mdadm/mdadm.conf Now you can try to create a new array as you wish or as you were suposed to…
Mdadm – How can i destroy or delete an array : Memory, Storage, Backup and Filesystems
So, you created an array and you messed up something? Now you would like to delete it?
Please note: all data will be lost with this operation!
1. Stop the array
Code: Select all
# mdadm -S /dev/md0
2. Remove the disks from the array (in my example md0 is a raid5 array with 3 disks)
Code: Select all
# mdadm /dev/md0 -r /dev/sda
# mdadm /dev/md0 -r /dev/sdb
# mdadm /dev/md0 -r /dev/sdc
3. Destroy the array configuration from each disk (this will destroy all the data from your disks)
Code: Select all
# dd if=/dev/zero of=/dev/sda bs=1M count=1024
# dd if=/dev/zero of=/dev/sdb bs=1M count=1024
# dd if=/dev/zero of=/dev/sdc bs=1M count=1024
4. Remove the mdadm.conf file (if any)
Code: Select all
# rm /etc/mdadm/mdadm.conf
Now you can try to create a new array as you wish or as you were suposed to…