在使用lvcreate命令拍摄逻辑卷的快照时,我发现如下所示:
lvcreate -名称测试-快照-大小=2m /dev/VolGroup/lv_root
我搞不懂这里的“尺寸”到底是什么意思?如果它是要创建的快照的总大小,那么/'s快照如何适合2Mb?
发布于 2011-10-23 09:11:45
LVM快照只需要与原始LV不同的空间。因此,如果您创建一个1.0GB卷的LVM快照,快照大小将为0(除了一些元数据之外)。如果您正在更改原始LV上的数据,假设您下载了一个200 be文件,LVM快照将为200 be。如果您已将快照大小设置为2MB,则该快照现在将无法使用,因为它无法写入其余的198 2MB。
摘自手册:
-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.https://serverfault.com/questions/324006
复制相似问题