![无法清除驱动器上的超级块](https://linux22.com/image/748638/%E6%97%A0%E6%B3%95%E6%B8%85%E9%99%A4%E9%A9%B1%E5%8A%A8%E5%99%A8%E4%B8%8A%E7%9A%84%E8%B6%85%E7%BA%A7%E5%9D%97.png)
我有一个 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
警告:预计数据丢失