请考虑以下configuration:
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。
谢谢
快照使用s作为lv_attr字段的第一个字符。 您可以使用-S选项来筛选lv_attr值。 以下命令应该做的伎俩:
lvs -S 'lv_attr =~ ^s'