[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

mdadm -localhost problem



Summary: mdadm on squeeze rewrites the UUID I give it with the
localhost, even if I do not specify localhost.  I am trying to repair a
RAID for use on lenny with an existing UUID.  Is there a way to avoid
the rewrite?  Other solutions?

Details

A lenny host has two virtual machines, VM1 (lenny) and VM2 (squeeze).
There are two virtual disks, VD0 and VD1, whose 3rd partition forms
RAID1 (md1), intended for VM1.  That same partition was in a RAID
before, but I grew it and so there is no RAID superblock near the end
anymore. I need to recreate the superblock without zapping the good data
on the partition.

>From VM2:
# mdadm --create /dev/md1 --uuid=6f05ff4e:b4d49c1f:7fa21d88:ad0c50a9
--metadata=0.90 --level=mirror --raid-devices=2 /dev/sdb3 missing
mdadm: array /dev/md1 started.
# mdadm --examine /dev/sdb3
/dev/sdb3:
          Magic : a92b4efc
        Version : 0.90.00
           UUID : 6f05ff4e:b4d49c1f:f1c4dd81:d9ca9b38 (local to host
squeeze00)

The man appears to say the UUID specified on the command line should
govern(*), but it doesn't.

Some possible fixes:
1) Get mdadm to use the UUID I specify.

2) Use the new UUID and edit the mdadm.conf for VM1 to match.  Do I need
to update the initramfs, and if so how?  And will VM1 accespt the new
UUID, or do its own rewriting with its own hostname?

3) Use mdadm from the (lenny) host system, since the localhost stuff is
new in squeeze.  I don't know how to access the virtual disks outside of
a VM to do this.

4) Find an appropriate rescue system image for lenny, start it in a VM,
and run mdadm from there.  I wonder if stopping VM1's startup while it's
still in the initrd would be enough.

Thanks.
Ross Boylan

(*) from man mdadm on squeeze:
      Also, using --uuid= when creating a v0.90 array will silently
      override any --homehost= setting.
Technically I didn't specify --homehost; maybe I should try that in
order to get the host ignored!



Reply to: