我有一个 USB 拇指驱动器,我曾在 raid 1 阵列中短暂使用过。我不再需要它在该阵列中(但需要将其添加到其他阵列),因此想摆脱旧的超级块,但我做不到。我试过:
$ 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
我删除了该分区并将设备插入 Windows 机器以从那里对其进行格式化,但超级块仍然存在:
$lsblk
...
...
sdb 8:16 1 119.3G 0 disk
└─md127 9:127 0 119.2G 0 raid1
磁盘分区:
$ 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
如何擦除驱动器的超级块?
更新
我也尝试过:
$ sudo wipefs --all --backup /dev/sdb
wipefs: error: /dev/sdb: probing initialization failed: Device or resource busy
/dev/sdb
这是在没有安装任何分区的情况下,lsblk
显示:
...
sdb 8:16 1 119.3G 0 disk
├─sdb1 8:17 1 119.3G 0 part
└─md127 9:127 0 119.2G 0 raid1
...
答案1
当md127
设备启动时,您必须先停止它,然后运行 wipefs:
mdadm --stop /dev/md127
wipefs -a /dev/sdb
答案2
也许你可以尝试这个:
wipefs --all --backup /dev/sdb
警告:预计数据丢失