Question about resync in RAID5
Dear Raid experts,
I have a soft RAID5 volume and after one disk failed I replaced it with a new hard-disk. Then the raid5 volume begin to resync with WHOLE new disk.
There is only 1G data in the RAID5 volume so I think resync whole disk is not efficient.
Take ZFS for example, when replacing with a new disk, it only resync the data which are written after the creation of the volume.
Is there any method to just resync WRITTEN data to new-added-disk ? Or any developing plan to add this feature?
Quoted 10 lines · Robin Dong
Dear Raid experts,
I have a soft RAID5 volume and after one disk failed I replaced it with a new hard-disk. Then the raid5 volume begin to resync with WHOLE new disk.
There is only 1G data in the RAID5 volume so I think resync whole disk is not efficient.
Take ZFS for example, when replacing with a new disk, it only resync the data which are written after the creation of the volume.
Quoted 2 lines
Is there any method to just resync WRITTEN data to new-added-disk ? Or any developing plan to add this feature?
No, because md is a block device it has no knowledge of what data has actually been written to the disk or where it is stored. This means it has to rebuild the entire disk.
There are plans to improve this by keeping track of which stripes have been written to, which should help (and will also mean no need for an initial RAID sync). I don't know whether this has progressed beyond the idea stage yet though.
The alternative is to use a filesystem which incorporates RAID, hence knows what needs keeping in sync (ZFS, possibly btrfs - I don't know where they're up to with that).
Cheers,
Robin
Signature · 4 lines
___
( ' } | Robin Hill <[email protected]> |
/ / ) | Little Jim says .... |
// !! | "He fallen in de water !!" |Quoted 11 lines
Quoted 2 lines
Is there any method to just resync WRITTEN data to new-added-disk ? Or any developing plan to add this feature?
No, because md is a block device it has no knowledge of what data has actually been written to the disk or where it is stored. This means it has to rebuild the entire disk.
There are plans to improve this by keeping track of which stripes have been written to, which should help (and will also mean no need for an initial RAID sync). I don't know whether this has progressed beyond the idea stage yet though.
Interesting - do you have any docs about this? I haven't seen any talk on this list about it...
Vennlige hilsener / Best regards
roy
--
Roy Sigurd Karlsbakk
(+47) 98013356
[email protected]
http://blogg.karlsbakk.net/
GPG Public key: http://karlsbakk.net/roysigurdkarlsbakk.pubkey.txt
--
I all pedagogikk er det essensielt at pensum presenteres intelligibelt. Det er et elementært imperativ for alle pedagoger å unngå eksessiv anvendelse av idiomer med xenotyp etymologi. I de fleste tilfeller eksisterer adekvate og relevante synonymer på norsk. --
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 7 lines · Roy Sigurd Karlsbakk
Quoted 7 lines
Quoted 2 lines
Is there any method to just resync WRITTEN data to new-added-disk ? Or any developing plan to add this feature?
No, because md is a block device it has no knowledge of what data has actually been written to the disk or where it is stored. This means it has to rebuild the entire disk.
Quoted 8 lines
Quoted 4 lines
There are plans to improve this by keeping track of which stripes have been written to, which should help (and will also mean no need for an initial RAID sync). I don't know whether this has progressed beyond the idea stage yet though.
Interesting - do you have any docs about this? I haven't seen any talk on this list about it...
It's from Neil's 2011 MD/RAID roadmap:
http://neil.brown.name/blog/20110216044002
The basic idea was mentioned in a 2009 roadmap as well, but is a lot more fleshed out in the above one.
Cheers,
Robin
Signature · 4 lines
___
( ' } | Robin Hill <[email protected]> |
/ / ) | Little Jim says .... |
// !! | "He fallen in de water !!" |A message that is not in the archive (sent off-list or not yet received): CANsebLH0PcjV2nmcQ0TmEE_8XxF6pi53baSenV3qKwdRxioK+Q@mail.gmail.com
Quoted 26 lines · On Wed, 17 Apr 2013 12:29:07 +0800 Robin Dong <[email protected]> wrote:
2013/4/17 Robin Hill <[email protected]>
Quoted 15 lines · Roy Sigurd Karlsbakk
Quoted 13 lines
Quoted 12 lines
Quoted 3 lines
Is there any method to just resync WRITTEN data to new-added-disk ? Or any developing plan to add this feature?
No, because md is a block device it has no knowledge of what data has actually been written to the disk or where it is stored. This means it has to rebuild the entire disk.
There are plans to improve this by keeping track of which stripes have been written to, which should help (and will also mean no need for an initial RAID sync). I don't know whether this has progressed beyond the idea stage yet though.
Quoted 8 lines
Quoted 3 lines
Interesting - do you have any docs about this? I haven't seen any talk on this list about it...
It's from Neil's 2011 MD/RAID roadmap:
http://neil.brown.name/blog/20110216044002The basic idea was mentioned in a 2009 roadmap as well, but is a lot more fleshed out in the above one.
Quoted 7 lines
Hi, Neil
Has anyone began to develope non-sync-bitmap feature? If not, I want to take a chance.
Will the non-sync-bitmap be built on the write-intent-bitmap or I need to create a new bitmap in 'array state info' of v1.x metadata?
Hi Robin et al,
No, no implementation has been started.
You cannot use the same bits as the write intent bitmap as they mean something different. But you could possibly use the same storage space. i.e. have an alternate style of bitmap where there are two bits per 'chunk'. One bit maps "this was written recently, a resync might be needed after a crash" and the other means "This has been written since array create, so the chunk needs to be recovered to any spare".
I don't know if this is the best approach - I haven't really thought about it much.
There are several parts to this:
1/ decide how to store the new bitmap on disk, and implement that 2/ decide how to store the new bitmap in memory and implement that.
It might be the same...
3/ Set a bit in the new bitmap on each write (if it isn't set), and
trigger a resync of that chunk.
4/ Update the recovery process for each level to honour this new bit 5/ Allow "discard" operations to clear these bits.
If you do proceed with this, feel free to post a more concrete design before proceeding to code - or just post code if you prefer.
NeilBrown
Quoted 60 lines · NeilBrown
Quoted 26 lines · On Wed, 17 Apr 2013 12:29:07 +0800 Robin Dong <[email protected]> wrote:
2013/4/17 Robin Hill <[email protected]>
Quoted 15 lines · Roy Sigurd Karlsbakk
Quoted 13 lines
Quoted 12 lines
Quoted 3 lines
Is there any method to just resync WRITTEN data to new-added-disk ? Or any developing plan to add this feature?
No, because md is a block device it has no knowledge of what data has actually been written to the disk or where it is stored. This means it has to rebuild the entire disk.
There are plans to improve this by keeping track of which stripes have been written to, which should help (and will also mean no need for an initial RAID sync). I don't know whether this has progressed beyond the idea stage yet though.
Quoted 8 lines
Quoted 3 lines
Interesting - do you have any docs about this? I haven't seen any talk on this list about it...
It's from Neil's 2011 MD/RAID roadmap:
http://neil.brown.name/blog/20110216044002The basic idea was mentioned in a 2009 roadmap as well, but is a lot more fleshed out in the above one.
Quoted 7 lines
Hi, Neil
Has anyone began to develope non-sync-bitmap feature? If not, I want to take a chance.
Will the non-sync-bitmap be built on the write-intent-bitmap or I need to create a new bitmap in 'array state info' of v1.x metadata?Hi Robin et al,
No, no implementation has been started.
You cannot use the same bits as the write intent bitmap as they mean something different. But you could possibly use the same storage space. i.e. have an alternate style of bitmap where there are two bits per 'chunk'. One bit maps "this was written recently, a resync might be needed after a crash" and the other means "This has been written since array create, so the chunk needs to be recovered to any spare".
I don't know if this is the best approach - I haven't really thought about it much.
There are several parts to this:
1/ decide how to store the new bitmap on disk, and implement that 2/ decide how to store the new bitmap in memory and implement that.
It might be the same...
3/ Set a bit in the new bitmap on each write (if it isn't set), and
trigger a resync of that chunk.
4/ Update the recovery process for each level to honour this new bit 5/ Allow "discard" operations to clear these bits.
Quoted 4 lines
If you do proceed with this, feel free to post a more concrete design before proceeding to code - or just post code if you prefer.
NeilBrown
I would suggest using two bitmaps instead of one with 2bits per chunk. Why?
- possibly different granularity for each bitmap
- write/rewrite of blocks independent of first write/discard, they change with different frequency. Esspecially when discarding from a cron job instead on-the-fly through the FS.
Maybe not even use a bitmap for discard. Some tree form that would be able to handle both block sized chunks being discarded and gigabytes of continious space being in the same state. Something that uses a bitmap for parts that fragment down to block sized chunks and segments for continious blocks.
MfG
Goswin