首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用lVM获取快照

问使用lVM获取快照
EN

Server Fault用户
提问于 2011-10-23 04:07:34
回答 1查看 55关注 0票数 1

在使用lvcreate命令拍摄逻辑卷的快照时,我发现如下所示:

lvcreate -名称测试-快照-大小=2m /dev/VolGroup/lv_root

我搞不懂这里的“尺寸”到底是什么意思?如果它是要创建的快照的总大小,那么/'s快照如何适合2Mb?

EN

回答 1

Server Fault用户

回答已采纳

发布于 2011-10-23 09:11:45

LVM快照只需要与原始LV不同的空间。因此,如果您创建一个1.0GB卷的LVM快照,快照大小将为0(除了一些元数据之外)。如果您正在更改原始LV上的数据,假设您下载了一个200 be文件,LVM快照将为200 be。如果您已将快照大小设置为2MB,则该快照现在将无法使用,因为它无法写入其余的198 2MB。

摘自手册:

代码语言:javascript
复制
       -s, --snapshot
          Create  a snapshot logical volume (or snapshot) for an existing,
          so called original logical volume (or origin).   Snapshots  pro-
          vide  a  'frozen  image' of the contents of the origin while the
          origin can still be updated. They enable consistent backups  and
          online  recovery of removed/overwritten data/files. The snapshot
          does not need the same amount of storage the origin  has.  In  a
          typical  scenario,  15-20% might be enough. In case the snapshot
          runs out of storage, use lvextend(8) to  grow  it.  Shrinking  a
          snapshot  is  supported by lvreduce(8) as well. Run lvdisplay(8)
          on the snapshot in order to check how much data is allocated  to
          it.   Note  that a small amount of the space you allocate to the
          snapshot is used to track the locations of the chunks  of  data,
          so  you  should  allocate  slightly more space than you actually
          need and monitor the rate at which the snapshot data is  growing
          so you can avoid running out of space.
票数 1
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/324006

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档