Cannot remove raid1 array (mdadm)

Hi,
The system is Oracle Linux 6.3 x86_64 running under VirtualBox. In order to remove the Linux RAID root volume I have started the system using the OL 6.3 UEK boot CD.
For some reason I'm unable to remove the /dev/md127 RAID device. Please see below:
<pre>
# mdadm -As
mdadm: /dev/md/vm009.example.com:1 has been started with 2 drives.
# cat /proc/mdstat
Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] [linear]
md127 : active raid1 sda2 [0] sdb2 [1]
20457404 blocks super 1.1 [2/2] [UU]
bitmap: 0/1 pages [0KB], 65536KB chunk
md126 : active raid1 sda1[0] sdb1[1]
511988 blocks super 1.0 [2/2] [UU]
</pre>
My first idea was to stop the device and remove it, which does not work:
<pre>
# *mdadm --stop /dev/md127*
mdadm: stopped /dev/md127
# *mdadm --remove /dev/md127*
mdadm: error opening /dev/md127: No such file or directory
</pre>
However, there is no error when I do not stop /dev/md127. But also the device is not removed:
<pre>
# mdadm -As
mdadm: /dev/md/vm009.example.com:1 has been started with 2 drives.
# *mdadm --remove /dev/md127*
# cat /proc/mdstat
Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] [linear]
md127 : active raid1 sda2 [0] sdb2 [1]
20457404 blocks super 1.1 [2/2] [UU]
bitmap: 0/1 pages [0KB], 65536KB chunk
md126 : active raid1 sda1[0] sdb1[1]
511988 blocks super 1.0 [2/2] [UU]
</pre>
I thought about to use -zero-superblock:
<pre>
# *mdadm --stop /dev/md127*
mdadm: stopped /dev/md127
# *mdadm --zero-superblock /dev/sdb2*
# mdadm -As
mdadm: /dev/md/vm009.example.com:1 has been started with 1 drive (out of 2).
# cat /proc/mdstat
Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] [linear]
md127 : active raid1 sda2 [0]
20457404 blocks super 1.1 [2/1] [U_]
bitmap: 0/1 pages [0KB], 65536KB chunk
md126 : active raid1 sda1[0] sdb1[1]
511988 blocks super 1.0 [2/2] [UU]
</pre>
However, if I do the same for the other drive, then I loose the complete enchilada.
<pre>
# *mdadm --stop /dev/md127*
mdadm: stopped /dev/md127
# *mdadm --zero-superblock /dev/sda2*
# mdadm -As
mdadm: No arrays found in config file or automatically
</pre>
Here is the detail of the /dev/md127 device:
<pre>
# mdadm --detail /dev/md127
/dev/md127:
Version : 1.1
Creation Time : Wed Nov 7 01:44:42 2012
Raid Level : raid1
Array Size : 20457404 (19.51 GiB 20.95 GB)
Used Dev Size : 20457404 (19.51 GiB 20.95 GB)
Raid Devices : 2
Total Devices : 2
Persistence : Superblock is persistent
Intent Bitmap : Internal
Update Time : Thu Nov 8 01:23:00 2012
State : active
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
Name : vm009.example.com:1
UUID : 006a3ad6:c0590b94:5fddf632:5704f209
Events : 70
Number Major Minor RaidDevice State
0 8 2 0 active sync /dev/sda2
1 8 18 1 active sync /dev/sdb2
</pre>
Any ideas what I might be doing wrong? Thanks!

I found confirmation of the procedure to remove a RAID device in chapter 5.3.5. Removing a RAID Device at https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_Linux/5/html/Deployment_Guide/s2-raid-manage-removing.html. But apparently, there is no more reference in the documentation for version 6.
Anway, after some experimenting I finally I seem to have found the solution:
<pre>
# mdadm -S /dev/md126
mdadm: stopped /dev/md126
# mdadm -S /dev/md127
mdadm: stopped /dev/md127
mdadm --zero-superblock /dev/sdb2
mdadm --zero-superblock /dev/sda2
# mdadm -As
mdadm: /dev/md/vm009.example.com:0 has been started with 2 drives.
# cat /proc/mdstat
Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] [linear]
md127 : active raid1 sda1[0] sdb1[1]
511988 blocks super 1.0 [2/2] [UU]
</pre>
Apparently the trick is to stop all of the RAID devices and not just only the one to be deleted (md127). Something might get confused between md126 and md127. I have no explanation. I guess I do not need to remove the md127 RAID device once the RAID superblock is removed, but I wonder how this will work with initramfs, which should still have references to the RAID device.

Similar Messages

  • Low power CPU (Intel Atom) to control RAID1 array (mdadm) [solved]

    Can anyone comment on the CPU overhead associated with using a low power CPU such as an Intel Atom to function as a NAS running software raid1 (mdadm)?  Will it limit I/O?
    Last edited by graysky (2013-10-02 07:32:08)

    Logic says raid0/raid1 should not be much of a problem since you are splitting/dupplicating data without doing any or almost any math, raid5 or others that need to calculate parity information can be a problem with atom cpus I believe.
    Maybe you should check review sites for NAS boxes reviews, most come with atom cpus inside and will probably give you a good idea of how your specific cpu model will perform.

  • [solved]RAID1 array is showing only one disk

    Hi,
    I configured RAID1 on my Arch Linux system. Sometime during the past few days (I don't know when) I think SATA cable of one of the disks (sda) went loose. I got a hint by some error messages in dmesg output.
    I realized this only today. To minimize the damage I rebooted the system, made sure that all connectors are connected properly and booted it again. Now the system is up and running, but what I see is that only one disk is being used at this time around.
    # cat /proc/mdstat
    Personalities : [raid1]
    md0 : active raid1 sdc6[1]
    915811008 blocks super 1.2 [2/1] [_U]
    bitmap: 6/7 pages [24KB], 65536KB chunk
    I want to enable the other disk as well. The other disk has sda6 as the partition with is used in RAID1 array.
    Can somebody help me how to go about this? I don't want some inconsistency to creep in, because of my doing something wrong.
    Last edited by slash_blog (2015-04-29 04:47:12)

    I am seeing the following. I am booting from this system and yet it says no md superblock detected on /dev/md0, while for the two partitions which are part of this RAID1 array there doesn't seem to be any problem.
    This is getting confusing. Can somebody kindly comment?
    # mdadm --examine /dev/md0
    mdadm: No md superblock detected on /dev/md0.
    # mdadm --examine /dev/sda6
    /dev/sda6:
    Magic : a92b4efc
    Version : 1.2
    Feature Map : 0x1
    Array UUID : 00a62e18:a8c29e17:77d4627c:91a94994
    Name : ncdl-desk:0 (local to host ncdl-desk)
    Creation Time : Thu Apr 2 03:00:39 2015
    Raid Level : raid1
    Raid Devices : 2
    Avail Dev Size : 1831622064 (873.39 GiB 937.79 GB)
    Array Size : 915811008 (873.39 GiB 937.79 GB)
    Used Dev Size : 1831622016 (873.39 GiB 937.79 GB)
    Data Offset : 262144 sectors
    Super Offset : 8 sectors
    Unused Space : before=262056 sectors, after=48 sectors
    State : clean
    Device UUID : 88809386:57f1b788:8f3a0e82:72b0ac87
    Internal Bitmap : 8 sectors from superblock
    Update Time : Tue Apr 28 00:36:18 2015
    Bad Block Log : 512 entries available at offset 72 sectors
    Checksum : 672755a9 - correct
    Events : 10520
    Device Role : Active device 0
    Array State : AA ('A' == active, '.' == missing, 'R' == replacing)
    # mdadm --examine /dev/sdc6
    /dev/sdc6:
    Magic : a92b4efc
    Version : 1.2
    Feature Map : 0x1
    Array UUID : 00a62e18:a8c29e17:77d4627c:91a94994
    Name : ncdl-desk:0 (local to host ncdl-desk)
    Creation Time : Thu Apr 2 03:00:39 2015
    Raid Level : raid1
    Raid Devices : 2
    Avail Dev Size : 1831622064 (873.39 GiB 937.79 GB)
    Array Size : 915811008 (873.39 GiB 937.79 GB)
    Used Dev Size : 1831622016 (873.39 GiB 937.79 GB)
    Data Offset : 262144 sectors
    Super Offset : 8 sectors
    Unused Space : before=262056 sectors, after=48 sectors
    State : clean
    Device UUID : 9d297b70:3ce0ec72:49be866b:52e5b83b
    Internal Bitmap : 8 sectors from superblock
    Update Time : Wed Apr 29 00:07:35 2015
    Bad Block Log : 512 entries available at offset 72 sectors
    Checksum : d8cb5560 - correct
    Events : 36218
    Device Role : Active device 1
    Array State : .A ('A' == active, '.' == missing, 'R' == replacing)

  • Horrible problems while mounting BTRFS RAID1 array (on a single HDD)

    Since I made my 2TB HDD (Samsung M9T which I bought precisely to make it a BTRFS RAID1 array for data security) into 2 x 1TB btrfs RAID1 array, I keep having horrible mounting problems.
    There are two subvolumes on that array:
    @data
    @sys_backup
    fstab entries for them look like so:
    UUID=a0555768-a37f-4bd8-95e5-66ebd6a09c75 /mnt/Disk_D btrfs device=/dev/mapper/2TB-1TB_RAID1a,device=/dev/mapper/2TB-1TB_RAID1b,rw,noatime,compress=lzo,autodefrag,space_cache,nofail,commit=180,subvol=@data 0 0
    UUID=a0555768-a37f-4bd8-95e5-66ebd6a09c75 /mnt/arch_backup btrfs device=/dev/mapper/2TB-1TB_RAID1a,device=/dev/mapper/2TB-1TB_RAID1b,rw,noatime,compress=zlib,autodefrag,space_cache,nofail,x-systemd.automount,commit=250,subvol=@sys_backup 0 0
    Now, I rarely access @sys_backup, but I have never found it not being mounted. @data on the other hand mounts hardly ever.
    Most of the time, after boot, then I try to access /mnt/Disk_D mountpoint, it either
    A - turns out empty, and running “mount” command confirms there's nothing mounted there. Trying to mount it manually renders absolutely no effect. Not even an error message.
    or
    B – every program used to access that mountpoint (terminal, file manager, conky displaying free space or anything else) freezes and I have to kill it. Even tryping “/mnt/D” and pressing TAB for autocompletion crashes the terminal.
    I then need to reboot anywhere from 1 to 15 more times to get it mount properly.
    I had this problem since I started using RAID1 3 months ago. I had it on kernels 3.17, 3.18 and 3.19.
    Other things that made no difference include:
    ➤ adding/removing “device=” option
    ➤ adding/removing x-systemd.automount option
    ➤ changing UUIDs o /dev/mapper/... entries
    ➤ completing scrub on that partition
    ➤ running dry run btrfs check (no errors indicated)
    This is horrible. Is there any solution to it, or is it just the current state of BTRFS? And if it is the later, then what other than btrfs Raid1 solution could be implemented?
    Last edited by Lockheed (2015-02-01 07:27:35)

    firecat53 wrote:There's nothing in that linked article about doing a RAID 1 on a single disk.
    The whole discussion I linked is about doing a RAID 1 on a single disk. And the article linked from that discussion is only to prove the point of btrfs self-healing.
    firecat53 wrote:If you think about it, you are going to absolutely kill your read/write times by having the drive head trying to keep up a RAID 1 mirror on two partitions of the same drive.
    The read performance is unchanged. The write performance is 50% of the standard partition, but since it is a data drive, that is not a serious issue. Certainly less serious than data security.
    firecat53 wrote:My guess is that's why you are having issues.
    Maybe so, but I don't see a reason to assume it and even it is so, then I don't think those issues should be there.
    firecat53 wrote:You're going to be much better off buying two 1TB drives and using those in RAID 1!!  Or just a single 2TB btrfs drive....with a UPS and another drive as a backup drive.
    I can't do that because it is a laptop SSD with system + HDD with data.
    firecat53 wrote:I've been using btrfs on my laptop SSD and on my server for almost a year now with only one problem (corruption from a power loss to the server before I got the UPS).
    I have been using btrfs on my laptop SSD + HDD and on my RPi server since over a year and btrfs check was detecting minor issues every few months.
    I now run SSD (non-raid) + HDD (2 partitions in RAID1) on laptop, and SD (2 partitions in RAID1) + HDD (2 partitions in RAID1) on RPi (which - by the way, has no such problems with mounting neither SD nor HDD in Raid1) and I have not yet had any error with btrfs check.

  • Downloaded Firefox 4--computer asks over and over to restart, Firefox will not load, cannot remove it!!

    I received an update message after my system had installed the newest Firefox 3. something, approximately 4 days ago. (Today is 3/22, so about 3/17--18) The newest update , when started, took me to the Mozilla homepage, where It was suggested I download and comment on the new Firefox 4---I do not normally do this, but am so impressed with Firefox versus most others, that I did, now, I cannot open Firefox at all, the older version, 3. something, is not in my system, only 4, but my system/PC upon trying to open the new Firefox, prompts me over and over to restart the system, (which I have done 3 times) I figured I would then simply remove it, (Firefox 4) and either try it again, or re-install the newest 3. something---I cannot remove it, even using my anti-virus program to do so, it simply prompts over and over to restart, wether I try to open, remove, or access it in any way---I do not wish to use system restore, but that seems my only option, please help!!!

    I had the same problem and the solution is quite simple:
    - delete all data that has to do with Firefox and Mozilla
    - Reinstall the new version Firefox 4
    You have to make sure that everything is deleted and well yes you will lose your profile data but at least it works again without any problem.

  • How do I remove an old phone number from my macbook imessage. My apple ID does not show the number anymore but I cannot remove it from the imessage accounts. Its driving me mad !

    Can someone please help me to remove an iphone telephone number from my imessage application. I no longer have a phone which I registered on my apple ID as a second phone. I have been on my apple ID and it does not seem to be there but cannot remove it from imessage, which still has it as an option to connect to. I am concerned that someone else who inherite this old phone will see my messages if I accidentally enable it again. I have read and re-read various postings and tried all options given but no luck, the **** thing stays there.....

    Hey Chappers64!
    Here is an article that will help you with this issue:
    iOS: Deactivating iMessage
    http://support.apple.com/kb/ts5185
    If you have already tried these steps, you will want to utilize the information at the end of the article:
    If you can't deactivate iMessage after you perform the steps above or you can't access the iPhone, please contact Apple Support.
    Thanks for coming to the Apple Support Communities!
    Cheers,
    Braden

  • ITunes on my phone is no longer playing some songs, even those I have purchased with my phone.  They will play fine on my pc itunes.  I also cannot remove the audio books that are on my phone and add others and the audio books on my phone will not play.

    I am unable to play new songs purchased on my phone and some old songs on my ipod/iphone.  They all work fine in iTunes on my computer.  I also cannot remove the audiobooks from my phone when I sync even though I have unchecked said books, and I cannot play them either.

    C Mawle wrote:
    Thanks.  I have followed all the instructions as recommended and nothing has worked so it looks like the restore/update may have been interrupted - would loss of internet connection do this?
    Yes it would, possibly even brick it.
    Have successfully connected my ipod nano with iTunes so looks like the device driver is working.
    Can I use my ipod nano USB connector to check?
    It is not much help to you, since the device that you need still not recognized.
    Anyway looks like I may have to swallow the loss of data.  Have set-up a call for tomorrow with Apple support so will wait until after this before doing the factory restore!
    Good luck, but if you expect miracle from that call good luck again.

  • Error message: cannot remove older versions of apple software update

    I recently got a 30 gb ipod, and i cant install itunes 7. I originally tried installing it at first, and it said cannot remove older applications of Apple Software Update. So i installed itunes 4 to put music on my ipod. Then i tried again to install itunes 7 and i keep getting the same error message. Anyone else having this problem? Can anyone give me some suggestions please?

    I would first try and remove both iTunes and Quicktime prior to doing the install of iTunes. The following link will show you how to remove both programs. Make sure you do Step 16 as it is usually Quicktime that causes problems with the upgrade.
    http://docs.info.apple.com/article.html?artnum=93698
    If it will not let you remove the programs, you can try using the Windows Installer Cleanup Utility. The download is about 1/4 of the way down the page. Good luck.
    http://support.microsoft.com/default.aspx?scid=kb;en-us;290301

  • When I plug my ipod in I am able to add song to it but the tab that says "on this ipod" no longer shows up so I cannot remove things from my ipod or anything like that. How do I change this weird setting?

    When I plug my ipod in I am able to add song to it but the tab that says "on this ipod" no longer shows up so I cannot remove things from my ipod or anything like that. How do I change this weird setting? On other computers this shows up fine so it is clearly a problem with itunes and not my ipod.

  • ITunes will not install because it cannot remove an earlier version of Bonjour...HELP!!!!

    When I try to install iTunes 10 it cuts in about 3/4 of the way saying that "Cannot remove and earlier version of Bonjour"....PLEASE HELP!!!!!

    (1) Download the Windows Installer CleanUp utility installer file (msicuu2.exe) from the following Major Geeks page (use one of the links under the thingy on the Major Geeks page):
    http://majorgeeks.com/download.php?det=4459
    (2) Doubleclick the msicuu2.exe file and follow the prompts to install the Windows Installer CleanUp utility. (If you're on a Windows Vista or Windows 7 system and you get a Code 800A0046 error message when doubleclicking the msicuu2.exe file, try instead right-clicking on the msicuu2.exe file and selecting "Run as administrator".)
    (3) In your Start menu click All Programs and then click Windows Install Clean Up. The Windows Installer CleanUp utility window appears, listing software that is currently installed on your computer.
    (4) In the list of programs that appears in CleanUp, select any Bonjour entries and click "Remove", as per the following screenshot:
    (5) Quit out of CleanUp, restart the PC and try another install. Does it go through properly this time?

  • I have an Iphone 5s with an account icloud that isn't an iCloud id, why? I cannot remove and the mail that names id doesn't exist anymore; what can I do?

    I have an Iphone 5s with an account icloud that isn't an iCloud id, why? I cannot remove and the mail that names id doesn't exist anymore; what can I do?

    Welcome to the Apple community.
    If you are unable to remember your password, security questions, don’t have access to your rescue address or are unable to reset your password for whatever reason, your only option is to contact Apple ID Support, upon speaking to an operator you should explain that your problem is related to your Apple ID, this way you will not be charged for assistance, even if you don’t have an AppleCare plan.
    You will need to show patience with the procedure and be prepared to demonstrate without question that the account belongs to you. Don’t expect access to be restored immediately and if you aren’t the owner of the Apple ID registered to the device the account won’t be reset.
    This is answer is provided from my own database of boilerplate responses and the content was last reviewed and/or tested on: 2014/12/18

  • How do I remove the Certified Toolbar Search toolar??-- MALWARE -- tried everything I know -- cannot remove UIGGHH!!!

    I have tried ALL the malware removal tools I know of and still cannot remove this!

    hello, please install the search reset addon - it will revert the most common customziations those adware programs do in firefox back to the default: https://addons.mozilla.org/firefox/addon/searchreset/
    if your settings don't stick after a restart of the browser also go to firefox > help > troubleshooting information > profile folder - "show folder", then a new window will open up. in this window look out for a file named '''user.js''' (it might be used to overwrite your custom settings). in case it is present , delete or rename this file and restart firefox afterwards.
    [[Remove a toolbar that has taken over your Firefox search or home page]]
    [[How to fix preferences that won't save]]

  • I cannot remove the dialog box from my ipad. It says 'not enough storage' I click on settings and close, but still there. I need help. thx

    I cannot remove the dialog box from my ipad. it says 'not enough storage'. I click on settings and close but still there. How can i remove this message? Thnx

    Try this.
    Reboot the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider if it appears on the screen - let go of the buttons. Let the iPad start up.

  • I have just downloaded itunes. I cannot install QT as an older version is in place. Cannot remove the older version using CP. Any ideas?

    I have just downloaded itunes. I cannot install QT as an older version is in place. Cannot remove the older version using CP. Any ideas?

    Many thanks.
    Unfortunately, this sort of trouble has gotten more complicated to deal with ever since Microsoft pulled the Windows Installer CleanUp utility from their Download Center on June 25. First we have to find a copy of the utility.
    Let's try Googling. (Best not to use Bing, I think.) Look for a working download site for at least version 3.0 of the Windows Installer CleanUp utility. (The results from mydigitallife and Major Geeks are worth checking.)
    After downloading the utility installer file (msicuu2.exe), scan the file for malware, just in case. (I use the free version of Malwarebytes AntiMalware to do single-file scans for that.)
    If the file is clean, to install the utility, doubleclick the msicuu2.exe file you've downloaded.
    Now run the utility ("Start > All Programs > Windows Install Clean Up"). In the list of programs that appears in CleanUp, select any QuickTime entries and click "Remove".
    Quit out of CleanUp. Restart the PC, and try another iTunes install. Does it go through properly this time?
    Message was edited by: b noir

  • HT1925 cannot remove bonjour and itunes wont re-install because of it

    cannot remove bonjour program from old itunes when trying to update itunes by uninstalling and re-installing itunes 10.7

    (1) Download the Windows Installer CleanUp utility installer file (msicuu2.exe) from the following Major Geeks page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page):
    http://majorgeeks.com/download.php?det=4459
    (2) Doubleclick the msicuu2.exe file and follow the prompts to install the Windows Installer CleanUp utility. (If you're on a Windows Vista or Windows 7 system and you get a Code 800A0046 error message when doubleclicking the msicuu2.exe file, try instead right-clicking on the msicuu2.exe file and selecting "Run as administrator".)
    (3) In your Start menu click All Programs and then click Windows Install Clean Up. The Windows Installer CleanUp utility window appears, listing software that is currently installed on your computer.
    (4) In the list of programs that appears in CleanUp, select any Bonjour entries and click "Remove", as per the following screenshot:
    (5) Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time?

Maybe you are looking for

  • My work calendar is gone off of ical and icloud. how do i restore this from time machine

    last night i opened reminders and there was new list with the same name as my work calendar. i immediately deleted it as i don't want my reminders to show up on a shared work calendar. now this morning i find out by deleting this NEVER CREATED REMIND

  • Will not boot to external media?

    So i have a white early 2009 model (9400m) and i put the HDD from the previous refresh macbook in the new one. It booted to the OS fine, but id like to do a fresh install with the new macbook. the problem is; it wont boot to the install DVDs. i attem

  • I can't view youtube and google

    Suddenly I can't view youtube, google translate and map but if I used the internet of my school, I can view these 3 website what happen of my mac book?

  • Does SSD Trim work at disk or partition level?

    Trim is enabled on my MacBook Pro (About this Mac etc), but the HD has a Bootcamp partition on it. My belief is that the Bootcamp partition is not being trimmed...is this right? (Would love to be wrong) As I understand it Trim in Windows 7 can only b

  • Vaio SA bluetooth trouble

    I am having trouble getting my Vaio VPCSA3AFX to discover anything bluetooth. My other devices discover each other, but I can't seem to get my vaio to do the same. I am trying to connect by: Devices and printer > add device ... NO LUCK I have reinsta