[opensuse] cannot use YaST2 to create degraded RAID1
Thread https://lists.opensuse.org/yast-devel/2016-04/msg00019.html explains my situation (I hope). YaST2 simply does not support creating in a degraded state. As a consequence, apparently I must use mdadm. Its man page is a mile long. I'm having a hard time determining what is required to do what I wish done, prepare a disk with 10 degraded md devices, in advance on one machine, for subsequent 42.1 and TW installation in another machine, minimizing downtime in the target machine. My proposed creation commands are as follows: mdadm -Cv /dev/md0 -e 1.2 --homehost=fi965 -l 1 -N r130tmp -n /dev/sdb8 missing mdadm --create /dev/md1 --metadata=1.2 --homehost=fi965 --level=1 --name=r131root --raid-devices=/dev/sdb9 missing mdadm --create /dev/md2 --metadata=1.2 --homehost=fi965 --level=1 --name=r132root --raid-devices=/dev/sdb10 missing mdadm --create /dev/md3 --metadata=1.2 --homehost=fi965 --level=1 --name=r133root --raid-devices=/dev/sdb11 missing mdadm --create /dev/md4 --metadata=1.2 --homehost=fi965 --level=1 --name=r134root --raid-devices=/dev/sdb12 missing mdadm --create /dev/md5 --metadata=1.2 --homehost=fi965 --level=1 --name=r135srv --raid-devices=/dev/sdb13 missing mdadm --create /dev/md6 --metadata=1.2 --homehost=fi965 --level=1 --name=r136ulcl --raid-devices=/dev/sdb14 missing mdadm --create /dev/md7 --metadata=1.2 --homehost=fi965 --level=1 --name=r137home --raid-devices=/dev/sdb15 missing mdadm --create /dev/md8 --metadata=1.2 --homehost=fi965 --level=1 --name=r138pub --raid-devices=/dev/sdb16 missing mdadm --create /dev/md9 --metadata=1.2 --homehost=fi965 --level=1 --name=r139isos --raid-devices=/dev/sdb17 missing I find the mdadm man page entirely unclear whether I should want the partitions to be of type 0xDA or 0xFD. Comments and suggestions welcome. -- "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
21.04.2016 03:04, Felix Miata пишет:
I find the mdadm man page entirely unclear whether I should want the partitions to be of type 0xDA or 0xFD.
It does not matter. Partitions types were used only by in-kernel auto-detection code which nobody is using today (I am not sure even whether it is still present). -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Felix Miata wrote:
As a consequence, apparently I must use mdadm. Its man page is a mile long. I'm having a hard time determining what is required to do what I wish done, prepare a disk with 10 degraded md devices, in advance on one machine, for subsequent 42.1 and TW installation in another machine, minimizing downtime in the target machine. My proposed creation commands are as follows:
mdadm -Cv /dev/md0 -e 1.2 --homehost=fi965 -l 1 -N r130tmp -n /dev/sdb8 missing mdadm --create /dev/md1 --metadata=1.2 --homehost=fi965 --level=1 --name=r131root --raid-devices=/dev/sdb9 missing mdadm --create /dev/md2 --metadata=1.2 --homehost=fi965 --level=1 --name=r132root --raid-devices=/dev/sdb10 missing mdadm --create /dev/md3 --metadata=1.2 --homehost=fi965 --level=1 --name=r133root --raid-devices=/dev/sdb11 missing [snip]
Looks good, I've never bothered with --homehost and --name, but they're probably useful. I would probably shorten it: mdadm --create /dev/md3 --metadata=1.2 --homehost=fi965 --name=r133root -l1 -n2 /dev/sdb11 missing -- Per Jessen, Zürich (11.4°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
On Wed, Apr 20, 2016 at 6:04 PM, Felix Miata <mrmazda@earthlink.net> wrote:
Thread https://lists.opensuse.org/yast-devel/2016-04/msg00019.html explains my situation (I hope). YaST2 simply does not support creating in a degraded state.
As a consequence, apparently I must use mdadm. Its man page is a mile long. I'm having a hard time determining what is required to do what I wish done, prepare a disk with 10 degraded md devices, in advance on one machine, for subsequent 42.1 and TW installation in another machine, minimizing downtime in the target machine. My proposed creation commands are as follows:
mdadm -Cv /dev/md0 -e 1.2 --homehost=fi965 -l 1 -N r130tmp -n /dev/sdb8 missing mdadm --create /dev/md1 --metadata=1.2 --homehost=fi965 --level=1 --name=r131root --raid-devices=/dev/sdb9 missing mdadm --create /dev/md2 --metadata=1.2 --homehost=fi965 --level=1 --name=r132root --raid-devices=/dev/sdb10 missing mdadm --create /dev/md3 --metadata=1.2 --homehost=fi965 --level=1 --name=r133root --raid-devices=/dev/sdb11 missing mdadm --create /dev/md4 --metadata=1.2 --homehost=fi965 --level=1 --name=r134root --raid-devices=/dev/sdb12 missing mdadm --create /dev/md5 --metadata=1.2 --homehost=fi965 --level=1 --name=r135srv --raid-devices=/dev/sdb13 missing mdadm --create /dev/md6 --metadata=1.2 --homehost=fi965 --level=1 --name=r136ulcl --raid-devices=/dev/sdb14 missing mdadm --create /dev/md7 --metadata=1.2 --homehost=fi965 --level=1 --name=r137home --raid-devices=/dev/sdb15 missing mdadm --create /dev/md8 --metadata=1.2 --homehost=fi965 --level=1 --name=r138pub --raid-devices=/dev/sdb16 missing mdadm --create /dev/md9 --metadata=1.2 --homehost=fi965 --level=1 --name=r139isos --raid-devices=/dev/sdb17 missing
I find the mdadm man page entirely unclear whether I should want the partitions to be of type 0xDA or 0xFD.
Strictly speaking is should be 0xDA for mdadm metadata 1.x and 0xFD for mdadm metadata 0.9. The former uses detection/assembly in the initramfs and the latter uses kernel autodetect which is deprecated but because no regressions are allowed, it stays in the kernel as is I guess forever. The problem is I think only fdisk supports 0xDA, and GNU parted doesn't support it nor does it support arbitrary OStype codes. So in practice it seems to be 0xFD and no one dies, but there are probably edge cases where it could cause trouble. Mainly comment 5. https://bugzilla.redhat.com/show_bug.cgi?id=1118065 Chris Murphy -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Thu, Apr 21, 2016 at 10:00 PM, Chris Murphy <lists@colorremedies.com> wrote:
On Wed, Apr 20, 2016 at 6:04 PM, Felix Miata <mrmazda@earthlink.net> wrote:
Thread https://lists.opensuse.org/yast-devel/2016-04/msg00019.html explains my situation (I hope). YaST2 simply does not support creating in a degraded state.
As a consequence, apparently I must use mdadm. Its man page is a mile long. I'm having a hard time determining what is required to do what I wish done, prepare a disk with 10 degraded md devices, in advance on one machine, for subsequent 42.1 and TW installation in another machine, minimizing downtime in the target machine. My proposed creation commands are as follows:
mdadm -Cv /dev/md0 -e 1.2 --homehost=fi965 -l 1 -N r130tmp -n /dev/sdb8 missing mdadm --create /dev/md1 --metadata=1.2 --homehost=fi965 --level=1 --name=r131root --raid-devices=/dev/sdb9 missing mdadm --create /dev/md2 --metadata=1.2 --homehost=fi965 --level=1 --name=r132root --raid-devices=/dev/sdb10 missing mdadm --create /dev/md3 --metadata=1.2 --homehost=fi965 --level=1 --name=r133root --raid-devices=/dev/sdb11 missing mdadm --create /dev/md4 --metadata=1.2 --homehost=fi965 --level=1 --name=r134root --raid-devices=/dev/sdb12 missing mdadm --create /dev/md5 --metadata=1.2 --homehost=fi965 --level=1 --name=r135srv --raid-devices=/dev/sdb13 missing mdadm --create /dev/md6 --metadata=1.2 --homehost=fi965 --level=1 --name=r136ulcl --raid-devices=/dev/sdb14 missing mdadm --create /dev/md7 --metadata=1.2 --homehost=fi965 --level=1 --name=r137home --raid-devices=/dev/sdb15 missing mdadm --create /dev/md8 --metadata=1.2 --homehost=fi965 --level=1 --name=r138pub --raid-devices=/dev/sdb16 missing mdadm --create /dev/md9 --metadata=1.2 --homehost=fi965 --level=1 --name=r139isos --raid-devices=/dev/sdb17 missing
I find the mdadm man page entirely unclear whether I should want the partitions to be of type 0xDA or 0xFD.
Strictly speaking is should be 0xDA for mdadm metadata 1.x and 0xFD for mdadm metadata 0.9. The former uses detection/assembly in the initramfs and the latter uses kernel autodetect which is deprecated but because no regressions are allowed, it stays in the kernel as is I guess forever. The problem is I think only fdisk supports 0xDA, and GNU parted doesn't support it nor does it support arbitrary OStype codes.
So in practice it seems to be 0xFD and no one dies, but there are probably edge cases where it could cause trouble. Mainly comment 5. https://bugzilla.redhat.com/show_bug.cgi?id=1118065
Due in large part to this kind of nonsense, we in effect have an artificial shortage of GUIDs if parted is the partition tool. I'd rather like to see parted just pass silently into the night. http://lists.alioth.debian.org/pipermail/parted-devel/2014-November/004593.h... -- Chris Murphy -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Thu, Apr 21, 2016 at 10:09 PM, Chris Murphy <lists@colorremedies.com> wrote:
On Thu, Apr 21, 2016 at 10:00 PM, Chris Murphy <lists@colorremedies.com> wrote:
On Wed, Apr 20, 2016 at 6:04 PM, Felix Miata <mrmazda@earthlink.net> wrote:
Thread https://lists.opensuse.org/yast-devel/2016-04/msg00019.html explains my situation (I hope). YaST2 simply does not support creating in a degraded state.
As a consequence, apparently I must use mdadm. Its man page is a mile long. I'm having a hard time determining what is required to do what I wish done, prepare a disk with 10 degraded md devices, in advance on one machine, for subsequent 42.1 and TW installation in another machine, minimizing downtime in the target machine. My proposed creation commands are as follows:
mdadm -Cv /dev/md0 -e 1.2 --homehost=fi965 -l 1 -N r130tmp -n /dev/sdb8 missing mdadm --create /dev/md1 --metadata=1.2 --homehost=fi965 --level=1 --name=r131root --raid-devices=/dev/sdb9 missing mdadm --create /dev/md2 --metadata=1.2 --homehost=fi965 --level=1 --name=r132root --raid-devices=/dev/sdb10 missing mdadm --create /dev/md3 --metadata=1.2 --homehost=fi965 --level=1 --name=r133root --raid-devices=/dev/sdb11 missing mdadm --create /dev/md4 --metadata=1.2 --homehost=fi965 --level=1 --name=r134root --raid-devices=/dev/sdb12 missing mdadm --create /dev/md5 --metadata=1.2 --homehost=fi965 --level=1 --name=r135srv --raid-devices=/dev/sdb13 missing mdadm --create /dev/md6 --metadata=1.2 --homehost=fi965 --level=1 --name=r136ulcl --raid-devices=/dev/sdb14 missing mdadm --create /dev/md7 --metadata=1.2 --homehost=fi965 --level=1 --name=r137home --raid-devices=/dev/sdb15 missing mdadm --create /dev/md8 --metadata=1.2 --homehost=fi965 --level=1 --name=r138pub --raid-devices=/dev/sdb16 missing mdadm --create /dev/md9 --metadata=1.2 --homehost=fi965 --level=1 --name=r139isos --raid-devices=/dev/sdb17 missing
I find the mdadm man page entirely unclear whether I should want the partitions to be of type 0xDA or 0xFD.
Strictly speaking is should be 0xDA for mdadm metadata 1.x and 0xFD for mdadm metadata 0.9. The former uses detection/assembly in the initramfs and the latter uses kernel autodetect which is deprecated but because no regressions are allowed, it stays in the kernel as is I guess forever. The problem is I think only fdisk supports 0xDA, and GNU parted doesn't support it nor does it support arbitrary OStype codes.
So in practice it seems to be 0xFD and no one dies, but there are probably edge cases where it could cause trouble. Mainly comment 5. https://bugzilla.redhat.com/show_bug.cgi?id=1118065
Due in large part to this kind of nonsense, we in effect have an artificial shortage of GUIDs if parted is the partition tool. I'd rather like to see parted just pass silently into the night.
http://lists.alioth.debian.org/pipermail/parted-devel/2014-November/004593.h...
And on 0xDA vs 0xFD in parted, here's the thread on getting it added to parted and it's basically a no because nothing really cares about it so why add it? http://lists.alioth.debian.org/pipermail/parted-devel/2015-October/004742.ht... In the parted world, types aren't reliable and aren't used anyway, and there's no point in trying make any of it useful. So just reuse a previously existing type helping to ensure that types aren't reliable. Brilliant circular logic! -- Chris Murphy -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Chris Murphy composed on 2016-04-21 22:31 (UTC-0600):
Felix Miata wrote:
Thread https://lists.opensuse.org/yast-devel/2016-04/msg00019.html explains my situation (I hope). YaST2 simply does not support creating in a degraded state.
As a consequence, apparently I must use mdadm. Its man page is a mile long. I'm having a hard time determining what is required to do what I wish done, prepare a disk with 10 degraded md devices, in advance on one machine, for subsequent 42.1 and TW installation in another machine, minimizing downtime in the target machine. My proposed creation commands are as follows:
mdadm -Cv /dev/md0 -e 1.2 --homehost=fi965 -l 1 -N r130tmp -n /dev/sdb8 missing ... I find the mdadm man page entirely unclear whether I should want the partitions to be of type 0xDA or 0xFD.
Strictly speaking is should be 0xDA for mdadm metadata 1.x and 0xFD for mdadm metadata 0.9. The former uses detection/assembly in the initramfs and the latter uses kernel autodetect which is deprecated but because no regressions are allowed, it stays in the kernel as is I guess forever. The problem is I think only fdisk supports 0xDA, and GNU parted doesn't support it nor does it support arbitrary OStype codes.
So in practice it seems to be 0xFD and no one dies, but there are probably edge cases where it could cause trouble. Mainly comment 5. https://bugzilla.redhat.com/show_bug.cgi?id=1118065
Due in large part to this kind of nonsense, we in effect have an artificial shortage of GUIDs if parted is the partition tool. I'd rather like to see parted just pass silently into the night.
http://lists.alioth.debian.org/pipermail/parted-devel/2014-November/004593.h...
And on 0xDA vs 0xFD in parted, here's the thread on getting it added to parted and it's basically a no because nothing really cares about it so why add it? http://lists.alioth.debian.org/pipermail/parted-devel/2015-October/004742.ht...
In the parted world, types aren't reliable and aren't used anyway, and there's no point in trying make any of it useful. So just reuse a previously existing type helping to ensure that types aren't reliable. Brilliant circular logic!
Partitioner support for 0xDA is a non-issue for me, as the only tool I use to write tables rarely even gets mention in Linux circles. It allows to set any type regardless of validity. So is there any compelling reason with RAID1 not to use type 0xFD, and instead of the above, create using the following?: mdadm -Cv /dev/md9 -e 0.90 --homehost=fi965 -l 1 -n /dev/sdb17 missing Is there material advantage in 1.2 metadata other than offering arbitrary naming? It seems to me possibly advantageous to use 0.90 unless an arbitrary name is desired. -- "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
On Fri, Apr 22, 2016 at 9:34 AM, Felix Miata <mrmazda@earthlink.net> wrote:
So is there any compelling reason with RAID1 not to use type 0xFD, and instead of the above, create using the following?:
mdadm -Cv /dev/md9 -e 0.90 --homehost=fi965 -l 1 -n /dev/sdb17 missing
There is no home host in 0.90 metadata (it does not have place to store it).
Is there material advantage in 1.2 metadata other than offering arbitrary naming? It seems to me possibly advantageous to use 0.90 unless an arbitrary name is desired.
Why do you bother in the first place? Use whatever is default in mdadm. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Andrei Borzenkov composed on 2016-04-22 09:58 (UTC+0300):
Felix Miata wrote:
So is there any compelling reason with RAID1 not to use type 0xFD, and instead of the above, create using the following?:
mdadm -Cv /dev/md9 -e 0.90 --homehost=fi965 -l 1 -n /dev/sdb17 missing
There is no home host in 0.90 metadata (it does not have place to store it).
That inconsistent with my understanding of the homehost section of the man page, which indicates it's simply stored differently with 0.90.
Is there material advantage in 1.2 metadata other than offering arbitrary naming? It seems to me possibly advantageous to use 0.90 unless an arbitrary name is desired.
Why do you bother in the first place? Use whatever is default in mdadm.
In part, because when I look at the result in the future I'm unlikely to have any idea how to figure out what the defaults were at create time. It won't be in the YaST2 logs, but how it got to be will be found in .bash_history at least for a while. -- "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
On Fri, 22 Apr 2016, Felix Miata wrote:
In part, because when I look at the result in the future I'm unlikely to have any idea how to figure out what the defaults were at create time. It won't be in the YaST2 logs, but how it got to be will be found in .bash_history at least for a while.
How about script -a -c "my super mdadm command" /var/log/mdadm.log Let the log file do your remembering. Roger -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Roger Price composed on 2016-04-22 10:23 (UTC+0200):
Felix Miata wrote:
In part, because when I look at the result in the future I'm unlikely to have any idea how to figure out what the defaults were at create time. It won't be in the YaST2 logs, but how it got to be will be found in .bash_history at least for a while.
How about script -a -c "my super mdadm command" /var/log/mdadm.log
Let the log file do your remembering. Roger
Nice - and curious that I've been using Linux over a decade and never ran across the script command before. -- "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
On Fri, Apr 22, 2016 at 10:37 PM, Felix Miata <mrmazda@earthlink.net> wrote:
Nice - and curious that I've been using Linux over a decade and never ran across the script command before.
That is a shocker. script is a great tool for people doing CLE work. But what it captures isn't always clean, so I tend to do things the other way around. If I want to document steps taken, I write a small bash script to do the work. Then I do the test / fix loop until it does what I want. Then I save the script as documentation of that days activity. For what I do, documentation of my steps is a core part of my process. Greg -- Greg Freemyer www.IntelligentAvatar.net -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Felix Miata wrote:
Is there material advantage in 1.2 metadata other than offering arbitrary naming? It seems to me possibly advantageous to use 0.90 unless an arbitrary name is desired.
I leave it to mdadm to chose for me, except when I want to boot from RAID1 with lilo. (which requires 0.90). -- Per Jessen, Zürich (14.1°C) http://www.dns24.ch/ - your free DNS host, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Fri, Apr 22, 2016 at 10:28 AM, Per Jessen <per@computer.org> wrote:
Felix Miata wrote:
Is there material advantage in 1.2 metadata other than offering arbitrary naming? It seems to me possibly advantageous to use 0.90 unless an arbitrary name is desired.
I leave it to mdadm to chose for me, except when I want to boot from RAID1 with lilo. (which requires 0.90).
1.0 has metadata at the end as well. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (6)
-
Andrei Borzenkov
-
Chris Murphy
-
Felix Miata
-
Greg Freemyer
-
Per Jessen
-
Roger Price