wipefs -af 和 mdadm --zero-superblock 是否等效于擦除 raid 元数据?

wipefs -af 和 mdadm --zero-superblock 是否等效于擦除 raid 元数据?

我看到了有关如何删除软件 raid 的说明,其中一些包含以下两个说明:wipefs -af <device>mdadm --zero-superblock --force <device>

是否需要同时使用两者?它们的结果有何不同?

这里我创建了 /dev/sda3 和 /dev/sdb3 的 raid。我做了一个小测试,结果看起来是一样的。

machine1:~# wipefs /dev/sda3  # <-- see the signature on sda3
offset               type
----------------------------------------------------------------
0x1000               linux_raid_member   [raid]
                     LABEL: machine1:md_system
                     UUID:  54f255a8-c32d-2a67-f728-151f89a7471b

machine1:~# wipefs -af /dev/sda3  # <-- wipe signature using wipefs
/dev/sda3: 4 bytes were erased at offset 0x00001000 (linux_raid_member): fc 4e 2b a9
machine1:~# wipefs /dev/sda3  # <-- as you can see, signature was erased
machine1:~# 
machine1:~# wipefs /dev/sdb3  # <-- see signature on sdb3
offset               type
----------------------------------------------------------------
0x1000               linux_raid_member   [raid]
                     LABEL: machine1:md_system
                     UUID:  54f255a8-c32d-2a67-f728-151f89a7471b

machine1:~# mdadm --misc --zero-superblock --force /dev/sdb3  # <-- wipe signature using mdadm
machine1:~# wipefs /dev/sdb3  # <-- as you can see, signature was also erased
machine1:~# 

答案1

两条指令都导致归零超级块,这意味着删除签名这里的文件系统元数据有关袭击

相关内容