I have a USB thumb drive that I briefly used in a raid 1 array. I don't need it in that array anymore (but need to add it to a different array) and hence would like to get rid of the old superblock but I can't. I tried:
$ sudo mdadm --zero-superblock /dev/sdb
mdadm: Couldn't open /dev/sdb for write - not zeroing
$ sudo mdadm --zero-superblock /dev/sdb1
mdadm: Couldn't open /dev/sdb1 for write - not zeroing
I deleted the partition and pluged the device into a Windows machine to format it from there, but the super block still sticks around:
$lsblk
...
...
sdb 8:16 1 119.3G 0 disk
└─md127 9:127 0 119.2G 0 raid1
Fdisk:
$ sudo fdisk /dev/sdb
Welcome to fdisk (util-linux 2.33.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): p
Disk /dev/sdb: 119.3 GiB, 128038469632 bytes, 250075136 sectors
Disk model: USB Flash Drive
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xeb49580b
Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 250075135 250073088 119.3G 7 HPFS/NTFS/exFAT
How do I wipe the drive's superblock?
UPDATE
I also tried:
$ sudo wipefs --all --backup /dev/sdb
wipefs: error: /dev/sdb: probing initialization failed: Device or resource busy
this is while none of the partitions on /dev/sdb
are mounted, lsblk
shows:
...
sdb 8:16 1 119.3G 0 disk
├─sdb1 8:17 1 119.3G 0 part
└─md127 9:127 0 119.2G 0 raid1
...