Thanks - wipefs fails see below

# dmsetup ls
luks-ab8911f9-b3a4-4f33-8b10-7e52c7217ae9       (253:9)
luks-35719a97-5898-4420-9a56-1576ffdc6db3       (253:1)
luks-c80d9988-30f6-42cf-a9b7-89ee3408eccb       (253:6)
luks-03c06df8-f9b9-4f0d-847e-79a7ed527888       (253:0)
luks-a2ebb2b0-527d-47f3-83ef-e5908805f31d       (253:3)
luks-5ee2ed8e-4bdf-43e1-adb0-34a70610a77f       (253:2)
luks-d348150c-3a5d-456e-bedd-1cfaa51839f9       (253:7)
luks-24ef3c76-0b18-45e3-a532-5983f77be5e3       (253:4)
luks-02fdb3bb-bd65-4d50-a586-63bc13e0dc30       (253:5)
luks-2871ae45-e563-4ae4-991d-d71693c749bf       (253:8)
# cryptsetup status luks-ab8911f9-b3a4-4f33-8b10-7e52c7217ae9
/dev/mapper/luks-ab8911f9-b3a4-4f33-8b10-7e52c7217ae9 is active.
  type:    LUKS1
  cipher:  aes-xts-plain64
  keysize: 512 bits
  device:  /dev/md127
  offset:  4096 sectors
  size:    7813767168 sectors
  mode:    read/write

# wipefs --backup -a /dev/md127
wipefs: error: /dev/md127: probing initialization failed: Device or resource busy

# mdadm -S /dev/md127
mdadm: Cannot get exclusive access to /dev/md127:Perhaps a running process, mounted filesystem or active volume group?


On 02/01/2015 08:19 PM, Chris Murphy wrote:
What do you get for:

dmsetup ls
cryptsetup status

I see this:

/dev/mapper/luks-ab8911f9-b3a4-4f33-8b10-7e52c7217ae9 /raid1

This suggests an encrypted device mapper device created from the raid1
device, and it's active. So that has to be closed, or wipefs before
you can stop the raid and then wipe the raid, i.e. you need to tear it
down in the reverse order it was created.

You can try this: DOUBLE CHECK DEVICE VALUES
wipefs --backup -a /dev/md127
mdadm -S /dev/md127
wipefs --backup -a /dev/sd[cd]1

That will backup the luks signature, then wipe it, stop the array,
then backup and wipe the mdadm superblock signature. That ought to fix
the problem unless there's also LVM stuff going on here too.

The --backup isn't strictly necessary but will write out a file and
instructions on how to restore what it wipes in case you get the
command wrong and wipe the wrong device.




-- 
Quis custodiet ipsos custodes