On 3/14/2023 10:03 AM, Robert Heller wrote:
Unfortunately, no. The system would not mount the drive without some other changes. Listing the process here for anyone else who comes across this thread.
Trying to start the array (with or without --force), fails with the message:
mdadm: Found some drive for an array that is already active: /dev/md127 mdadm: giving up
I found with some digging that I needed to change the UUID of the drive to be able to mount it separately from the existing array. I used "sgdisk -G /dev/sdg1" to do this. It worked, but gave quite a few scary warning messages in the process. A better idea would have been to use uuidgen to generate a random uuid and then start the array like this:
mdadm --assemble /dev/md99 --update=uuid --uuid=<newuuid> /dev/sdg1 (might require --force for a broken array, I'm not sure since I didn't actually do it this way)
Once the array is running, there is another problem. Attempting to mount the array gives another error:
mount: wrong fs type, bad option, bad superblock on /dev/md99, missing codepage or helper program, or other error
Useless error message. You have to look in dmesg to see the actual problem:
XFS (md99): Filesystem has duplicate UUID 7e237dbd-6c24-4781-98d1-a1ae80a3ed13 - can't mount
I would assume you would have a similar issue with any other filesystem. In my case, since it is XFS, I used uuidgen to generate another random uuid and then updated it like this:
xfs_admin -U <newuuid> /dev/md99
After that, the filesystem mounted normally.
Hopefully that is helpful for anyone else who finds themselves in this situation.