首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >未激活LVM瘦池

未激活LVM瘦池
EN

Ask Ubuntu用户
提问于 2018-07-26 04:43:58
回答 1查看 2.3K关注 0票数 2

有一场雷雨,Ubuntu 16.04下的服务器不顾UPS关闭了。在服务器上,exchange文件夹(/srv/data)位于samba下。/srv/data从LVM安装一个薄卷vg /thinpool/data

雷暴过后,体积群(vg)和特别是体积(数据)不再被激活。我尝试过lvconvert --repair vg /thinpool没有帮助,尝试使用vgcfrestore恢复元,效果是一样的。我非常需要数据,没有备份。我叫LVM大师!

代码语言:javascript
复制
  lvchange -aey vg
  device-mapper: resume ioctl on (252:2) failed: Invalid argument
  Unable to resume vg-thinpool-tpool (252:2)
  device-mapper: resume ioctl on (252:2) failed: Invalid argument
  Unable to resume vg-thinpool-tpool (252:2)

lvs -a
  LV               VG   Attr       LSize   Pool     Origin Data%  Meta%  Move Log Cpy%Sync Convert
  data             vg   Vwi---tz-- 950.00g thinpool                                               
  [lvol0_pmspare]  vg   ewi-------  16.00g                                                        
  thinpool         vg   twi---tz--   1.79t                                                        
  [thinpool_tdata] vg   Twi-a-----   1.79t                                                        
  [thinpool_tmeta] vg   ewi-ao----  16.00g

lvchange -ay -v vg/data
    Using logical volume(s) on command line.
    Activating logical volume "data" exclusively.
    activation/volume_list configuration setting defined: Checking the list to match vg/data
    Loading vg-thinpool_tmeta table (252:0)
    Suppressed vg-thinpool_tmeta (252:0) identical table reload.
    Loading vg-thinpool_tdata table (252:1)
    Suppressed vg-thinpool_tdata (252:1) identical table reload.
    Executing: /usr/sbin/thin_check -q /dev/mapper/vg-thinpool_tmeta
    Creating vg-thinpool-tpool
    Loading vg-thinpool-tpool table (252:3)
    Resuming vg-thinpool-tpool (252:3)
  device-mapper: resume ioctl on (252:3) failed: Недопустимый аргумент
  Unable to resume vg-thinpool-tpool (252:3)
    Removing vg-thinpool-tpool (252:3)

lvconvert --repair vg/thinpool -v
    activation/volume_list configuration setting defined: Checking the list to match vg/lvol1_pmspare
    Creating vg-lvol1_pmspare
    Loading vg-lvol1_pmspare table (252:2)
    Resuming vg-lvol1_pmspare (252:2)
    activation/volume_list configuration setting defined: Checking the list to match vg/thinpool_tmeta
    Executing: /usr/sbin/thin_repair  -i /dev/mapper/vg-thinpool_tmeta -o /dev/mapper/vg-lvol1_pmspare
truncating metadata device to 4161600 4k blocks
    Piping: /usr/sbin/thin_dump /dev/mapper/vg-lvol1_pmspare
  Transaction id 6466 from pool "vg/thinpool" does not match repaired transaction id 6468 from /dev/mapper/vg-lvol1_pmspare.
    Removing vg-thinpool_tmeta (252:0)
    Removing vg-lvol1_pmspare (252:2)
    Preparing pool metadata spare volume for Volume group vg.
    Archiving volume group "vg" metadata (seqno 13499).
    Creating logical volume lvol2
    Creating volume group backup "/etc/lvm/backup/vg" (seqno 13500).
    Activating logical volume "lvol2" locally.
    activation/volume_list configuration setting defined: Checking the list to match vg/lvol2
    Creating vg-lvol2
    Loading vg-lvol2 table (252:0)
    Resuming vg-lvol2 (252:0)
    Initializing 4,00 KiB of logical volume "vg/lvol2" with value 0.
    Temporary logical volume "lvol2" created.
    Removing vg-lvol2 (252:0)
    Renaming lvol2 as pool metadata spare volume lvol2_pmspare.
  WARNING: If everything works, remove "vg/thinpool_meta0".
  WARNING: Use pvmove command to move "vg/thinpool_tmeta" on the best fitting PV.
EN

回答 1

Ask Ubuntu用户

回答已采纳

发布于 2018-08-08 10:43:14

解决这一问题的方法是逃避池元(仅在可能的情况下:您在VG中有空闲空间,以及当元数据适合时),例如:

代码语言:javascript
复制
thin_dump /dev/mapper/vg02-pool0_tmeta > lvm_meta_dum
lvcreate -n pool0meta2 -L 12G vg02
thin_restore -i lvm_meta_dump -o /dev/mapper/vg02-pool0meta2
lvconvert --thinpool vg02/pool0 --poolmetadata vg02/pool0meta2

见:固定元尺寸

票数 0
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1059559

复制
相关文章

相似问题

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