Re: add new disk with dd
From: Mateusz <hidden>
Date: 2021-04-29 09:29:32
On czwartek, 29 kwietnia 2021 10:52:21 CEST d tbsky wrote:
however dd may also copy the mdadm superblock which include internal bitmap(since I don't caculate correct size). I don't know if there is risk that mdadm will be confused with the bitmap in new disk. although I have tried and it seems work fine. should I disable internal bitmap before add new disk?
No.
or mdadm will understand the superblock/bitmap at new disk is invalid and just overwrite everything?
Should in most cases [1], but IMHO it's good idea to mdadm --zero-superblock /dev/YOU_ARE_SURE_IS_ONE_YOU_WANT_TO_ADD before adding disk already used somewhere else. BTW, IMHO it's better to clone partition layout, and than install bootloaders instead of dding disk. [1] If disk/part was already used / cloned in same array it's bitmap may be recognized, not synced, resulting likely broken array. -- Mateusz (...) mam brata - poważny, domator, liczykrupa, hipokryta, pobożniś, krótko mówiąc - podpora społeczeństwa." Nikos Kazantzakis - "Grek Zorba"