zoukankan      html  css  js  c++  java
  • 什么是 lvm 标签,如何添加 / 删除 / 显示 lvm 标签?

    如果您想要激活一个指定的 vg,而不是激活所有的 vg,您可以在 /etc/lvm/lvm.conf 的 volume_list 中添加 lvm 标签。

    编 辑 /etc/lvm/lvm.conf,你可以看到以下注释:


    # If volume_list is defined, each LV is only activated if there is a
    # match against the list.
    # "vgname" and "vgname/lvname" are matched exactly.
    # "@tag" matches any tag set in the LV or VG.
    # "@" matches if any tag defined on the host is also set in the LV or VG
    # volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@" ]

    运行 vgchange 以添加或者删除一个标签:


    # vgchange --addtag test /dev/vg00
    Volume group "vg00" successfully changed

    检查标签是否已经被添加:


    # vgs -o vg_tags /dev/vg00

    VG Tags
    test

    编辑 /etc/lvm/lvm.conf,追加 volume_list 设置:

    volume_list = ["@test"]

    该设置表明,只有标签为test的vg才会被激活。

    删除一个标签:


    # vgchange --deltag test /dev/vg00
    Volume group "vg00" successfully changed

    # vgs -o vg_tags /dev/vg00
    VG Tags

    如果你希望操作 lv,请使用 lvchange 命令而非 vgchange 命令。

  • 相关阅读:
    循环排序总结
    # 区间合并总结
    快慢指针
    #双指针总结
    滑动窗口总结
    leetcode 第 221 场周赛
    剑指 Offer 07. 重建二叉树
    leetcode 406. 根据身高重建队列
    [JLOI2014]松鼠的新家 T22 D71
    软件包管理器 T21 D71
  • 原文地址:https://www.cnblogs.com/danghuijian/p/4400263.html
Copyright © 2011-2022 走看看