About btrfs chunk tree backups
Hi, Chris and Josef
Recently, I am interested in chunk tree backups, which is described in Project ideas web. But I found it is hard to be implemented.
The description said "make the mappings discoverable via a block device scan so that we can recover from corrupted chunk trees", I think it is hard to find the boundary of each stripe, which is the constituent of the chunks, via a block device scan according to the current on-disk data structures. And besides that, even though we find the stripes of each chunks, we still don't know the order of the stripes in one chunk. So I think chunk tree backups is hard to be implemented.
Maybe I made some mistakes in understanding this project idea?
Thanks
Miao
Quoted 13 lines · Miao Xie
Hi, Chris and Josef
Recently, I am interested in chunk tree backups, which is described in Project ideas web. But I found it is hard to be implemented.
The description said "make the mappings discoverable via a block device scan so that we can recover from corrupted chunk trees", I think it is hard to find the boundary of each stripe, which is the constituent of the chunks, via a block device scan according to the current on-disk data structures. And besides that, even though we find the stripes of each chunks, we still don't know the order of the stripes in one chunk. So I think chunk tree backups is hard to be implemented.
Quoted 2 lines
Maybe I made some mistakes in understanding this project idea?
We talked about this some earlier this week. This will require a format change, basically we need to put down some metadata at the start of every chunk so that we can scan the disk and find the chunks. This could probably be done in a backwards compatible way, we just need to make sure the space for the block thats used is taken up in the extent tree so old kernels don't write over the block. Thanks,
Josef
Quoted 17 lines · Josef Bacik
Quoted 13 lines · Miao Xie
Hi, Chris and Josef
Recently, I am interested in chunk tree backups, which is described in Project ideas web. But I found it is hard to be implemented.
The description said "make the mappings discoverable via a block device scan so that we can recover from corrupted chunk trees", I think it is hard to find the boundary of each stripe, which is the constituent of the chunks, via a block device scan according to the current on-disk data structures. And besides that, even though we find the stripes of each chunks, we still don't know the order of the stripes in one chunk. So I think chunk tree backups is hard to be implemented.
Quoted 2 lines
Maybe I made some mistakes in understanding this project idea?
Quoted 6 lines
We talked about this some earlier this week. This will require a format change, basically we need to put down some metadata at the start of every chunk so that we can scan the disk and find the chunks. This could probably be done in a backwards compatible way, we just need to make sure the space for the block thats used is taken up in the extent tree so old kernels don't write over the block. Thanks,
Hi, Josef
Is anyone implementing it now? Maybe we can help him to do some work.
Thanks
Miao
Quoted 3 lines
Josef
Quoted 25 lines · Miao Xie
Quoted 17 lines · Josef Bacik
Quoted 13 lines · Miao Xie
Hi, Chris and Josef
Recently, I am interested in chunk tree backups, which is described in Project ideas web. But I found it is hard to be implemented.
The description said "make the mappings discoverable via a block device scan so that we can recover from corrupted chunk trees", I think it is hard to find the boundary of each stripe, which is the constituent of the chunks, via a block device scan according to the current on-disk data structures. And besides that, even though we find the stripes of each chunks, we still don't know the order of the stripes in one chunk. So I think chunk tree backups is hard to be implemented.
Quoted 2 lines
Maybe I made some mistakes in understanding this project idea?
Quoted 6 lines
We talked about this some earlier this week. This will require a format change, basically we need to put down some metadata at the start of every chunk so that we can scan the disk and find the chunks. This could probably be done in a backwards compatible way, we just need to make sure the space for the block thats used is taken up in the extent tree so old kernels don't write over the block. Thanks,
Quoted 4 lines
Hi, Josef
Is anyone implementing it now? Maybe we can help him to do some work.
Not that I know of. Thanks,
Josef