Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

So I went from a degraded RAID, to a dissasembled RAID, to now trying to reassemble it. Im getting a weird message when trying to --assemble the RAID. I have 6 drives, so /dev/sd[a-f]1. When trying to assemble the raid, I am getting that e and f are misses out due to wrong homehost. I tried to search around but I cant find the correct solution to get the RAID 5 going again.

share|improve this question
    
root@V-HTPC:~# mdadm --examine --scan ARRAY /dev/md/127 metadata=1.2 UUID=5644d75d:ebb22217:bc09d634:46483e6d name=V-HTPC:127 ARRAY /dev/md/127 metadata=1.2 UUID=d3fb62dc:ce1fefe7:2c8e8618:b8994ae3 name=Devastator:127 –  vpoola88 Dec 19 '12 at 7:47
    
So there are 2 Arrays? –  vpoola88 Dec 19 '12 at 7:49
    
You state that only "e and f are misses out due to wrong homehost". This is not possible - homehosts are recorded for complete arrays. Are you sure all of those six partitions are part of the same array? Provide the output of mdadm --examine /dev/sda1 (for all devices). –  gertvdijk Dec 19 '12 at 16:56
    
@gertvdijk here is the output: pastebin.com/Rw6DDHDA –  vpoola88 Dec 19 '12 at 18:49
    
e and f do not show (local to host) as the other drives do –  vpoola88 Dec 19 '12 at 18:51
show 5 more comments

1 Answer 1

As a safety feature the kernel will only allow automatic assembly of arrays it is part of the same host. This is checked by the metadata field 'homehost' on the array. If it does not match the current hostname, it will refuse to start.

To force the array to start on your new system, you have two options:

  • Update the homehost metadata on the array to match your new hostname.

    Use the --update=homehost option for mdadm on assembling to update the field with the current hostname on each drive.

  • Tell mdadm to use the hostname of the old system when scanning for arrays.

    Use the option --hostname=myhostname when working with mdadm.

    or, specify an HOMEHOST=myhostname entry in /etc/mdadm/mdadm.conf.

share|improve this answer
    
thanks getvdijk: so this is what I did and this is what I am getting back: –  vpoola88 Dec 19 '12 at 16:03
    
root@V-HTPC:~# mdadm --assemble /dev/md127 --update=homehost /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1 /dev/sdf1 mdadm: cannot open device /dev/sde1: No such file or directory mdadm: /dev/sde1 has no superblock - assembly aborted –  vpoola88 Dec 19 '12 at 16:04
    
@vpoola88 You're having a completely different problem there. sde1 seems not to be available. –  gertvdijk Dec 19 '12 at 16:05
    
How would I make it available? Also, can you post examples of commands for both scenarios that you have above? Thanks so much. –  vpoola88 Dec 19 '12 at 16:08
    
@vpoola88 The device isn't there. Software can't do magic about making hardware available. Make sure you point mdadm to the devices part of the array, or, make it scan your whole system and point it to only one of the disks. (see manpage of mdadm and option/examples about --scan) –  gertvdijk Dec 19 '12 at 16:12
show 5 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.