LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-25-2012, 07:55 AM   #1
jg4545
LQ Newbie
 
Registered: Jan 2012
Posts: 2

Rep: Reputation: Disabled
Help with deleting RAID 0 using MDADM


Hi all,

I'm using MDADM to create a Raid0 array (2 disks), which I have done successfully. Now I want to add another two disks and make a Raid5. I've tried using --remove to delete disks from Raid0 array and delete it but now I realise this can't be done in Raid0. So is it safe to just delete the super-block and make a Raid 5? Do I need to stop the array first? I think I need to delete Raid0 array first but how do I this?

Step by step instructions would be really helpful.

Thanks in advance for any help.
 
Old 01-25-2012, 08:24 AM   #2
ongte
Member
 
Registered: Jun 2009
Location: Penang, Malaysia
Distribution: Mageia, CentOS, Ubuntu
Posts: 468

Rep: Reputation: 72
As you found, you can't just change from RAID 0 to 5. You will have to stop and remove the array, then you can reuse the disks to create a new RAID 5.
The command would be something like:
Code:
$ sudo umount /dev/md0
$ sudo mdadm --stop /dev/md0
$ sudo mdadm --remove /dev/md0

Last edited by ongte; 01-25-2012 at 08:26 AM.
 
Old 01-25-2012, 09:12 AM   #3
jg4545
LQ Newbie
 
Registered: Jan 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
Help with deleting RAID 0 using MDADM

Quote:
Originally Posted by ongte View Post
As you found, you can't just change from RAID 0 to 5. You will have to stop and remove the array, then you can reuse the disks to create a new RAID 5.
The command would be something like:
Code:
$ sudo umount /dev/md0
$ sudo mdadm --stop /dev/md0
$ sudo mdadm --remove /dev/md0
Thanks for your reply.

This is what I typed:
sudo mdadm --stop /dev/md0

Response:
mdadm: stopped /dev/md0

Typed in:
sudo mdadm --remove /dev/md0

Response:
mdadm: error opening /dev/md0: No such file or directory

I typed mount before stopping the array and it was not mounted.

Any ideas?

Thanks
 
Old 01-25-2012, 10:31 AM   #4
ongte
Member
 
Registered: Jun 2009
Location: Penang, Malaysia
Distribution: Mageia, CentOS, Ubuntu
Posts: 468

Rep: Reputation: 72
Hmm.. it seems --remove does not work in Ubuntu. You might try wiping the superblock then:
Code:
$ sudo mdadm --zero-superblock /dev/sdx
where x is the drive/partition of the member disks. Repeat for all member disks. To remove any save configuration, you might also remove the mdadm.conf file.
Code:
$ sudo rm /etc/mdadm/mdadm.conf
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why can't I mount this md0 raid? (mdadm and software raid) cruiserparts Linux - Software 35 01-05-2013 04:35 PM
Broken raid 5 (11 drives in mdadm) -- data recovery/raid reconstruction needed -- ple jml48197 Linux - Server 4 07-27-2010 01:57 PM
RAID - how to create RAID 1 without deleting data dlugasx Linux - Hardware 3 07-26-2009 10:23 PM
Dell/Intel ICH7 soft-RAID and mdadm raid-level mistake PhilipTheMouse Linux - General 0 03-14-2009 06:59 PM
RAID mdadm - Sending E-Mails on RAID Failure? rootking Linux - General 1 12-25-2007 04:59 AM


All times are GMT -5. The time now is 02:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration