Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

So I'm trying to stop /dev/md127 on my Ubuntu 12.10 box. It was set up as RAID1, but I'm trying to move everything (well, rename) to md0. I read that renaming isn't possible, so I'm trying to remove the drives and put them into a new array as md0. I've been able to remove one drive (sdb) by using --fail and --remove, but sdc isn't responding, nor will md127 respond to --stop --force.

I've run fuser and lsof, and neither show anything using md127. I was running LVM on top of md127, but I've umounted the LVs and I've done "{lv,vg}change -an vg_Name".

I'm at a loss for what to try next. And for those who want to know why I want to rename/move, I'm a little OCD over things like that.

If it's relevant, here are the exact commands I've used, though the stop/fail/remove commands have been tried multiple times:

mdadm --stop --force /dev/md127 # this failed with the error message "mdadm: Cannot get exclusive access to /dev/md127:Perhaps a running process, mounted filesystem or active volume group?"
fuser /dev/md127 # no output
lsof /dev/md127 # no output
mdadm --fail /dev/md127 /dev/sdb # succeeded
mdadm --remove /dev/md127 /dev/sdb # succeeded
mdadm --fail /dev/md127 /dev/sdc # this failed - "device or resource busy"
mdadm --remove /dev/md127 /dev/sdc # this failed - "device or resource busy"
lvchange -an vg_Name
vgchange -an vg_Name
share|improve this question
What is printed when you run mount? – sparticvs Oct 29 '12 at 0:38

2 Answers 2

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. Once you've put your raid in /etc/mdadm.conf, just reboot and the raid should automatically reassable using the device number you've specified.

You can get the UUID of your raid cluster with the command 'blkid', in this case you want to look for the uuid of /dev/md127. Your configuration line would look something like

    ARRAY /dev/md0 level=raid1 num-devices=2 UUID=<from above command> devices=/dev/sdb,/dev/sdc
share|improve this answer

As i have not enough reputation i will post this as answer instead of a comment.

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|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.