Andrei Borzenkov wrote:
On Mon, Oct 12, 2015 at 9:02 AM, Per Jessen
wrote: Xen wrote:
I wonder how I can turn md4 into md0 and increment md0-md3, but I
mdadm --stop /dev/mdA mdadm --assemble /dev/mdB <previous units of mdA>
Assuming metadata 1.x. you probably want to add --update=name as well. But note that this actually only affects names under /dev/md/ directory.
That's not quite what I see - I have a test desktop (Leap 42) with an md0, md1 and md2. Before I tested the above, I had # l /dev/md total 0 drwxr-xr-x 2 root root 100 Oct 9 09:16 ./ drwxr-xr-x 19 root root 4080 Oct 9 09:17 ../ lrwxrwxrwx 1 root root 6 Oct 9 09:16 0 -> ../md0 lrwxrwxrwx 1 root root 6 Oct 9 09:16 1 -> ../md1 lrwxrwxrwx 1 root root 6 Oct 9 09:16 2 -> ../md2 And /dev/md0, /dev/md1, /dev/md2. I stopped md2, reassembled as md22. # l /dev/md* brw-rw---- 1 root disk 9, 0 Oct 9 09:16 /dev/md0 brw-rw---- 1 root disk 9, 1 Oct 9 09:16 /dev/md1 brw-rw---- 1 root disk 9, 22 Oct 12 08:59 /dev/md22 /dev/md: total 0 drwxr-xr-x 2 root root 80 Oct 12 07:56 ./ drwxr-xr-x 19 root root 4080 Oct 12 08:59 ../ lrwxrwxrwx 1 root root 6 Oct 9 09:16 0 -> ../md0 lrwxrwxrwx 1 root root 6 Oct 9 09:16 1 -> ../md1
Names under /dev (/dev/mdX) are auto-allocated at runtime;
I thought the naming was controlled by mdadm.conf?
it is quite possible to have /dev/md/md0 referring to /dev/md127. In general there is no way to get persistent /dev/mdX just like there is no way to get persistent /dev/sdX.
Except for one recent system with two raid controllers, I have always had persistent /dev/sdX names. Maybe by sheer luck, dunno. -- Per Jessen, Zürich (9.1°C) http://www.hostsuisse.com/ - virtual servers, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org