"--re-add for /dev/sdb1 to /dev/md0 is not possible"

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

 



Hi,

In my continuing goal to remove the bad blocks log from any of my
arrays and not have one on any new arrays I create, I wrote this
article:

    https://strugglers.net/~andy/blog/2020/09/13/debian-installer-mdadm-configuration-and-the-bad-blocks-controversy

Shortly afterwards someone on Hacker News¹ said that it is possible
to remove the BBL by failing and re-adding devices, like so:

# mdadm /dev/md127 --fail /dev/sda --remove /dev/sda --re-add /dev/sda --update=no-bbl

I tried that on Ubuntu 18.04:

$ mdadm --version
mdadm - v4.1-rc1 - 2018-03-22
$ sudo mdadm --fail /dev/md0 /dev/sdb1 --remove /dev/sdb1 --re-add /dev/sdb1 --update=no-bbl
mdadm: set /dev/sdb1 faulty in /dev/md0
mdadm: hot removed /dev/sdb1 from /dev/md0
mdadm: --re-add for /dev/sdb1 to /dev/md0 is not possible
$ sudo mdadm --add /dev/md0 /dev/sdb1 --update=no-bbl
mdadm: --update in Manage mode only allowed with --re-add.
$ sudo mdadm --add /dev/md0 /dev/sdb1
mdadm: added /dev/sdb1
$ sudo mdadm --examine-badblocks /dev/sdb1
Bad-blocks list is empty in /dev/sdb1

I tried it on Debian buster:

$ mdadm --version
mdadm - v4.1 - 2018-10-01
$ sudo mdadm --fail /dev/md6 /dev/sdb1 --remove /dev/sdb1 --re-add /dev/sdb1 --update=no-bbl
mdadm: set /dev/sdb1 faulty in /dev/md6
mdadm: hot removed /dev/sdb1 from /dev/md6
mdadm: --re-add for /dev/sdb1 to /dev/md6 is not possible

So, is that supposed to work and if so, why doesn't it work for me?

In both cases these are simple two device RAID-1 metadata version
1.2 arrays. Neither has bitmaps.

Thanks,
Andy

¹ https://news.ycombinator.com/item?id=24479235



[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