All of lore.kernel.org
 help / color / mirror / Atom feed
* Add BBL to existing array
       [not found] ` <20140827192721.57c57c3b@notabene.brown>
@ 2014-08-27 10:32   ` Peter Hoeg
  2014-08-27 11:07     ` NeilBrown
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Hoeg @ 2014-08-27 10:32 UTC (permalink / raw)
  To: linux-raid

Hi,

this isn't so much a question as it trying to document the situation
with BBL's on Debian jessie, although if I've overlooked something,
please let me know.

Purpose: Add BBL to a RAID created by an earlier version of mdadm
without BBL support.

# mdadm --version

mdadm - v3.3 - 3rd September 2013


# uname -a

Linux edith 3.14-2-amd64 #1 SMP Debian 3.14.15-2 (2014-08-09) x86_64 GNU/Linux


# cat /proc/mdstat

Personalities : [raid6] [raid5] [raid4]
md0 : active raid6 sda2[0] sdd2[4] sdc2[3] sdb2[1]
      5859439616 blocks super 1.2 level 6, 512k chunk, algorithm 2 [4/4] [UUUU]
      bitmap: 1/2 pages [4KB], 1048576KB chunk

unused devices: <none>


As the system boots from the RAID, I thought I could be clever and
simply edit /usr/share/initramfs-tools/scripts/local-top/mdadm and
change the "--assemble" statements to add "--update=bbl" which should
take care of things after a reboot.

It basically runs:
# mdadm --assemble --scan --run --auto=yes

so it would become:
# mdadm --assemble --update=bbl --scan --run --auto=yes


That didn't work. I ended up in the initramfs and had to manually bring
up the RAID as well as LVM to get the machine booted.

Now, according to the manual with the version of mdadm on the machine,
'--update=bbl' is supported, however when asking mdadm directly, it
doesn't seem to be the case:

# mdadm --assemble --update=?

mdadm: Valid --update options are:
     'sparc2.2', 'super-minor', 'uuid', 'name', 'resync',
     'summaries', 'homehost', 'byteorder', 'devicesize',
     'no-bitmap', 'metadata', 'revert-reshape'

So in all likelyhood, this is a Debian packaging issue.

If anyone answers, please CC me as I am not subscribed to the list, thanks.

--
Regards,
Peter

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Add BBL to existing array
  2014-08-27 10:32   ` Add BBL to existing array Peter Hoeg
@ 2014-08-27 11:07     ` NeilBrown
  2014-08-27 11:29       ` Peter Hoeg
  0 siblings, 1 reply; 5+ messages in thread
From: NeilBrown @ 2014-08-27 11:07 UTC (permalink / raw)
  To: Peter Hoeg; +Cc: linux-raid

[-- Attachment #1: Type: text/plain, Size: 2542 bytes --]

On Wed, 27 Aug 2014 18:32:13 +0800 Peter Hoeg <peter@hoeg.com> wrote:

> Hi,
> 
> this isn't so much a question as it trying to document the situation
> with BBL's on Debian jessie, although if I've overlooked something,
> please let me know.
> 
> Purpose: Add BBL to a RAID created by an earlier version of mdadm
> without BBL support.
> 
> # mdadm --version
> 
> mdadm - v3.3 - 3rd September 2013
> 
> 
> # uname -a
> 
> Linux edith 3.14-2-amd64 #1 SMP Debian 3.14.15-2 (2014-08-09) x86_64 GNU/Linux
> 

They should be new enough to handle bbls.

> 
> # cat /proc/mdstat
> 
> Personalities : [raid6] [raid5] [raid4]
> md0 : active raid6 sda2[0] sdd2[4] sdc2[3] sdb2[1]
>       5859439616 blocks super 1.2 level 6, 512k chunk, algorithm 2 [4/4] [UUUU]
>       bitmap: 1/2 pages [4KB], 1048576KB chunk
> 
> unused devices: <none>
> 
> 
> As the system boots from the RAID, I thought I could be clever and
> simply edit /usr/share/initramfs-tools/scripts/local-top/mdadm and
> change the "--assemble" statements to add "--update=bbl" which should
> take care of things after a reboot.
> 
> It basically runs:
> # mdadm --assemble --scan --run --auto=yes
> 
> so it would become:
> # mdadm --assemble --update=bbl --scan --run --auto=yes

Sorry, --update and --scan are incompatible.

> 
> 
> That didn't work. I ended up in the initramfs and had to manually bring
> up the RAID as well as LVM to get the machine booted.

That would have been a good time to wield the --update=bbl seeing you were
assembling the array anyway.


> 
> Now, according to the manual with the version of mdadm on the machine,
> '--update=bbl' is supported, however when asking mdadm directly, it
> doesn't seem to be the case:
> 
> # mdadm --assemble --update=?
> 
> mdadm: Valid --update options are:
>      'sparc2.2', 'super-minor', 'uuid', 'name', 'resync',
>      'summaries', 'homehost', 'byteorder', 'devicesize',
>      'no-bitmap', 'metadata', 'revert-reshape'

Oops.  I forgot to update that list when I added 'bbl' and 'no-bbl'.

Will be fixed in 3.3.3.


Thanks for the report,

NeilBrown


> 
> So in all likelyhood, this is a Debian packaging issue.
> 
> If anyone answers, please CC me as I am not subscribed to the list, thanks.
> 
> --
> Regards,
> Peter
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Add BBL to existing array
  2014-08-27 11:07     ` NeilBrown
@ 2014-08-27 11:29       ` Peter Hoeg
  2014-08-27 11:52         ` NeilBrown
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Hoeg @ 2014-08-27 11:29 UTC (permalink / raw)
  To: linux-raid

Neil,

>> It basically runs:
>> # mdadm --assemble --scan --run --auto=yes
>>
>> so it would become:
>> # mdadm --assemble --update=bbl --scan --run --auto=yes
>
>Sorry, --update and --scan are incompatible.

That explains that...

>> That didn't work. I ended up in the initramfs and had to manually bring
>> up the RAID as well as LVM to get the machine booted.
>
>That would have been a good time to wield the --update=bbl seeing you were
>assembling the array anyway.

I actually did - I ran:

mdadm --assemble --update=bbl /dev/md0

Which returned without error, but it doesn't seem to have changed
anything (or am I looking in the wrong place?)

# mdadm --detail /dev/md0

/dev/md0:
        Version : 1.2
  Creation Time : Fri Jan 11 15:02:11 2013
     Raid Level : raid6
     Array Size : 5859439616 (5588.00 GiB 6000.07 GB)
  Used Dev Size : 2929719808 (2794.00 GiB 3000.03 GB)
   Raid Devices : 4
  Total Devices : 4
    Persistence : Superblock is persistent

  Intent Bitmap : Internal

    Update Time : Wed Aug 27 19:23:06 2014
          State : active
 Active Devices : 4
Working Devices : 4
 Failed Devices : 0
  Spare Devices : 0

         Layout : left-symmetric
     Chunk Size : 512K

           Name : nas2:md0
           UUID : d6c281be:30db3be9:b1316603:00f77a7d
         Events : 190523

    Number   Major   Minor   RaidDevice State
       0       8        2        0      active sync   /dev/sda2
       1       8       18        1      active sync   /dev/sdb2
       3       8       34        2      active sync   /dev/sdc2
       4       8       50        3      active sync   /dev/sdd2

Or is the 4KB mentioned in /proc/mdstat ?

Personalities : [raid6] [raid5] [raid4]
md0 : active raid6 sda2[0] sdd2[4] sdc2[3] sdb2[1]
      5859439616 blocks super 1.2 level 6, 512k chunk, algorithm 2 [4/4] [UUUU]
      bitmap: 1/2 pages [4KB], 1048576KB chunk
                        ^^^^^

unused devices: <none>


>Oops.  I forgot to update that list when I added 'bbl' and 'no-bbl'.
>
>Will be fixed in 3.3.3.

Looking forward to seeing that in Debian in 2017... ;-)

--
Regards,
Peter

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Add BBL to existing array
  2014-08-27 11:29       ` Peter Hoeg
@ 2014-08-27 11:52         ` NeilBrown
  2014-08-27 12:05           ` Peter Hoeg
  0 siblings, 1 reply; 5+ messages in thread
From: NeilBrown @ 2014-08-27 11:52 UTC (permalink / raw)
  To: Peter Hoeg; +Cc: linux-raid

[-- Attachment #1: Type: text/plain, Size: 1008 bytes --]

On Wed, 27 Aug 2014 19:29:08 +0800 Peter Hoeg <peter@hoeg.com> wrote:

> Neil,
> 
> >> It basically runs:
> >> # mdadm --assemble --scan --run --auto=yes
> >>
> >> so it would become:
> >> # mdadm --assemble --update=bbl --scan --run --auto=yes
> >
> >Sorry, --update and --scan are incompatible.
> 
> That explains that...
> 
> >> That didn't work. I ended up in the initramfs and had to manually bring
> >> up the RAID as well as LVM to get the machine booted.
> >
> >That would have been a good time to wield the --update=bbl seeing you were
> >assembling the array anyway.
> 
> I actually did - I ran:
> 
> mdadm --assemble --update=bbl /dev/md0
> 
> Which returned without error, but it doesn't seem to have changed
> anything (or am I looking in the wrong place?)
> 
> # mdadm --detail /dev/md0


A bbl exist separately on each component device.
Try 
   mdadm --examine /dev/sda2

look for
   Bad Block Log : 512 entries available at offset XXX sectors

NeilBrown

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Add BBL to existing array
  2014-08-27 11:52         ` NeilBrown
@ 2014-08-27 12:05           ` Peter Hoeg
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Hoeg @ 2014-08-27 12:05 UTC (permalink / raw)
  To: linux-raid

Neil,

>A bbl exist separately on each component device.
>Try
>   mdadm --examine /dev/sda2
>
>look for
>   Bad Block Log : 512 entries available at offset XXX sectors

Bad Block Log : 512 entries available at offset 81 sectors

You're the man. Thank you so much!

--
Regards,
Peter

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-08-27 12:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20140827090707.GA15857@dolores.internal.speartail.com>
     [not found] ` <20140827192721.57c57c3b@notabene.brown>
2014-08-27 10:32   ` Add BBL to existing array Peter Hoeg
2014-08-27 11:07     ` NeilBrown
2014-08-27 11:29       ` Peter Hoeg
2014-08-27 11:52         ` NeilBrown
2014-08-27 12:05           ` Peter Hoeg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.