Snapshot origin volumes can be resized only while inactive: try lvchange -an
2018-06-05 11:11 潇湘隐者 阅读(1212) 评论(0) 编辑 收藏 举报事件现象:
最近同事在扩展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), 然后就按照上面步骤继续操作

【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 没有源码,如何修改代码逻辑?
· 一个奇形怪状的面试题:Bean中的CHM要不要加volatile?
· [.NET]调用本地 Deepseek 模型
· 一个费力不讨好的项目,让我损失了近一半的绩效!
· .NET Core 托管堆内存泄露/CPU异常的常见思路
· 微软正式发布.NET 10 Preview 1:开启下一代开发框架新篇章
· 没有源码,如何修改代码逻辑?
· PowerShell开发游戏 · 打蜜蜂
· 在鹅厂做java开发是什么体验
· WPF到Web的无缝过渡:英雄联盟客户端的OpenSilver迁移实战
2017-06-05 SQL Server中sp_spaceused统计数据使用的空间总量不正确的原因