/dev/md127 refuses to stop. No open files
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.
- Ensure there's nothing in the output of
sudo vgdisplay
. - Look in
/dev/mapper/
. Aside from thecontrol
file, there should be a Device Mapper device named after your volume group, e.g.VolGroupArray-name
. - Run
sudo dmsetup remove VolGroupArray-name
(substitutingVolGroupArray-name
with the name of the Device Mapper device). - You should now be able to run
sudo mdadm --stop /dev/md0
(or whatever the name of themdadm
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.
Related videos on Youtube
Hariprasad
Updated on September 18, 2022Comments
-
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 about 13 yearsCould you be more specific: which property of which object do you want to observe?
-
Hariprasad about 13 yearsHi 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 over 11 yearsWhat is printed when you run
mount
?
-
-
fukawi2 over 6 yearsAfter much Googling, this is what I needed. Thanks!
-
Gaia over 4 yearsYou sir, get the cake today. Спасибо!