/dev/md127 refuses to stop. No open files

99

Solution 1

If all you're trying to do is change the device number, add the array to your config file with the device number of our choice using the following command:

    echo "ARRAY /dev/md0 level=raid1 num-devices=2 UUID=$(blkid -s UUID -o value /dev/md127) devices=/dev/sdb,/dev/sdc" >> /etc/mdadm.conf

Once you've put your raid in /etc/mdadm.conf, just reboot and the raid should automatically reassemble using the device number you've specified. This has the added benefit of ensuring that your raid will be built with the same device name at every boot.

Solution 2

If you're using LVM on top of mdadm, sometimes LVM will not delete the Device Mapper devices when deactivating the volume group. You can delete it manually.

  1. Ensure there's nothing in the output of sudo vgdisplay.
  2. Look in /dev/mapper/. Aside from the control file, there should be a Device Mapper device named after your volume group, e.g. VolGroupArray-name.
  3. Run sudo dmsetup remove VolGroupArray-name (substituting VolGroupArray-name with the name of the Device Mapper device).
  4. You should now be able to run sudo mdadm --stop /dev/md0 (or whatever the name of the mdadm device is).

Solution 3

Can you please paste the output of the following commands?

mdadm -D /dev/md127

mdadm -E /dev/sdc

cat /proc/mdstat

Please note that it is possible to "rename" the raid. Renaming in this case is depending on the superblock version your raid is using.

To rename a superblock 0.90 raid you should use the following command: mdadm -A /dev/md0 -U super-minor -u <uuid of the array>

To rename a superblock 1.X raid you should use the following command: mdadm -A /dev/md0 -U name -N <new name> -u <uuid of the array>

As i didn't understand it, can you please explain why you want to rename it? The node name md127 is assembled by your initramfs scripts, as these are starting from md127. As far as i know you can change the preferred minor number, but the initramfs scripts will regardless of the minor number start with assembling the node 127.

Share:
99

Related videos on Youtube

Hariprasad
Author by

Hariprasad

Updated on September 18, 2022

Comments

  • Hariprasad
    Hariprasad over 1 year

    Hello i am very new to the iPad programing.Can any one explain me how to use key value observers in iPad.i need to check if a particular variable value is changed and based on that i trigger one method.One approach is to use NSTimer to continuously check the variable value but i know this can be done better by using key value observers so please help me understand key value observers concept.Thanks in advance

    • Jilouc
      Jilouc about 13 years
      Could you be more specific: which property of which object do you want to observe?
    • Hariprasad
      Hariprasad about 13 years
      Hi Jilouc. I have one NSNumber object whose value is changed several times in different methods of the class i want to call one method each time the value of the NSNumber is changed.
    • Admin
      Admin over 11 years
      What is printed when you run mount?
  • fukawi2
    fukawi2 over 6 years
    After much Googling, this is what I needed. Thanks!
  • Gaia
    Gaia over 4 years
    You sir, get the cake today. Спасибо!