首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >选项,仅显示lvs的快照卷。

选项,仅显示lvs的快照卷。
EN

Server Fault用户
提问于 2015-11-04 06:28:18
回答 1查看 1.4K关注 0票数 2

请考虑以下配置:

代码语言:javascript
复制
Hard Disk: /dev/sdb  (Size 10 GB)
VG: vg_root on /dev/sdb
THIN_POOL thin_pool occupying the whole physical extent
lvcreate -y --extents 100%free --thin vg_root/thin_pool

Thin volume on the thin pool
lvcreate --name lv_1 --virtualsize 1GB --thinpool vg_root/thin_pool

Another thin volume on the thin_pool
lvcreate --name lv_2 --virtualize 2GB --thinpool vg_root/thin_pool
mount and create a file of 1 GB on the volume

Snapshot volume for lv_2
lvcreate -y --setactivationskip n --snapshot --thinpool vg_root/thin_pool vg_root/lv_2 --name snapshot1
mount and create a file of 250MB on the volume

是否有一种通过lvs只显示快照卷的方法: snapshot1和snapshot2。

谢谢

EN

回答 1

Server Fault用户

回答已采纳

发布于 2016-10-05 00:16:28

快照使用s标识为lv_attr字段的第一个字符。可以使用-S选择对lv_attr值进行筛选。下面的命令应该可以做到这一点:

代码语言:javascript
复制
lvs -S 'lv_attr =~ ^s'
票数 3
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/733762

复制
相关文章

相似问题

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