[opensuse] scrambled mdraid setup
![](https://seccdn.libravatar.org/avatar/a836ff90f492078f494adcf0c6059fc6.jpg?s=120&d=mm&r=g)
I built a new RAID1 using 13.1 YaST2 partitioner. This is the slightly condensed output from mdadm --detail --scan, with appended the 2 sda/sdb partitions making up each device: ARRAY /dev/md/md-tmp metadata=1.0 name=srv10:md-tmp UUID=... # P08 ARRAY /dev/md/mdroot1 metadata=1.0 name=srv10:mdroot1 UUID=... # P09 ARRAY /dev/md/mdroot2 metadata=1.0 name=srv10:mdroot2 UUID=... # P10 ARRAY /dev/md/mdroot3 metadata=1.0 name=srv10:mdroot3 UUID=... # P11 ARRAY /dev/md/mdroot4 metadata=1.0 name=srv10:mdroot4 UUID=... # P12 ARRAY /dev/md/md-srv metadata=1.0 name=srv10:md-srv UUID=... # P13 ARRAY /dev/md/md-usrl metadata=1.0 name=srv10:md-usrl UUID=... # P14 ARRAY /dev/md/md-home metadata=1.0 name=srv10:md-home UUID=... # P15 ARRAY /dev/md/md-pub metadata=1.0 name=srv10:md-pub UUID=... # P16 ARRAY /dev/md/md-isos metadata=1.0 name=srv10:md-isos UUID=... # P17 In using yast to build each md device, I took partitions in order from front to back of disks, so P08 comes from sda8 & sdb8, P09 from sda9 & sdb9, etc. In creating each md device, yast inexplicably skipped over md0 through md9, and used a range from md118 through md127, and assigned most without regard to the order given it. It gave 118 to the first, then 119 to the second, but scrambled the rest in what looks like semi-randomized inverse order: md118 = sda8 + sdb8 label: 1md08tmp md119 = sda9 + sdb9 label: 1md09root1 md120 = sda17 + sdb17 label: 1md17isos md121 = sda16 + sdb16 label: 1md16pub md122 = sda15 + sdb15 label: 1md15home md123 = sda14 + sdb14 label: 1md14usrl md124 = sda13 + sdb13 label: 1md13srv md125 = sda12 + sdb12 label: 1md12root4 md126 = sda10 + sdb10 label: 1md10root2 md127 = sda11 + sdb11 label: 1md11root3 After completing the YaST2 build process, I installed 13.1 on 1md09root1. This is the (condensed) mdadm.conf installation created, with appended the 2 sda/sdb partitions making up each device: DEVICE containers partitions ARRAY /dev/md/srv10:md-home UUID=99e6... ARRAY /dev/md/srv10:md-isos UUID=637f... # P17 ARRAY /dev/md/srv10:md-pub UUID=f825... # P16 ARRAY /dev/md/srv10:md-srv UUID=99d9... # P13 ARRAY /dev/md/srv10:md-tmp UUID=4c61... # P08 ARRAY /dev/md/srv10:md-usrl UUID=919d... # P14 ARRAY /dev/md/srv10:mdroot1 UUID=d0ef... # P09 ARRAY /dev/md/srv10:mdroot2 UUID=c37e... # P10 ARRAY /dev/md/srv10:mdroot3 UUID=b094... # P11 ARRAY /dev/md/srv10:mdroot4 UUID=5577... # P12 I'd like to get back the orderly simplicity of md0-md9 11.2's YaST2 RAID1 installation created. I don't like that yast incorporated the temporary hostname used to install either, so would like to see those gone. In order to try and get where I hope to go, I looked at the mdadm.conf man page. It makes my brain swim in confusion. Anyone know if it tells me I can, or how? Is mdadm.conf even the right place to look? Can I simply edit away the hostname portion, sort the balance into partition order, and have the boot process assign device names in predictable sequence each time? I tried rewriting mdadm.conf, using the following form: ARRAY /dev/md1 UUID=d0ef38d5:1a18ccdd:3fc41f94:5b274f89 # P09 13.1 ARRAY /dev/md2 UUID=c37e5de4:f454e44b:afe26e50:d920a464 # P10 13.2 and also rebuilding initrds via chroot. I can get the md devs recognized as md0-9 by booting something else chrooting from to use that mdadm.conf, but can't seem to get any boot process (initrd) to find any md device either by volume label or by filesystem UUID, even by having the raid modules explicit in /etc/sysconfig/kernel, or in a 13.2 installation rsync'd over from normal partition to the #3 md made from sd[ab]10. WRT 13.2, http://bugzilla.opensuse.org/show_bug.cgi?id=905863 is complicating things further. And, from 13.2 emergency shell, reboot fails, so I have to use the power/reset button to escape. :~( -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
![](https://seccdn.libravatar.org/avatar/9435667f7160374bc34a8600b686aecd.jpg?s=120&d=mm&r=g)
On Sun, Feb 1, 2015 at 7:24 AM, Felix Miata <mrmazda@earthlink.net> wrote: ...
md118 = sda8 + sdb8 label: 1md08tmp md119 = sda9 + sdb9 label: 1md09root1
...
After completing the YaST2 build process, I installed 13.1 on 1md09root1. This is the (condensed) mdadm.conf installation created, with appended the 2 sda/sdb partitions making up each device:
DEVICE containers partitions ARRAY /dev/md/srv10:md-home UUID=99e6... ARRAY /dev/md/srv10:md-isos UUID=637f... # P17
...
I'd like to get back the orderly simplicity of md0-md9
Do not use meaningful names then. Use md0 - md9 as name (or possibly simply 0 - 9). X in mdX is device minor number which is allocated at runtime; if array name looks like number, mdadm is using it as minor number; otherwise it allocates one from upper half to reduce possibility of collision.
Can I simply edit away the hostname portion, sort the balance into partition order, and have the boot process assign device names in predictable sequence each time?
You already have predictable stable unique name that you yourself assigned. Why do you care what minor number device gets? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
![](https://seccdn.libravatar.org/avatar/a836ff90f492078f494adcf0c6059fc6.jpg?s=120&d=mm&r=g)
Andrei Borzenkov composed on 2015-02-01 09:13 (UTC+0300): Thank you for your response.
Felix Miata wrote: ...
md118 = sda8 + sdb8 label: 1md08tmp md119 = sda9 + sdb9 label: 1md09root1 ...
After completing the YaST2 build process, I installed 13.1 on 1md09root1. This is the (condensed) mdadm.conf installation created, with appended the 2 sda/sdb partitions making up each device:
DEVICE containers partitions ARRAY /dev/md/srv10:md-home UUID=99e6... ARRAY /dev/md/srv10:md-isos UUID=637f... # P17 ...
I'd like to get back the orderly simplicity of md0-md9
Do not use meaningful names then. Use md0 - md9 as name (or possibly simply 0 - 9). X in mdX is device minor number which is allocated at runtime; if array name looks like number, mdadm is using it as minor number; otherwise it allocates one from upper half to reduce possibility of collision.
It's already done. I've spent more than 14 hours trying to fix, booting, shutting down, switching the cables back to make more changes, booting again, etc. By the time I get from one end to the other of the mdadm.conf or mdadm man pages, I don't remember enough of what I read to do any good. When I started, I expected the ease YaST gave me in older releases, but the evolved metadata format apparently backfired on me.
Can I simply edit away the hostname portion, sort the balance into partition order, and have the boot process assign device names in predictable sequence each time?
You already have predictable stable unique name that you yourself assigned. Why do you care what minor number device gets?
The unique volume name on partitions being independent of logical order of partitions works for me. The randomization of minors does not. My memory is virtually opposite of eidetic, and growing worse. Logical order that I can recognize helps a lot. It looks like I'm at the point I need to wipe it all and start all over from zero, which means the many days (I bought the disks in November, 2 months after Evergreen support end was announced, then started planning, and got interrupted many times when trying to focus and progress) already invested is lost, with more to be invested, without knowing enough about what went wrong to avoid repeating the same mistake(s). 13.1's emergency shell is broken, so I can't get rdsosreport.txt from it, while 13.2's lsinitrd is broken, vexing my attempts to fix whatever's broken in or missing from the initrd. I tried modprobe raid1; mknod /dev/md2 b 9 2 (md2 is 9,2 on this system), but apparently I don't understand more than I know, with mount doing the bad fs type, yada message trying to mount using it. Dracut's rescue shell has no mdadm in it either. Maybe it would not be that bad yet, if only I could grasp and retain how to get what needs to be in an initrd into it. Having the md devices named as I please works fine, but only as long as I'm in no need to boot from any of them. It seems my transitory hostname could be involved, but attempts to use HOMEHOST <none>/<ignore> have been fruitless. Latest rdsosreport.txt from 13.2: http://fm.no-ip.com/Tmp/SUSE/rdsosreport132big41.txt Latest 13.2 initrd: http://fm.no-ip.com/Tmp/SUSE/initrd-3.16.7-7-desktop (5.4M) Latest 13.1 initrd (1st boot success, none since): http://fm.no-ip.com/Tmp/SUSE/initrd-3.11.6-4-desktop (6.5M) TIA for any help untangling this. -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
![](https://seccdn.libravatar.org/avatar/8df291265238395e793d45e1e572336d.jpg?s=120&d=mm&r=g)
Andrei Borzenkov composed on 2015-02-01 09:13 (UTC+0300):
Thank you for your response.
Felix Miata wrote: ...
md118 = sda8 + sdb8 label: 1md08tmp md119 = sda9 + sdb9 label: 1md09root1 ...
After completing the YaST2 build process, I installed 13.1 on 1md09root1. This is the (condensed) mdadm.conf installation created, with appended
On Sun, 1 Feb 2015 02:40:34 Felix Miata wrote: the
2 sda/sdb partitions making up each device:
DEVICE containers partitions ARRAY /dev/md/srv10:md-home UUID=99e6... ARRAY /dev/md/srv10:md-isos UUID=637f... # P17 ...
I'd like to get back the orderly simplicity of md0-md9
Stop the arrays and recreate them via the CLI, explicitly specifying the device numbers you want them to use. It really isn't all that hard to use mdadm. You won't even have to reformat the RAID arrays, although they may do a resync. You can control the order in which that happens too, by creating a degraded array with one device, then adding the second device to the array. I've never used Yast to set up raid. I prefer the control of the process provided by mdadm on the command line. The man page and the help command should give you all you need to do it. Regards, Rodney. -- ============================================================== Rodney Baker VK5ZTV rodney.baker@iinet.net.au ============================================================== -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
![](https://seccdn.libravatar.org/avatar/a836ff90f492078f494adcf0c6059fc6.jpg?s=120&d=mm&r=g)
Andrei Borzenkov composed on 2015-02-01 09:13 (UTC+0300):
Felix Miata wrote:
md118 = sda8 + sdb8 label: 1md08tmp md119 = sda9 + sdb9 label: 1md09root1
After completing the YaST2 build process, I installed 13.1 on 1md09root1. This is the (condensed) mdadm.conf installation created, with appended the 2 sda/sdb partitions making up each device:
DEVICE containers partitions ARRAY /dev/md/srv10:md-home UUID=99e6... ARRAY /dev/md/srv10:md-isos UUID=637f... # P17
I'd like to get back the orderly simplicity of md0-md9
Do not use meaningful names then. Use md0 - md9 as name (or possibly simply 0 - 9). X in mdX is device minor number which is allocated at runtime; if array name looks like number, mdadm is using it as minor number; otherwise it allocates one from upper half to reduce possibility of collision.
Too late for that for this particular HD pair, but I have managed to reduce my confusion by including /dev/mdX metadata=1.0 following ARRAY on each device line in /etc/mdadm.conf, then rebooting the prior kernel, uninstalling the newest kernel, and reinstalling the newest kernel, for the 13.2 and 13.3 installations. For 13.1 I've been a bit less daring, so have only changed mdadm.conf, getting the mdX names I expect for all except the / partition, which in every installation to start with was md127, and remains in 13.1, probably only until the next update kernel arrives. Is there some what to provide mdadm.conf to the installer, getting the good names from the outset instead of via the convolution I went through?
Can I simply edit away the hostname portion, sort the balance into partition order, and have the boot process assign device names in predictable sequence each time?
You already have predictable stable unique name that you yourself assigned. Why do you care what minor number device gets?
In addition to what I wrote in reply previously, it matters in what shows up in fdisk -l, df and mount output, which means I always have to somehow convert from md1## to something else in order to know what I'm looking at in their output. -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
![](https://seccdn.libravatar.org/avatar/9435667f7160374bc34a8600b686aecd.jpg?s=120&d=mm&r=g)
В Tue, 10 Feb 2015 03:24:28 -0500 Felix Miata <mrmazda@earthlink.net> пишет:
Andrei Borzenkov composed on 2015-02-01 09:13 (UTC+0300):
Felix Miata wrote:
md118 = sda8 + sdb8 label: 1md08tmp md119 = sda9 + sdb9 label: 1md09root1
After completing the YaST2 build process, I installed 13.1 on 1md09root1. This is the (condensed) mdadm.conf installation created, with appended the 2 sda/sdb partitions making up each device:
DEVICE containers partitions ARRAY /dev/md/srv10:md-home UUID=99e6... ARRAY /dev/md/srv10:md-isos UUID=637f... # P17
I'd like to get back the orderly simplicity of md0-md9
Do not use meaningful names then. Use md0 - md9 as name (or possibly simply 0 - 9). X in mdX is device minor number which is allocated at runtime; if array name looks like number, mdadm is using it as minor number; otherwise it allocates one from upper half to reduce possibility of collision.
Too late for that for this particular HD pair, but I have managed to reduce my confusion by including
/dev/mdX metadata=1.0
following ARRAY on each device line in /etc/mdadm.conf, then rebooting the prior kernel, uninstalling the newest kernel, and reinstalling the newest kernel, for the 13.2 and 13.3 installations. For 13.1 I've been a bit less daring, so have only changed mdadm.conf, getting the mdX names I expect for all except the / partition, which in every installation to start with was md127, and remains in 13.1, probably only until the next update kernel arrives.
Is there some what to provide mdadm.conf to the installer, getting the good names from the outset instead of via the convolution I went through?
Not that I am aware of. What is wrong with naming arrays "0", "1" etc? I just verified that you get /dev/md0, /dev/md1, ... -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
![](https://seccdn.libravatar.org/avatar/a836ff90f492078f494adcf0c6059fc6.jpg?s=120&d=mm&r=g)
Andrei Borzenkov composed on 2015-02-10 21:09 (UTC+0300):
Felix Miata composed:
Is there some what to provide mdadm.conf to the installer, getting the good names from the outset instead of via the convolution I went through?
Not that I am aware of. What is wrong with naming arrays "0", "1" etc? I just verified that you get /dev/md0, /dev/md1, ...
Nothing wrong except WRT my memory. It's simple. Then again, I'll more likely be doing in the future as Rodney suggested, building from cmdline with mdadm instead of yast. -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (3)
-
Andrei Borzenkov
-
Felix Miata
-
Rodney Baker