mdadm: bitmap size
Hi all, i have this problem:
I am going to do raid 1 over two virtual devices. These virtual devices are two hard disks situated on other two servers.
The problem is:
A network failure could happen often, and if it happen, i don't want to recover all the disks. I want to recover just last changed things.
As i can see the bitmap do exactly this, but the default bitmap is too small!
There is no problem to have a bitmap file of 1 Gb, but i can't find the way to tell to mdadm the size to use for the bitmap file.
Thanks,
Stefano.
Quoted 11 lines · On Friday May 19, [email protected] wrote:
Hi all, i have this problem:
I am going to do raid 1 over two virtual devices. These virtual devices are two hard disks situated on other two servers.
The problem is:
A network failure could happen often, and if it happen, i don't want to recover all the disks. I want to recover just last changed things.As i can see the bitmap do exactly this, but the default bitmap is too small!
Why do you say that?
Are you using an internal bitmap, or a bitmap in a separate file?
Quoted 2 lines
There is no problem to have a bitmap file of 1 Gb, but i can't find the way to tell to mdadm the size to use for the bitmap file.
The only way to control the size of the bitmap is the change the bitmap chunk size.
Warning: if you have more than 1 million bits in the bitmap, the kernel may fail in memory allocation and may not be able to assemble your array.
NeilBrown
A message that is not in the archive (sent off-list or not yet received): [email protected]
(Please don't reply off-list. If the conversation starts on the list, please leave it there unless there is a VERY GOOD reason).
Quoted 17 lines · On Monday May 22, [email protected] wrote:
Quoted 7 lines · Neil Brown
Quoted 2 lines · On Friday May 19, [email protected] wrote:
As i can see the bitmap do exactly this, but the default bitmap is too small!
Why do you say that?
Are you using an internal bitmap, or a bitmap in a separate file?I was using bitmap in a separate file.
Why i said that tha bitmap is too small? I try to explain:the raid device is a raid1, created on
/dev/md0trought mdadm, and the bitmap use a 4 kb chunk-size on external file (in root directory)
Quoted 8 lines
setfaulty
/dev/md0/dev/nda
raidhotremove/dev/md0/dev/nda
cd/mnt/md0
wget http://... (240 kb file...)
raidhotadd/dev/md0/dev/ndaAnd now dmesg said that the bitmap was obsolete (0<1 or something like that) and that the md driver will force a total recovery.
raidhotadd doesn't know anything about bitmaps.
If you use 'mdadm /dev/mda --add /dev/nda' you should find that it works better.
I recommend getting rid of setfaulty / raidhotadd /raidhotremove etc and just using mdadm.
NeilBrown
Quoted 21 lines
A recovery of 40 gb for a 240 kb file is a little bit expensive.. :-)
Unfortunately i cannot give you the exact output because the server is down now.:-|
The only way to control the size of the bitmap is the change the
Quoted 1 line
bitmap chunk size.
Okay thanks.
Warning: if you have more than 1 million bits in the bitmap, the
Quoted 2 lines
kernel may fail in memory allocation and may not be able to assemble your array.
Thankyou for your help.
Stefano.
Quoted 3 lines · Neil Brown
(Please don't reply off-list. If the conversation starts on the list, please leave it there unless there is a VERY GOOD reason).
Sorry this wasn't my intent.
Quoted 7 lines
raidhotadd doesn't know anything about bitmaps.
If you use 'mdadm/dev/mda--add/dev/nda' you should find that it works better.I recommend getting rid of setfaulty / raidhotadd /raidhotremove etc and just using mdadm.
Okay, thankyou. :-)
Stefano.
Quoted 7 lines · Ste
Quoted 7 lines
raidhotadd doesn't know anything about bitmaps.
If you use 'mdadm/dev/mda--add/dev/nda' you should find that it works better.I recommend getting rid of setfaulty / raidhotadd /raidhotremove etc and just using mdadm.
Okay now it works really fine. You could write somewere to not mix mdadm and standard raidtools.
Thanks a lot!
Bye! :-)