-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support backup on volumeMode block via Data mover (Kopia) #6548
Comments
@shubham-pampattiwar Considering that FSB and data mover backup work differently, it would be better to split this into two separate issues. |
I am looking into what is needed to support Block PVCs for data mover path so I tried to run a backup to see what will fail. PVC provisioned from the snapshot is Pending and the error message is “failed pre-populate data from snapshot d7f830c4-280c-11ee-8a47-0242ac110003: exit status 1: tar: invalid magic”.
PVC VolumeMode is Filesystem instead of Block.
|
Block level backup is an valuable feature and it has been around the discussion in several occasions. However, we cannot implement this based on the current FS level data mover. Reasons:
Totally speaking, we need a new uploader and also a new data format/organization of backup repo. And as you can see in the Unified Repository design and Volume Snapshot Data Mover design, we have left spaces for the new uploader and repo module. |
Pod Volume Backup is even impossible even if it supports reading data from block level because it is totally inconsistent from the block level, as a result, the volume restored will be corrupted and cannot be mount |
@Lyndon-Li, You bring up some good points but we should distinguish between FSB and new data mover path and focus only on the latter. Since snapshot is going to be taken of the block PV, it should be ok to read the device as a file and back it up. I agree that CBT would help but it is going to take long while - first for Kubernetes to agree on the API and then for CSI drivers to implement it. It would be better to have a solution in place before then. Also note that Kopia will dedup all the zero blocks in the device but we cannot avoid the overhead of reading the device. Finally, we supported Block PVCs at CloudCasa using Kopia for a while and it is certainly doable. @dzaninovic is exploring Velero data mover code (see his test results above) and he will soon update with his findings about possible fixes. |
@draghuram @Lyndon-Li Updated the issue title and description, lets use this issue for data mover. |
Yes, it is doable to read from a block device. However, we cannot do this by kopia uploader, because Kopia uploader is a file system uploader. Whereas to read block data:
By that I mean, we will need a new uploader, i.e., block uploader, to do the block device backup. |
If we back up the entire block device data as a single file and put it to kopia repository, or the file should be represented as a object in the repo, it indeed works. |
By all the above, I am not saying the current data movement architecture doesn't support block level backup and as I've mentioned above, we have left space for block level backup in the Unified Repo design and Volume Snapshot Data Movement design. Therefore, we can discuss this for the plan of 1.13 and see what can be included. |
For 1.12, the current data mover code deliberately set the Moreover, in the document of data mover which will be ready for review around next week, we will clarify that the current data mover only supports file system mode backup. |
@draghuram See my comments above. Thanks. |
I agree that CBT is the right way to go for block PV backups but it will take some time for the current Kubernetes CBT proposal to reach GA and for CSI drivers to implement it. In the meanwhile, it will be good for Velero to have a decent solution. It is possible to read the device and back it up as a file using Kopia (as we have done in CloudCasa). I think it would be best to have a POC implementation and then discuss. |
@draghuram On the other hand, this way is not compatible with the final block level backup target we want:
Originally, I thought we at least need to have each phase compatible with the final target so that we can make an evolution gradually. I will further discuss this with more members and get you back if any. |
Thanks @Lyndon-Li. I think we are in agreement as what I have been talking about is same as your "Phase-0". |
In our internal discussion, we found it's not very clear how it will be implemented, if the change is not minimal I would suggest there can be a simple design to make sure there's no break change and does not block moving towards the longer term goal described in |
@reasonerjt I suspect a discussion in upcoming community calls is required before coming to any conclusions. To your point designs are always helpful. |
@pradeepkchaturvedi the hope here is that we can get this into a 1.12.x not 1.13.0. Perhaps some discussion? |
@weshayutin to facilitate getting this into 1.12.x, we have a PR that adds the new field needed to implement this to the provider interface but without implementing it -- i.e. it will error out for block mode volumes, with the hope of adding support for block mode in 1.12.x. We'd like to get that PR into 1.12.0 so that we get the API modified with the necessary new field before anyone is using it, but actual implementation of block mode support would come in a later patch release. That PR is here: #6608 |
Hello folks, if we need to have a quick one off outside the community calls, I would be willing to join and explain my thought process for the implementation PR and the rest of the design. Right now, the design and implementation PR is out of sync, and I am testing out @Lyndon-Li suggestion to use the virtualfs package before making the changes to the design. If we need them to match right now, I can do an interim update though please let me know what you want and/or how to move this forward. |
@weshayutin If community maintainers agree to address this in 1.12.x, I would recommend to update the milestone accordingly. cc: @reasonerjt |
Here is the code on which the design was based on: I got the backup and restore to work but this is still work in progress so we will work on improving it. |
I created a PR #6680 for this issue. |
Since I got reassigned to work on another high priority internal project I can't find enough time to work on this so @sshende-catalogicsoftware will take over this work. |
Describe the problem/challenge you have
Currently Velero Datamover does not support backup for PVs whose volumeMode is
Block
.Describe the solution you'd like
Make Velero Datamover Backup and restore operations work for PVs with
volumeMode
asBlock
Anything else you would like to add:
Environment:
velero version
):kubectl version
):/etc/os-release
):Vote on this issue!
This is an invitation to the Velero community to vote on issues, you can see the project's top voted issues listed here.
Use the "reaction smiley face" up to the right of this comment to vote.
The text was updated successfully, but these errors were encountered: