Re: add new disk with dd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 29 Apr 2021 16:52:21 +0800
d tbsky <tbskyd@xxxxxxxxx> wrote:

> Hi:
>    I want to replace a fault disk for software raid5. there is
> something like grub/biosgrub at the beginning of the disk, so if I can
> use command below to copy them:
> 
> "dd if=/dev/sda of=/dev/sdb bs=1M count=10"
> 
> if it is a gpt disk I can use sgdisk to copy the partition table then
> radmonize guid.

Do you use whole disks or partitions as MD members? Better use partitions. And
if so, you can simply run "wipefs -a /dev/sdb1" after your dd, to wipe all the
MD metadata that got copied.

> 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.

Without wiping the metadata, don't plug in both disks at the same time, and
don't even plug in the new disk alone. With metadata at the beginning, mdadm
might pick up the new one as a normally operating array member, whereas it
only has 10 MB of the actual data copied to it.

-- 
With respect,
Roman



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux