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

Re: hostname ?



On Tue, Feb 23, 2016 at 8:27 PM, Peter Nagel <peter.nagel@kit.edu> wrote:
> Thanks for your input.
> The HOMEHOST parameter (in /etc/mdadm/mdadm.conf) is set to <system>.
>
> The RAID-device does still show the old hostname in both mdadm.conf and the
> superblock of the indiviual devices.
> The system is booting from this RAID without problems. Nevertheless, I would
> like to change to the new hostname.
>
> If I would change the hostname of the ARRAY in mdadm.conf I should also
> change the hostname within the superblocks.
> However, I have no idea how to change the homehost settings in the
> superblock ...
>
> Peter

According to previous post:
> You're not alone by the looks.  And it's not peculiar to the hardware.
> http://askubuntu.com/questions/63980/how-do-i-rename-an-mdadm-raid-array

Here's the method, confirmed OK by me.

- backup /etc/mdadm/mdadm.conf, and then edit it, remove "name=XXX"
for each array you want to rename. in transition stage, if "name"
mismatch, you will not be able to boot at all. so remove it for safe.
mdadm can safely reassemble by UUID only.
- run: "update-initramfs -u" to make previous edit effective
- shutdown, then move the HDDs of the array to other PC, or connect
via USB-SATA adapter.
- run for each array you want to rename: mdadm -A /dev/mdX
--update=name --name=<new name>:<md ID> /dev/sdaY /dev/sdbY
- stop the array: mdadm -S /dev/mdX
- shutdown that PC
- move the HDDs back to original PC, and boot

Because as I tested, the rename only can happen when assembling, so
doing it on another PC is the point.

Cheers,
-- 
Roger Shimizu, GMT +9 Tokyo
PGP/GPG: 17B3ACB1


Reply to: