mdadm: add new device failed for /dev/sdb4 as 3: Invalid argument solution

mdadm --manage /dev/md125 -a /dev/sdb4
mdadm: add new device failed for /dev/sdb4 as 3: Invalid argument


Dec 19 01:23:48 storageboxtest kernel: [ 2328.854491] md: sdb4 does not have a valid v1.2 superblock, not importing!
Dec 19 01:23:48 storageboxtest kernel: [ 2328.854499] md: md_import_device returned -22


#zero the superblock and try again!
mdadm --zero-superblock /dev/sdb4
mdadm --manage /dev/md125 -a /dev/sdb4


mdadm: add new device failed for /dev/sdb4 as 3: Invalid argument



Solution / this is the only thing that fixed it (basically do more than just zero-superblock)

dd if=/dev/zero of=/dev/sdb4
^C77149+0 records in
77149+0 records out
39500288 bytes (40 MB) copied, 5.35553 s, 7.4 MB/s


#success!

mdadm --manage /dev/md125 -a /dev/sdb4
mdadm: added /dev/sdb4
 

The weird thing is that you can see zero-superblock was NOT enough to fix it and sometimes you have to wipe a little further than zero-superblock does and it will fix it.  I didn't find this solution anywhere so I thought I'd share it.


Tags:

mdadm, dev, sdb, invalid, solutionmdadm, md, dec, storageboxtest, kernel, valid, superblock, importing, md_import_device, dd, bytes, mb, copied, didn,

Latest Articles

  • FreePBX 17 How To Add a Trunk
  • Docker Container Onboot Policy - How to make sure a container is always running
  • FreePBX 17 How To Add Phones / Extensions and Register
  • Warning: The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes. solution
  • Cisco How To Use a Third Party SIP Phone (eg. Avaya, 3CX)
  • Cisco Unified Communication Manager (CUCM) - How To Add Phones
  • pptp / pptpd not working in DD-WRT iptables / router
  • systemd-journald high memory usage solution
  • How to Install FreePBX 17 in Linux Debian Ubuntu Mint Guide
  • How To Install Cisco's CUCM (Cisco Unified Communication Manager) 12 Guide
  • Linux Ubuntu Redhat How To Extract Images from PDF
  • Linux and Windows Dual Boot Issue NIC Won't work After Booting Windows
  • Cisco CME How To Enable ACD hunt groups
  • How to install gns3 on Linux Ubuntu Mint
  • How to convert audio for Asterisk .wav format
  • Using Cisco CME Router with Asterisk as a dial-peer
  • Cisco CME How To Configure SIP Trunk VOIP
  • Virtualbox host Only Network Error Failed to save host network interface parameter - Cannot change gateway IP of host only network
  • Cisco CME and C7200 Router Testing and Learning Environment on Ubuntu 20+ Setup Tutorial Guide
  • Abusive IP ranges blacklist