Skip to content
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

About the design of snapshots #157

Open
antmoveh opened this issue Jan 3, 2023 · 8 comments
Open

About the design of snapshots #157

antmoveh opened this issue Jan 3, 2023 · 8 comments
Labels
kind/design Categorizes issue or PR as related to design.

Comments

@antmoveh
Copy link
Contributor

antmoveh commented Jan 3, 2023

有些快照细节设计,我想和大家讨论一下
① 只有lvm卷支持快照
② 快照的容量需要1:1当前的存储卷大小,当vg卷组容量不足时不允许创建快照。举个例子vg - lvm总容量 - snap总容量 < 新快照容量,则不允许创建,这里的snap等于lvm大小
③ 一旦创建快照后则存储卷不允许扩容,这是因为一旦扩容后,在进行快照恢复的时候存储卷的大小将会还原

暂时想到这么多,有更多的问题请在下边补充

There are some snapshot details I'd like to discuss with you
① Only lvm volumes support snapshots
② The snapshot capacity must be 1:1 of the current volume size. Snapshots cannot be created when the capacity of a vg volume group is insufficient. For example vg - lvm total - snap total < new snap, snap cannot be created. The value here is equal to the lvm size
③ After a snapshot is created, the storage volume cannot be expanded. This is because the capacity of the storage volume will be restored during snapshot restoration

I think of so much for the moment. If you have more questions, please add them below

@fanhaouu
Copy link
Member

fanhaouu commented Jan 3, 2023

about ③: maybe we can extend snapshot size at the same time?

@fanhaouu
Copy link
Member

fanhaouu commented Jan 3, 2023

Snapshot will affect lv performance.Fortunately, this feature is optional.

@antmoveh
Copy link
Contributor Author

antmoveh commented Jan 3, 2023

about ③: maybe we can extend snapshot size at the same time?

The snapshot does not have a capacity at the initial stage. As the volume data changes, the size of the snapshot becomes larger. At most, the size of the snapshot is the same as that of the created lvm volume

@antmoveh antmoveh added the kind/design Categorizes issue or PR as related to design. label Jan 3, 2023
@zhangzhangzf
Copy link

After the lvm is resized, there may be a problem in resizing snapshots at the same time, because there may not be enough physical space, which may cause trouble for snapshot recovery. If this function is placed in the feature gate, it may be acceptable not to allow expansion.

@fanhaouu
Copy link
Member

fanhaouu commented Jan 3, 2023

After the lvm is resized, there may be a problem in resizing snapshots at the same time, because there may not be enough physical space, which may cause trouble for snapshot recovery. If this function is placed in the feature gate, it may be acceptable not to allow expansion.

check available space before expand.

@fanhaouu
Copy link
Member

fanhaouu commented Jan 3, 2023

Snapshots will consume a lot of disk space over time.

@GounGG
Copy link

GounGG commented Jan 10, 2023

快照是否可以考虑上传到S3之类的存储中,安全性更高,才能满足对磁盘依赖较高的需求,如果依赖LVM,会加深底层环境的维护复杂性。

@antmoveh
Copy link
Contributor Author

快照是否可以考虑上传到S3之类的存储中,安全性更高,才能满足对磁盘依赖较高的需求,如果依赖LVM,会加深底层环境的维护复杂性。

这个lvm snapshot 同步到s3,这个没弄过。 你能提供一下实现思路吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/design Categorizes issue or PR as related to design.
Projects
None yet
Development

No branches or pull requests

4 participants