zoukankan      html  css  js  c++  java
  • Snapshot origin volumes can be resized only while inactive: try lvchange -an

    事件现象:

     

    最近同事在扩展VG时遇到了Snapshot origin volumes can be resized only while inactive: try lvchange -an错误

     

     

      # partprobe

      # mkfs -t ext3 /dev/sdd3

      # pvcreate /dev/sdd3

      # vgextend VolGroup03 /dev/sdd3

      # lvextend -l +40G  /dev/mapper/VolGroup03-LogVol00 /dev/sdd3

      /dev/VolGroup05/LogVol00-PS-user-snapshot: read failed after 0 of 4096 at 279105699840: Input/output error

      /dev/VolGroup05/LogVol00-PS-user-snapshot: read failed after 0 of 4096 at 279105757184: Input/output error

      /dev/VolGroup05/LogVol00-PS-user-snapshot: read failed after 0 of 4096 at 0: Input/output error

      /dev/VolGroup05/LogVol00-PS-user-snapshot: read failed after 0 of 4096 at 4096: Input/output error

      /dev/VolGroup01/LogVol00-PS-user-snapshot: read failed after 0 of 4096 at 85865725952: Input/output error

      /dev/VolGroup01/LogVol00-PS-user-snapshot: read failed after 0 of 4096 at 85865783296: Input/output error

      /dev/VolGroup01/LogVol00-PS-user-snapshot: read failed after 0 of 4096 at 0: Input/output error

      /dev/VolGroup01/LogVol00-PS-user-snapshot: read failed after 0 of 4096 at 4096: Input/output error

      Snapshot origin volumes can be resized only while inactive: try lvchange -an

     

     

     

    出错原因:

     

     

     被扩展的VG存在LVM快照(LVM snapshot),所以扩展VG时出现上面错误。因为这个LVM快照是PlateSpin使用,上面没有什么数据一定需要保留。所以使用lvremove删除逻辑卷LV,然后扩展VG。 最后创建LV解决。

     

     

    解决方案

     

    # stat /dev/VolGroup03/LogVol00-PS-user-snapshot 
    # lvremove /dev/VolGroup03/LogVol00-PS-user-snapshot
    # lvextend -L +40G /dev/mapper/VolGroup03-LogVol00 /dev/sdd3
    # resize2fs /dev/mapper/VolGroup03-LogVol00
    # lvcreate -L 20G -s -n LogVol00-PS-user-snapshot /dev/VolGroup03/LogVol00

     

      如果出于保险起见,那么需要备份LVM快照数据,然后卸载卷组(unmount), 然后就按照上面步骤继续操作

  • 相关阅读:
    html语法
    mysql常见的使用语法
    文件相关命令
    linux文件管理
    mysql常见名词解释
    MySQL初识
    文件管理
    并发基础知识3
    Bash shell初识
    【Spring Boot】ActiveMQ 发布/订阅消息模式介绍
  • 原文地址:https://www.cnblogs.com/kerrycode/p/9138717.html
Copyright © 2011-2022 走看看