[->UUIDudev] "HOMEHOST <system>" does not work inside initrd

Bug #330399 reported by Daniel Richard G. on 2009-02-17
6
Affects Status Importance Assigned to Milestone
mdadm (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: mdadm

This concerns mdadm 2.6.7-3ubuntu8 in Intrepid.

I have a system with "/" on a RAID1 device.

/etc/mdadm/mdadm.conf specifies "HOMEHOST <system>", and no information on the structure of the RAID1 device. (The intent, of course, is to have mdadm auto-assemble it.) The RAID1 device superblocks have the homehost properly set to the current system hostname.

The system fails to boot in this configuration. Why? Because a homehost of "<system>" means that the current system hostname (as returned by gethostname()) is used, and yet in the initrd environment, _no hostname is set_. You run "hostname" at the BusyBox prompt, and you get "(none)".

The workaround is to hard-code the hostname as HOMEHOST in mdadm.conf (and re-generate the initrd image). The fix would be to have initrd pull in /etc/hostname and any other requisite bits so that the system hostname is available in the initrd environment, so that "HOMEHOST <system>" works as intended.

ceg (ceg) wrote :

This should be no issue with UUID-based raid assembly that makes mdadm.conf ARRAY definition maintenance obsolete. Bug #158918

summary: - "HOMEHOST <system>" does not work inside initrd
+ [->UUIDudev] "HOMEHOST <system>" does not work inside initrd
Changed in mdadm (Ubuntu):
status: New → Confirmed
ceg (ceg) wrote :

Setting the hostname in initramfs is probably a good workaround for older versions.

New mdadm versions may need an option to not check the hostname, and only go by the UUIDs of md devices and filesystems for proper hot/coldplug support.

Daniel Richard G. (skunk) wrote :

Why not just have the initrd pull in /etc/hostname? The hostname of "(none)" is practically a bug in itself.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers