linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* why a bitmap file never changes?
@ 2007-08-29  8:45 Tomasz Chmielewski
  2007-08-29  9:06 ` Tomasz Chmielewski
  0 siblings, 1 reply; 3+ messages in thread
From: Tomasz Chmielewski @ 2007-08-29  8:45 UTC (permalink / raw)
  To: Linux-Raid

I'm just synchronizing a local LVM volume to the remote one using md and 
a bitmap file, as suggested by Neil Brown ("how to synchronize two 
devices (RAID-1, but not really?)" thread from 15 May 2007):


mdadm --build /dev/md11 --level=1 --bitmap=/root/backup-bitmap \
--write-behind --raid-disks=2 /dev/san1/backup \
--write-mostly /dev/iscsi/....../part


Certainly, it takes a while to complete this operation.

I noticed that the bitmap file never changes as the devices are being 
synced - md5sum stays always the same, no matter if resync progress was 
10, 30, or 90%:

# md5sum /root/backup-bitmap
e8e0c4a8424dfd4d487b8facd231ce76  /root/backup-bitmap

# ls -l /root/backup-bitmap
-rw-r--r-- 1 root root 80676 2007-08-27 18:35 /root/backup-bitmap

The date of the file is the date of creation of this array, and as I 
look inside, it's basically almost empty. When looking in a hex editor, 
zeroes (+bitm etc.)at the beginning, and than FF to the end.


Is it normal?


# mdadm -D /dev/md11
/dev/md11:
         Version : 00.90.03
   Creation Time : Mon Aug 27 18:35:32 2007
      Raid Level : raid1
      Array Size : 658800640 (628.28 GiB 674.61 GB)
     Device Size : 658800640 (628.28 GiB 674.61 GB)
    Raid Devices : 2
   Total Devices : 2
Preferred Minor : 11
     Persistence : Superblock is not persistent

   Intent Bitmap : /root/backup-bitmap

     Update Time : Mon Aug 27 18:39:22 2007
           State : active, resyncing
  Active Devices : 2
Working Devices : 2
  Failed Devices : 0
   Spare Devices : 0

  Rebuild Status : 91% complete

     Number   Major   Minor   RaidDevice State
        0     254       47        0      active sync   /dev/dm-47
        1       8       48        1      active sync writemostly   /dev/sdd


# cat /proc/mdstat
Personalities : [raid1]
md11 : active raid1 sdd[1](W) dm-47[0]
       658800640 blocks super non-persistent [2/2] [UU]
       [==================>..]  resync = 91.8% (605314368/658800640) 
finish=65.6min speed=13584K/sec
       bitmap: 315/315 pages [1260KB], 1024KB chunk, file: 
/root/backup-bitmap




-- 
Tomasz Chmielewski
http://wpkg.org


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

* Re: why a bitmap file never changes?
  2007-08-29  8:45 why a bitmap file never changes? Tomasz Chmielewski
@ 2007-08-29  9:06 ` Tomasz Chmielewski
  2007-08-31 10:32   ` Tomasz Chmielewski
  0 siblings, 1 reply; 3+ messages in thread
From: Tomasz Chmielewski @ 2007-08-29  9:06 UTC (permalink / raw)
  To: Linux-Raid

Tomasz Chmielewski schrieb:

> The date of the file is the date of creation of this array, and as I 
> look inside, it's basically almost empty. When looking in a hex editor, 
> zeroes (+bitm etc.)at the beginning, and than FF to the end.
> 
> 
> Is it normal?

Here is some more info about the bitmap itself - it's 100% dirty, what 
does it mean?

# mdadm -X /root/backup-bitmap
         Filename : /root/backup-bitmap
            Magic : 6d746962
          Version : 4
             UUID : 00000000.00000000.00000000.00000000
           Events : 0
   Events Cleared : 0
            State : OK
        Chunksize : 1 MB
           Daemon : 5s flush period
       Write Mode : Allow write behind, max 256
        Sync Size : 658800640 (628.28 GiB 674.61 GB)
           Bitmap : 643360 bits (chunks), 643360 dirty (100.0%)


-- 
Tomasz Chmielewski
http://wpkg.org

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

* Re: why a bitmap file never changes?
  2007-08-29  9:06 ` Tomasz Chmielewski
@ 2007-08-31 10:32   ` Tomasz Chmielewski
  0 siblings, 0 replies; 3+ messages in thread
From: Tomasz Chmielewski @ 2007-08-31 10:32 UTC (permalink / raw)
  To: Linux-Raid

Tomasz Chmielewski schrieb:
> Tomasz Chmielewski schrieb:
> 
>> The date of the file is the date of creation of this array, and as I 
>> look inside, it's basically almost empty. When looking in a hex 
>> editor, zeroes (+bitm etc.)at the beginning, and than FF to the end.
>>
>>
>> Is it normal?
> 
> Here is some more info about the bitmap itself - it's 100% dirty, what 
> does it mean?
> 
> # mdadm -X /root/backup-bitmap
>         Filename : /root/backup-bitmap
>            Magic : 6d746962
>          Version : 4
>             UUID : 00000000.00000000.00000000.00000000
>           Events : 0
>   Events Cleared : 0
>            State : OK
>        Chunksize : 1 MB
>           Daemon : 5s flush period
>       Write Mode : Allow write behind, max 256
>        Sync Size : 658800640 (628.28 GiB 674.61 GB)
>           Bitmap : 643360 bits (chunks), 643360 dirty (100.0%)

After the drives synchronized, the bitmap file was no longer 100% dirty.

So, I guess it gets 100% dirty when there is a substantial activity 
going on? Like resync, for example.


-- 
Tomasz Chmielewski
http://wpkg.org

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

end of thread, other threads:[~2007-08-31 10:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-29  8:45 why a bitmap file never changes? Tomasz Chmielewski
2007-08-29  9:06 ` Tomasz Chmielewski
2007-08-31 10:32   ` Tomasz Chmielewski

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).