Bill Davidsen wrote:
> Not syncing unused area is possible, if there was a way for raid resync
> to ask the fs what blocks are not in use. I.e. get the
> free block list in disk block order. Then raid resync could skip those.
>
Current RAID code supports having a bitmap of dirty stripes, and can
just sync those during recovery. I'm sure Neil could explain it better,
but this is available without worrying about fs type. Now. Today.
This is only when the you reconstruct a disk that was once part of the RAID. If you are adding a brand new disk, all stripes are dirty.
I'm not sure that building the RAID into the filesystem is ever a good idea, it certainly seems likely to either prevent certain RAID devices from being used, or make them perform suboptimally. There are times when being able to move a filesystem to a new device is REALLY useful, and byte copy is more practical than file by file copy.
This happens in two scenarios: an unclean RAID shutdown, and when you have a remote mirror which can be disconnected by network problems.
If the RAID is integrated in the filesystem (or into an object storage system), you can handle the new disk case too.