-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 El 2017-11-21 a las 20:21 -0000, Wol's lists escribió:
On 21/11/17 19:13, Lew Wolfgang wrote:
On 11/21/2017 09:19 AM, Per Jessen wrote:
Sorry, I don't think I made myself clear. If the old disk was swapped out and copied, then the old disk is "clean". If this disk gets back into the same machine as the raid array, and the machine is rebooted, mdadm IS GOING TO GET CONFUSED. Yes, but Andrei is using an HP Smart Array Controller, not software raid.
I've also been bitten by hidden RAID metadata on individual disks. I've been using a very simple/dumb script to make sure all the metadata is gone. It blasts the MBR, partition table, and any other cruft at the start of the disk too. Call with the /dev/sdx as the argument. Use at your own risk!
#!/bin/bash dd if=/dev/zero of=$1 bs=512 count=2018 dd if=/dev/zero of=$1 bs=512 seek=$(( $(blockdev --getsz $1) - 1024 )) count=1024 exit
Does the second line wipe the END of the disk?
Yes. It erases to the end from 1024 blocks before (of 512 bytes). I think the code should use bigger size block for speed. 1 MB at least. - -- Cheers Carlos E. R. (from openSUSE 42.2 x86_64 "Malachite" (Minas Tirith)) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iF4EAREIAAYFAloUjB8ACgkQja8UbcUWM1z78QD/VA2k1c1yTon7GwpfpurLQCza GVBOOjwpyYTaxCNAOW4A/AjfBg3IFrkLH6vY+FFHA2IN7vNsx2EO5HKiulXEJPQe =Lvk4 -----END PGP SIGNATURE-----