Linux

新設置:如何告訴 mdadm 不要打擾同步_data_?還是必須這樣做?

  • February 11, 2013

兩個問題:

  1. 如果有的話,我怎麼能告訴mdadm新創建的數組不需要同步,因為它上面沒有數據?即基本上強制它進入它假設“數據”(即巨大的空白空間)已同步並且僅同步元數據的狀態?
  2. 如果上述幾點是不可能的,為什麼?同步是否考慮了實際的壞扇區,或者為什麼我必須同步一個空數組?

您可以使用該--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.

引用自:https://serverfault.com/questions/477687