Bug#644389: suspect non-working mdadm.conf created during install

2011-10-06 Thread martin f krafft
also sprach pille pille+debian+bug-rep...@struction.de [2011.10.05.2133 
+0200]:
 i completely understand what happens as i'm able to boot the
 system by manually assembling the array and fixing the problem,
 but how the wrong hostname slips into the initramfs should be
 investigated by debians devs.

It's not the wrong hostname, it is what was current when the array
was created. At least we should make sure this is the case. Could
you investigate what the 'hostname' command outputs on the d-i
shell, just before creating an array in partman during the install?
Does it output hetzner, or does it print the one that you set
previously during the same install?

Have a look at the mdadm manpage, homehost is the name of this
feature.

There are three ways forward, really:

  1. figure out a way by which the initramfs is updated when the
 hostname is changed;

  2. make sure the admin knows that changing the hostname requires
 telling mdadm;

  3. provide a debconf setting to disable the homehost feature
 (setting it to ignore).

-- 
 .''`.   martin f. krafft madduck@d.o  Related projects:
: :'  :  proud Debian developer   http://debiansystem.info
`. `'`   http://people.debian.org/~madduckhttp://vcs-pkg.org
  `-  Debian - when you have better things to do than fixing systems


digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/sig-policy/999bbcc4/current)


Bug#644389: suspect non-working mdadm.conf created during install

2011-10-06 Thread pille

It's not the wrong hostname, it is what was current when the array
was created.


yes, but i think it's the hostname when the initramfs was created for 
the installer.



At least we should make sure this is the case. Could
you investigate what the 'hostname' command outputs on the d-i
shell, just before creating an array in partman during the install?


i checked and it behaves like expected:
it reports '(none)' up to the point where i set it to 'file'. afterwards 
it reports 'file'.


i installed _without_ RAID and used guided partitioning this time.
after the system is installed i took a look into /target and
there was the hetzner-mdadm.conf

more evidence for the d-i deploys standard initramfs with 
broken/suspect/unupdated mdadm.conf:


1) initramfs has an old timestamp (2011-08-27)
   and contains a comment that it was autogenerated that day
   sha1sum is: a8f016e70843f108ae05ab0ef874eaad231005c8 
initrd.img-2.6.32-5-amd64


2) last time i configured two arrays, but mdadm.conf contains three.

my problem is, that i cannot find it on the install medium (or a file 
big enough to hold it, tat actually contains it).



There are three ways forward, really:

   1. figure out a way by which the initramfs is updated when the
  hostname is changed;



there's only one way and it's updating the initramfs when nessessary 
(RAID config) and remove it when not needed.



   2. make sure the admin knows that changing the hostname requires
  telling mdadm;

   3. provide a debconf setting to disable the homehost feature
  (setting it toignore).


the UUIDs are different, that's why the array don't get assembled.

since you should now be able to reproduce (even without RAID) i'll trash 
those VM images.


cheers
  pille
DEVICE partitions
HOMEHOST system
ARRAY /dev/md/0 metadata=1.2 UUID=f6de5584:d9dbce39:090f16ff:f795e54c 
name=hetzner:0
ARRAY /dev/md/1 metadata=1.2 UUID=0e065fee:15dea43e:f4ed7183:70d519bd 
name=hetzner:1
ARRAY /dev/md/2 metadata=1.2 UUID=ce4dd5a8:d8c2fdf4:4612713e:06047473 
name=hetzner:2
# mdadm.conf
#
# Please refer to mdadm.conf(5) for information about this file.
#

# by default, scan all partitions (/proc/partitions) for MD superblocks.
# alternatively, specify devices to scan, using wildcards if desired.
DEVICE partitions

# auto-create devices with Debian standard permissions
CREATE owner=root group=disk mode=0660 auto=yes

# automatically tag new arrays as belonging to the local system
HOMEHOST system

# instruct the monitoring daemon where to send mail alerts
MAILADDR root

# definitions of existing MD arrays
ARRAY /dev/md/0 metadata=1.2 UUID=f6de5584:d9dbce39:090f16ff:f795e54c 
name=hetzner:0
ARRAY /dev/md/1 metadata=1.2 UUID=0e065fee:15dea43e:f4ed7183:70d519bd 
name=hetzner:1
ARRAY /dev/md/2 metadata=1.2 UUID=ce4dd5a8:d8c2fdf4:4612713e:06047473 
name=hetzner:2

# This file was auto-generated on Sat, 27 Aug 2011 19:16:33 +
# by mkconf 3.1.4-1+8efb9d1


Bug#644389: suspect non-working mdadm.conf created during install

2011-10-05 Thread pille
Package: mdadm
Version: 3.1.4-1+8efb9d1
Severity: critical
Tags: d-i
Justification: breaks the whole system

during install of squeeze i partitioned my disks and setup different MD-RAID 
devices using the partition tool.
the corresponding /dev/mdX devices were created properly and i went on creating 
LVM ontop of it and successfully installed the system.

first boot into my new system failed because the root FS could not be found, 
leaving me in a initramfs-shell.
i assembled my RAID devices by hand and compared /etc/mdadm/mdadm.conf (inside 
initramfs) with 'mdadm --examine --scan', which listed completely different 
UUIDs. the count of my MD-devices was ok, but all names were prefixed with 
hostname 'hetzner'.

after booting, fixing (the systems) /etc/mdadm/mdadm.conf and update-initramfs
all went fine.

i don't remember the exact content, but install generated a mdadm.conf like:
  ARRAY /dev/md/0 metadata=1.2 UUID=12345678:12345678:12345678:12345678 
name=hetzner:0
  ARRAY /dev/md/1 metadata=1.2 UUID=24680135:24680135:24680135:24680135 
name=hetzner:1
  ARRAY /dev/md/2 metadata=1.2 UUID=abcdef12:abcdef12:abcdef12:abcdef12 
name=hetzner:2

(UUIDs are made up)

disks used were new  empty and had no affiliation to hetzner online AG
you can search the net for 'name=hetzner: mdadm.conf' to yield probably the 
original UUIDs.

  pille

--- initrd.img-2.6.32-5-amd64:
47498 blocks
3718babf31303bc28114430ec0182e14  ./etc/mdadm/mdadm.conf
d24ed7389311fb002ff017c8acb3a032  
./lib/modules/2.6.32-5-amd64/kernel/drivers/md/dm-mirror.ko
4818680648975a4d4181181df95de446  
./lib/modules/2.6.32-5-amd64/kernel/drivers/md/dm-log.ko
bb013669544366b71ebd8b335a7d8b0a  
./lib/modules/2.6.32-5-amd64/kernel/drivers/md/dm-mod.ko
ee2079d7e0bf4da6b64af9e579f6c0ae  
./lib/modules/2.6.32-5-amd64/kernel/drivers/md/raid456.ko
b210dd35ca38b2e33637351a979561c9  
./lib/modules/2.6.32-5-amd64/kernel/drivers/md/multipath.ko
0c8325eb1abcf4ad33e45a20d44c5bf8  
./lib/modules/2.6.32-5-amd64/kernel/drivers/md/dm-crypt.ko
f25a213d65a481b66cfdbf8f6453aacf  
./lib/modules/2.6.32-5-amd64/kernel/drivers/md/dm-region-hash.ko
cc5177855661025115a2ef74d0d394d6  
./lib/modules/2.6.32-5-amd64/kernel/drivers/md/raid0.ko

-- System Information:
Debian Release: 6.0.2
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'stable-updates'), (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages mdadm depends on:
ii  debconf 1.5.36.1 Debian configuration management sy
ii  libc6   2.11.2-10Embedded GNU C Library: Shared lib
ii  lsb-base3.2-23.2squeeze1 Linux Standard Base 3.2 init scrip
ii  udev164-3/dev/ and hotplug management daemo

Versions of packages mdadm recommends:
ii  exim4-daemon-light [mail 4.72-6+squeeze2 lightweight Exim MTA (v4) daemon
ii  module-init-tools3.12-1  tools for managing Linux kernel mo

mdadm suggests no packages.

-- debconf information:
  mdadm/autostart: true
  mdadm/mail_to: root
  mdadm/initrdstart_msg_errmd:
  mdadm/initrdstart: all
  mdadm/initrdstart_msg_errconf:
  mdadm/initrdstart_notinconf: false
  mdadm/initrdstart_msg_errexist:
  mdadm/initrdstart_msg_intro:
  mdadm/autocheck: true
  mdadm/initrdstart_msg_errblock:
  mdadm/start_daemon: true



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#644389: suspect non-working mdadm.conf created during install

2011-10-05 Thread martin f krafft
tags 644389 moreinfo unreproducible
thanks

also sprach pille pille+debian+bug-rep...@struction.de [2011.10.05.1458 
+0200]:
 i assembled my RAID devices by hand

How?

 but all names were prefixed with hostname 'hetzner'.

What names? You mean the name= attribute in the mdadm --examine
output?

 disks used were new  empty and had no affiliation to hetzner
 online AG you can search the net for 'name=hetzner: mdadm.conf'
 to yield probably the original UUIDs.

Please provide the exact original and new UUIDs, don't expect me to
search the Net for them (I am offline right now).

Also, did you change the hostname?

-- 
 .''`.   martin f. krafft madduck@d.o  Related projects:
: :'  :  proud Debian developer   http://debiansystem.info
`. `'`   http://people.debian.org/~madduckhttp://vcs-pkg.org
  `-  Debian - when you have better things to do than fixing systems


digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/sig-policy/999bbcc4/current)


Bug#644389: suspect non-working mdadm.conf created during install

2011-10-05 Thread pille

i assembled my RAID devices by hand


How?


something like:
  mdadm --assemble /dev/md1 /dev/sd[abcd]4



but all names were prefixed with hostname 'hetzner'.


What names? You mean the name= attribute in the mdadm --examine
output?


excactly.


Please provide the exact original and new UUIDs, don't expect me to
search the Net for them (I am offline right now).


unfortunately i cannot provide you with those. if i could i would have 
done so, already.
the install was a week ago and i don't have any backups of a broken 
config. don't expect me to memorize UUIDs.



Also, did you change the hostname?


no.



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#644389: suspect non-working mdadm.conf created during install

2011-10-05 Thread martin f krafft
also sprach pille pille+debian+bug-rep...@struction.de [2011.10.05.1819 
+0200]:
 Please provide the exact original and new UUIDs, don't expect me to
 search the Net for them (I am offline right now).
 
 unfortunately i cannot provide you with those. if i could i would
 have done so, already.
 the install was a week ago and i don't have any backups of a broken
 config. don't expect me to memorize UUIDs.
 
 Also, did you change the hostname?
 
 no.

In this case there is very little I can do. I have done multiple
squeeze installs with RAID, and upgrades, and I have not seen this
problem. Unless you can reproduce this bug, I cannot do anything but
keep this report open.

-- 
 .''`.   martin f. krafft madduck@d.o  Related projects:
: :'  :  proud Debian developer   http://debiansystem.info
`. `'`   http://people.debian.org/~madduckhttp://vcs-pkg.org
  `-  Debian - when you have better things to do than fixing systems
 
the mind of the thoroughly well-informed man is a dreadful thing.
 it is like a bric-à-brac shop, all monsters and dust,
 with everything priced above its proper value.
-- oscar wilde


digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/sig-policy/999bbcc4/current)


Bug#644389: suspect non-working mdadm.conf created during install

2011-10-05 Thread pille

In this case there is very little I can do. I have done multiple
squeeze installs with RAID, and upgrades, and I have not seen this
problem. Unless you can reproduce this bug, I cannot do anything but
keep this report open.


i've just reproduced such a failing install inside a KVM.
see (combined) screenshot attached from first boot.

i've snapshotted the VM at different stages and can provide you with one 
that just boots for the first time (snapshot3, see screenshot).

tell me if you're interrested in investigating it.


here's a log of what i did:

booted 
http://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/debian-live-6.0.2-amd64-rescue.iso 
(sha1=0e5d9409719e657de4cbd9f355545cdc4c869038)

expert text install
selected some udebs (parted, reiserfs, squash, virtio)
hostname = file.lan
partition
  manual
for all 4 disks:
  GPT
  p1: 6MB   BIOS BOOT
  p2: 250MB RAID1 BOOT
  p3: 768MB SWAP
  p4: 3.3GB RAID6 VG/PV
configure sw raid:
  md0: RAID1 /dev/sd[a-d]2: /boot (ext2)
  md1: RAID6 /dev/sd[a-d]4: LVM PV (VG=vg-sys)
configure LVM:
  LV system: /dev/md1 (4GB) / (reiserfs)
snapshot1
install system (normal)
install grub
finish
snapshot2
reboot
snapshot3


cheers
  pille
attachment: screenshot.png

Bug#644389: suspect non-working mdadm.conf created during install

2011-10-05 Thread Michael Tokarev
On 05.10.2011 22:53, pille wrote:
 In this case there is very little I can do. I have done multiple
 squeeze installs with RAID, and upgrades, and I have not seen this
 problem. Unless you can reproduce this bug, I cannot do anything but
 keep this report open.
 
 i've just reproduced such a failing install inside a KVM.
 see (combined) screenshot attached from first boot.
 
 i've snapshotted the VM at different stages and can provide you with one that 
 just boots for the first time (snapshot3, see screenshot).
 tell me if you're interrested in investigating it.
 
 
 here's a log of what i did:
 
 booted 
 http://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/debian-live-6.0.2-amd64-rescue.iso
  (sha1=0e5d9409719e657de4cbd9f355545cdc4c869038)
 expert text install
 selected some udebs (parted, reiserfs, squash, virtio)
 hostname = file.lan
 partition
   manual
 for all 4 disks:
   GPT
   p1: 6MB   BIOS BOOT
   p2: 250MB RAID1 BOOT
   p3: 768MB SWAP
   p4: 3.3GB RAID6 VG/PV
 configure sw raid:
   md0: RAID1 /dev/sd[a-d]2: /boot (ext2)
   md1: RAID6 /dev/sd[a-d]4: LVM PV (VG=vg-sys)
 configure LVM:
   LV system: /dev/md1 (4GB) / (reiserfs)
 snapshot1
 install system (normal)
 install grub
 finish
 snapshot2
 reboot
 snapshot3

So it looks like during install time, in d-i, the system were named hetzer 
(most likely
due to DHCP), and all md arrays were created using that name.  And later on, it 
fails to
boot with actual hostname.  Note that mdadm.conf in initrd contains name 
hetzer, while
actual arrays are named file.

Is your real hostname file ?

/mjt



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#644389: suspect non-working mdadm.conf created during install

2011-10-05 Thread pille

So it looks like during install time, in d-i, the system were named hetzer 
(most likely
due to DHCP), and all md arrays were created using that name.  And later on, it 
fails to
boot with actual hostname.


i' don't know if it's the initramfs shipped with d-i, but today i did an 
offline install. no net, no DHCP, no hetzner datacenter.
i completely understand what happens as i'm able to boot the system by 
manually assembling the array and fixing the problem, but how the wrong 
hostname slips into the initramfs should be investigated by debians devs.


 Note that mdadm.conf in initrd contains name hetzer, while

actual arrays are named file.


that's what i'm talking about.


Is your real hostname file ?


yes.


  pille



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org