On 2019/2/12 下午3:55, Remi Gauvin wrote:
> On 2019-02-12 2:47 a.m., Qu Wenruo wrote:
>>
>>
>> Consider this use case:
>>
>> One btrfs with 2 devices, RAID1 for data and metadata.
>>
>> One day devid 2 got failure, and before replacement arrives, user can
>> only use devid 1 alone. (Maybe that's the root fs).
>>
>> Then new disk arrived, user replaced the missing device, caused SINGLE
>> or DUP chunks on devid 1, and more importantly, some metadata/data is
>> already in DUP/SINGLE chunks.
>>
> 
> 
> Maybe the btrfs-replace command can have some magic logic attached that
> checks for single/dup chunks after completion and either launches an
> automatic convert, or prompts the user that one is probably needed?

The problem is, how btrfs-progs know which chunks are old existing
chunks and which are new chunks created by balance?

I considered this method, but kernel fix without creating unnecessary
chunks are way more cleaner.

Thanks,
Qu
> 
> 
> 

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to