All of lore.kernel.org
 help / color / mirror / Atom feed
* Prevent Autodetection
@ 2013-06-11  9:36 Richard Laager
       [not found] ` <CAFCYAscJyrFi0oTPn1v9Ey8LXgwHvt=pbWOe0SqMq2-WT5GGVA@mail.gmail.com>
  2013-06-11 10:34 ` Dmitrijs Ledkovs
  0 siblings, 2 replies; 4+ messages in thread
From: Richard Laager @ 2013-06-11  9:36 UTC (permalink / raw)
  To: linux-raid

[-- Attachment #1: Type: text/plain, Size: 1118 bytes --]

I have a virtualization host running on an MD root filesystem. I also
have two whole disks allocated to a virtualized guest which is doing an
MD RAID1. The host is seeing the array (i.e. it shows up
in /proc/mdstat). I'd like to prevent this, if for no other reason than
if there's a problem with that array, it prevents (or at least delays)
booting the host.

I've tried setting "AUTO +1.x homehost -all" "AUTO homehost -all" and
even "AUTO -all" in /etc/mdadm/mdadm.conf. I'm updating the initrd and
rebooting after each change. I've tried "msdos" as well as GPT labels on
the disks used by the guest. In every case I've tried, it's still
imported.

I'm running Ubuntu 12.04 "Precise" on both the host and the guest.

$ uname -a
Linux HOSTNAME 3.2.0-45-generic #70-Ubuntu SMP Wed May 29 20:12:06 UTC
2013 x86_64 x86_64 x86_64 GNU/Linux

$ mdadm --version
mdadm - v3.2.5 - 18th May 2012

Does this suggest the initrd scripts are broken on Ubuntu, am I doing
something wrong, or is it just not possible to prevent this
autodetection?

Thanks for any insight you can provide!

-- 
Richard

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Prevent Autodetection
       [not found] ` <CAFCYAscJyrFi0oTPn1v9Ey8LXgwHvt=pbWOe0SqMq2-WT5GGVA@mail.gmail.com>
@ 2013-06-11 10:33   ` Richard Laager
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Laager @ 2013-06-11 10:33 UTC (permalink / raw)
  To: Jeff Johnson; +Cc: linux-raid

[-- Attachment #1: Type: text/plain, Size: 304 bytes --]

On Tue, 2013-06-11 at 03:18 -0700, Jeff Johnson wrote:
> Did you try changing the disk partition types from 'fd' (Linux MD
> autodetect) to something like '83' (Linux)?

I did not with the msdos partition table, but I performed the equivalent
with GPT ("set 2 raid off" in parted).

-- 
Richard

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Prevent Autodetection
  2013-06-11  9:36 Prevent Autodetection Richard Laager
       [not found] ` <CAFCYAscJyrFi0oTPn1v9Ey8LXgwHvt=pbWOe0SqMq2-WT5GGVA@mail.gmail.com>
@ 2013-06-11 10:34 ` Dmitrijs Ledkovs
  2013-06-11 21:14   ` Richard Laager
  1 sibling, 1 reply; 4+ messages in thread
From: Dmitrijs Ledkovs @ 2013-06-11 10:34 UTC (permalink / raw)
  To: Richard Laager; +Cc: linux-raid

Hello,

On 11 June 2013 10:36, Richard Laager <rlaager@wiktel.com> wrote:
> I have a virtualization host running on an MD root filesystem. I also
> have two whole disks allocated to a virtualized guest which is doing an
> MD RAID1. The host is seeing the array (i.e. it shows up
> in /proc/mdstat). I'd like to prevent this, if for no other reason than
> if there's a problem with that array, it prevents (or at least delays)
> booting the host.
>
> I've tried setting "AUTO +1.x homehost -all" "AUTO homehost -all" and
> even "AUTO -all" in /etc/mdadm/mdadm.conf. I'm updating the initrd and
> rebooting after each change. I've tried "msdos" as well as GPT labels on
> the disks used by the guest. In every case I've tried, it's still
> imported.
>
> I'm running Ubuntu 12.04 "Precise" on both the host and the guest.
>
> $ uname -a
> Linux HOSTNAME 3.2.0-45-generic #70-Ubuntu SMP Wed May 29 20:12:06 UTC
> 2013 x86_64 x86_64 x86_64 GNU/Linux
>
> $ mdadm --version
> mdadm - v3.2.5 - 18th May 2012
>
> Does this suggest the initrd scripts are broken on Ubuntu, am I doing
> something wrong, or is it just not possible to prevent this
> autodetection?
>
> Thanks for any insight you can provide!

Please unpack initrd [1] and check mdamd.conf there, as the initramfs
hook may generate mdadm.conf from scratch. [2]
You may want to further adjust mdadm.conf via
/etc/initramfs-tools/hooks to make it the way you need it, and make
your changes persist across kernel/initrd upgrades.

[1] cd `mktemp -d` && gzip -dc /boot/initrd.img-`uname -r` | cpio -ivd
&& cat etc/mdadm/mdadm.conf
[2] see /usr/share/initramfs-tools/hooks/mdadm

Regards,

Dmitrijs.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Prevent Autodetection
  2013-06-11 10:34 ` Dmitrijs Ledkovs
@ 2013-06-11 21:14   ` Richard Laager
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Laager @ 2013-06-11 21:14 UTC (permalink / raw)
  To: linux-raid

I re-tested the exact same scenarios today in what I believe was the
same way, and now it's working as expected. I'm not sure why it didn't
work before.

Sorry for the noise!

-- 
Richard


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-06-11 21:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-11  9:36 Prevent Autodetection Richard Laager
     [not found] ` <CAFCYAscJyrFi0oTPn1v9Ey8LXgwHvt=pbWOe0SqMq2-WT5GGVA@mail.gmail.com>
2013-06-11 10:33   ` Richard Laager
2013-06-11 10:34 ` Dmitrijs Ledkovs
2013-06-11 21:14   ` Richard Laager

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.