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

Re: changing uuid of mdadm array



On Sun, 9 Oct 2022, Andy Smith wrote:

but I couldn't find any way to change the uuid in the member without
creating the array like this.

I don't think there is a way without either using --create as you
did or stopping the array and hand editing the metadata of the
device in question.

Thanks. That --update=uuid convinced me there ought to be a way to do
it.

The uuid option will change the uuid of the array. If a UUID is given
with the --uuid option that UUID will be used as a new UUID and will NOT
be used to help identify the devices in the array. If no --uuid is
given, a random UUID is chosen.

Perhaps I needed to remove the uuid from mdadm.conf.


FWIW, I didn't need to change the uuid here, I could have just started
from scratch with --zero-superblock but I've previously got into a mess
where I duplicated a machine by splitting a raid where I now had two
raids with the same uuid and this was a good opportunity to see what I
should have done on a disk where I didn't care about the data on it.


Tim.


Reply to: