Skip to contentSkip to conversation

About re-adding disk to raid which havent' bitmap

DISCUSSION majianpeng 1 participant 1 message Oct 23, 2012 MD RAID

lore
Share & tools
lore

majianpeng

author
#0 lore raw

Hi Neil,
At present, re-add operation only useful raid which had bitmap. Through the git-log, i found the commit:

Quoted 13 lines

commit 07d84d109d8beedd68df9da2e4e9f25c8217e7fb

Author: NeilBrown <[email protected]>
Date:   Mon Jun 26 00:27:56 2006 -0700

[PATCH] md: Allow re-add to work on array without bitmaps
When an array has a bitmap, a device can be removed and re-added and only blocks changes since the removal (as recorded in the bitmap) will be resynced. It should be possible to do a similar thing to arrays without bitmaps. i.e. if a device is removed and re-added and *no* changes have been made in the interim, then the add should not require a resync.
This patch allows that option. This means that when assembling an array one device at a time (e.g. during device discovery) the array can be enabled read-only as soon as enough devices are available, but extra devices can still be added without causing a resync.

Q1:why you think " if a device is removed and re-added and *no* changes have been made in the
interim, then the add should not require a resync."?
Q2: Whether intentional or not, remove the device will cause the event of raid changed.So for raid which haven't bitmap,
re-add must failed and only added which cause recovery.
For ssd, recovery will write whole disk.But if user used re-add parameter, he/she know the different of data.So i think it should do something for this.

Thanks!
Jianpeng