LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1020|回复: 1

关于probing写的“lvm使用手册“的一点疑问!

[复制链接]
发表于 2005-1-18 04:00:05 | 显示全部楼层 |阅读模式
在手册中,有这么一段:


  1. 6 使用snapshot 做备份
  2. 例如我们要对卷组"test_vg"每晚进行数据库备份,就要采用snapshot类型的卷组。这种卷组是其它
  3. 卷组的一个只读拷贝,它含有在创建 snapshot卷组时原卷组的所有数据,这意味你可以备份这个
  4. 卷组而不用担心在备份过程中数据会改变,也不需要暂时关闭数据库卷以备份。

  5. 6.1 建立snapshot卷
  6. 一个snapshot卷可大可小,但必须有足够的空间存放所有在本snapshot卷生存期间改变的数据,一
  7. 般最大要求是原卷组的1.1倍。如空间不够,snapshot卷将不能使用。
  8. # lvcreate -L592M -s -n dbbackup /dev/test_vg/databases
  9. lvcreate -- WARNING: the snapshot must be disabled if it gets full
  10. lvcreate -- INFO: using default snapshot chunk size of 64 KB for "/dev/test_vg/dbbackup"
  11. lvcreate -- doing automatic backup of "test_vg"
  12. lvcreate -- logical volume "/dev/test_vg/dbbackup" successfully created
复制代码


1 上文提到对卷组进行备份,但根据lvcreate的man手册里面所叙述的,snapshot应该是对逻辑卷(LV)进行备份的。
2 关于snapshot的大小的疑问,man手册里面说是原LV的15%-20%,这样是不是有问题,既然snapshot是某一时刻LV的精确备份,那么大小不应该小于原LV啊,即使snapshot可以通过lvextend扩展。

这是lvcreate的man手册中摘录的一段。

-s, --snapshot
Create a snapshot logical volume (or snapshot) for an existing, so called original logical  volume  
(ororigin).   Snapshots  provide 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.


一点愚见,还望大家指正!
发表于 2005-1-20 12:26:56 | 显示全部楼层
snapshot是逻辑上的备份,空间可以小余原来的物理空间的.你仔细的阅读一下
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表