linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How to enable bitmap on IMSM?
@ 2022-06-14  9:14 Roman Mamedov
  2022-06-14 14:45 ` Mariusz Tkaczyk
  0 siblings, 1 reply; 2+ messages in thread
From: Roman Mamedov @ 2022-06-14  9:14 UTC (permalink / raw)
  To: linux-raid

Hello,

I upgraded mdadm to 4.2 to get the bitmap support in IMSM.

I run: "mdadm --update-subarray=0 -U bitmap /dev/md127"
However the array details stay the same, with "Consistency Policy : resync".
No error is reported, and nothing in dmesg.

How to actually use it?

Thanks


# mdadm --detail /dev/md127
/dev/md127:
           Version : imsm
        Raid Level : container
     Total Devices : 4

   Working Devices : 4


              UUID : d07837ca:804cf5e3:01c52352:f64b0524
     Member Arrays : /dev/md/Volume0

    Number   Major   Minor   RaidDevice

       -       8       32        -        /dev/sdc
       -       8        0        -        /dev/sda
       -       8       48        -        /dev/sdd
       -       8       16        -        /dev/sdb

# mdadm --detail /dev/md126
/dev/md126:
         Container : /dev/md/imsm0, member 0
        Raid Level : raid10
        Array Size : 1953519616 (1863.02 GiB 2000.40 GB)
     Used Dev Size : 976759808 (931.51 GiB 1000.20 GB)
      Raid Devices : 4
     Total Devices : 4

             State : active 
    Active Devices : 4
   Working Devices : 4
    Failed Devices : 0

            Layout : near=2
        Chunk Size : 64K

Consistency Policy : resync


              UUID : xxx
    Number   Major   Minor   RaidDevice State
       3       8        0        0      active sync set-A   /dev/sda
       2       8       16        1      active sync set-B   /dev/sdb
       1       8       32        2      active sync set-A   /dev/sdc
       0       8       48        3      active sync set-B   /dev/sdd

# mdadm --update-subarray=0 -U bitmap /dev/md127

# mdadm --detail /dev/md127
/dev/md127:
           Version : imsm
        Raid Level : container
     Total Devices : 4

   Working Devices : 4


              UUID : d07837ca:804cf5e3:01c52352:f64b0524
     Member Arrays : /dev/md/Volume0

    Number   Major   Minor   RaidDevice

       -       8       32        -        /dev/sdc
       -       8        0        -        /dev/sda
       -       8       48        -        /dev/sdd
       -       8       16        -        /dev/sdb

# mdadm --detail /dev/md126
/dev/md126:
         Container : /dev/md/imsm0, member 0
        Raid Level : raid10
        Array Size : 1953519616 (1863.02 GiB 2000.40 GB)
     Used Dev Size : 976759808 (931.51 GiB 1000.20 GB)
      Raid Devices : 4
     Total Devices : 4

             State : active 
    Active Devices : 4
   Working Devices : 4
    Failed Devices : 0

            Layout : near=2
        Chunk Size : 64K

Consistency Policy : resync


              UUID : xxx
    Number   Major   Minor   RaidDevice State
       3       8        0        0      active sync set-A   /dev/sda
       2       8       16        1      active sync set-B   /dev/sdb
       1       8       32        2      active sync set-A   /dev/sdc
       0       8       48        3      active sync set-B   /dev/sdd



-- 
With respect,
Roman

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

* Re: How to enable bitmap on IMSM?
  2022-06-14  9:14 How to enable bitmap on IMSM? Roman Mamedov
@ 2022-06-14 14:45 ` Mariusz Tkaczyk
  0 siblings, 0 replies; 2+ messages in thread
From: Mariusz Tkaczyk @ 2022-06-14 14:45 UTC (permalink / raw)
  To: Roman Mamedov; +Cc: linux-raid

On Tue, 14 Jun 2022 14:14:42 +0500
Roman Mamedov <rm@romanrm.net> wrote:

> Hello,
> 
> I upgraded mdadm to 4.2 to get the bitmap support in IMSM.
> 
> I run: "mdadm --update-subarray=0 -U bitmap /dev/md127"
> However the array details stay the same, with "Consistency Policy : resync".
> No error is reported, and nothing in dmesg.
> 
> How to actually use it?
>

Hi Roman,
There is a bug in mdadm (will be fixed soon) which allows you to update
subarray on active volume. Update is successful but mdmon will overwrite
it.

To enable bitmap, you need to stop member array first:
# mdadm -S /dev/md126

then run update command:
# mdadm --update-subarray=0 -U bitmap /dev/md127

mdadm will set bitmap in metadata:
#mdadm -E /dev/md127

At the end, start member volume:
# mdadm -As

Now, you can verify array details:
# mdadm -D /dev/md126.

Hope it helps,
Mariusz

> Thanks
> 
> 
> # mdadm --detail /dev/md127
> /dev/md127:
>            Version : imsm
>         Raid Level : container
>      Total Devices : 4
> 
>    Working Devices : 4
> 
> 
>               UUID : d07837ca:804cf5e3:01c52352:f64b0524
>      Member Arrays : /dev/md/Volume0
> 
>     Number   Major   Minor   RaidDevice
> 
>        -       8       32        -        /dev/sdc
>        -       8        0        -        /dev/sda
>        -       8       48        -        /dev/sdd
>        -       8       16        -        /dev/sdb
> 
> # mdadm --detail /dev/md126
> /dev/md126:
>          Container : /dev/md/imsm0, member 0
>         Raid Level : raid10
>         Array Size : 1953519616 (1863.02 GiB 2000.40 GB)
>      Used Dev Size : 976759808 (931.51 GiB 1000.20 GB)
>       Raid Devices : 4
>      Total Devices : 4
> 
>              State : active 
>     Active Devices : 4
>    Working Devices : 4
>     Failed Devices : 0
> 
>             Layout : near=2
>         Chunk Size : 64K
> 
> Consistency Policy : resync
> 
> 
>               UUID : xxx
>     Number   Major   Minor   RaidDevice State
>        3       8        0        0      active sync set-A   /dev/sda
>        2       8       16        1      active sync set-B   /dev/sdb
>        1       8       32        2      active sync set-A   /dev/sdc
>        0       8       48        3      active sync set-B   /dev/sdd
> 
> # mdadm --update-subarray=0 -U bitmap /dev/md127
> 
> # mdadm --detail /dev/md127
> /dev/md127:
>            Version : imsm
>         Raid Level : container
>      Total Devices : 4
> 
>    Working Devices : 4
> 
> 
>               UUID : d07837ca:804cf5e3:01c52352:f64b0524
>      Member Arrays : /dev/md/Volume0
> 
>     Number   Major   Minor   RaidDevice
> 
>        -       8       32        -        /dev/sdc
>        -       8        0        -        /dev/sda
>        -       8       48        -        /dev/sdd
>        -       8       16        -        /dev/sdb
> 
> # mdadm --detail /dev/md126
> /dev/md126:
>          Container : /dev/md/imsm0, member 0
>         Raid Level : raid10
>         Array Size : 1953519616 (1863.02 GiB 2000.40 GB)
>      Used Dev Size : 976759808 (931.51 GiB 1000.20 GB)
>       Raid Devices : 4
>      Total Devices : 4
> 
>              State : active 
>     Active Devices : 4
>    Working Devices : 4
>     Failed Devices : 0
> 
>             Layout : near=2
>         Chunk Size : 64K
> 
> Consistency Policy : resync
> 
> 
>               UUID : xxx
>     Number   Major   Minor   RaidDevice State
>        3       8        0        0      active sync set-A   /dev/sda
>        2       8       16        1      active sync set-B   /dev/sdb
>        1       8       32        2      active sync set-A   /dev/sdc
>        0       8       48        3      active sync set-B   /dev/sdd
> 
> 
> 


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

end of thread, other threads:[~2022-06-14 14:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-14  9:14 How to enable bitmap on IMSM? Roman Mamedov
2022-06-14 14:45 ` Mariusz Tkaczyk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).