On 29/04/21 16:32, d tbsky wrote: > Mateusz <mateusz-lists@xxxxxxxxxxxxxx> >> 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. > > "madam --zero-superblock" is great. I will add it to my procedure. > thanks a lot for the hint! > >> BTW, IMHO it's better to clone partition layout, and than install bootloaders >> instead of dding disk. > > yes. but sometimes dd is easy, especially for mbr layout. > anyway I think your suggestion "--zero-superblock" make things safe > with new and old disks. > I notice you said mbr ... because with GPT it will give you a broken partition table. Note also it will copy all your guids, so you don't EVER want those two disks to be in the same system at the same time ... I'd do what the others have suggested - copy the partition table, re-install grub or whatever (you have got it documented what to do? :-) It should be easy), and simply add your replacement partition. Oh - and did you say it was raid-5? You've just busted your redundancy during the most dangerous period of an array's life - the rebuild. If you add the new disk to your system then do a --replace before removing the old, your array is fully protected at all times and the only two disks being hammered are the old one that's not working properly anyway, and the new one that should be able to take it. (The other thing about doing a proper rebuild, is you can use a larger disk, and a larger partition, ready to upgrade the other disks and grow your array.) Cheers, Wol