两个问题:
mdadm
我如何才能知道,由于新创建的数组中没有数据,因此不需要同步?也就是说,基本上强制它进入一种状态,即假定“数据”(即巨大的空白空间)已同步,并且仅同步元数据?- 如果上述观点不可能,为什么?同步是否考虑了实际的坏扇区,或者为什么我必须同步一个原本为空的数组?
答案1
您可以使用该--assume-clean
选项。从man
:
Tell mdadm that the array pre-existed and is
known to be clean. It can be useful when trying
to recover from a major failure as you can be
sure that no data will be affected unless you
actually write to the array. It can also be
used when creating a RAID1 or RAID10 if you want
to avoid the initial resync, however this prac‐
tice — while normally safe — is not recommended.
Use this only if you really know what you are
doing.
When the devices that will be part of a new
array were filled with zeros before creation the
operator knows the array is actually clean. If
that is the case, such as after running bad‐
blocks, this argument can be used to tell mdadm
the facts the operator knows.