Linux_LVM Couldn't find device with uuid

摘要:
LinuxLVM命令导致无法使用uuid查找设备无法查找卷组的所有物理卷帮助!命令“vs”、“vdisplay”、“vgdisplay”和“vscan”导致如下错误:找不到设备

Linux LVM commands result in

  • Couldn't find device with uuid

  • Couldn't find all physical volumes for volume group


Help!  Commands like 'lvs', 'lvdisplay', 'vgdisplay', and 'pvscan' result in an error like the following:

  Couldn't find device with uuid 'R5zG2s-g4yi-ytEO-8Xvk-2B0s-S36G-9nWhXP'.
  Couldn't find all physical volumes for volume group metabackupvg.
  Couldn't find device with uuid 'R5zG2s-g4yi-ytEO-8Xvk-2B0s-S36G-9nWhXP'.
  Couldn't find all physical volumes for volume group metabackupvg.
  Couldn't find device with uuid 'R5zG2s-g4yi-ytEO-8Xvk-2B0s-S36G-9nWhXP'.
  Couldn't find all physical volumes for volume group metabackupvg.
  Couldn't find device with uuid 'R5zG2s-g4yi-ytEO-8Xvk-2B0s-S36G-9nWhXP'.
  Couldn't find all physical volumes for volume group metabackupvg.

  Volume group "metabackupvg" not found

[root@dwetlprod2 ~]# pvscan
  Couldn't find device with uuid 'R5zG2s-g4yi-ytEO-8Xvk-2B0s-S36G-9nWhXP'.
  Couldn't find device with uuid 'R5zG2s-g4yi-ytEO-8Xvk-2B0s-S36G-9nWhXP'.
  Couldn't find device with uuid 'R5zG2s-g4yi-ytEO-8Xvk-2B0s-S36G-9nWhXP'.
  Couldn't find device with uuid 'R5zG2s-g4yi-ytEO-8Xvk-2B0s-S36G-9nWhXP'.
  PV /dev/emcpoweraa1   VG srcdata1vg      lvm2 [50.00 GB / 0    free]
  PV /dev/emcpowerz1    VG srcdata2vg      lvm2 [50.00 GB / 0    free]
  PV /dev/emcpowerj1    VG metalogvg       lvm2 [3.00 GB / 0    free]
  PV /dev/emcpowerl1    VG metalogvg       lvm2 [3.00 GB / 0    free]
  PV /dev/emcpowern1    VG metalogvg       lvm2 [4.99 GB / 0    free]
  PV /dev/emcpowerad1   VG metalogvg       lvm2 [14.00 GB / 0    free]
  PV /dev/emcpowery1    VG auditbackupvg   lvm2 [229.99 GB / 0    free]
  PV /dev/emcpoweru1    VG metabackupvg    lvm2 [45.00 GB / 0    free]
  PV unknown device     VG metabackupvg    lvm2 [69.99 GB / 0    free]
  PV /dev/emcpoweraf1   VG metabackupvg    lvm2 [124.99 GB / 0    free]
  PV /dev/emcpowerv1    VG auditlogvg      lvm2 [3.00 GB / 0    free]
  PV /dev/emcpowerw1    VG auditlogvg      lvm2 [3.00 GB / 0    free]
  PV /dev/emcpowerx1    VG auditlogvg      lvm2 [3.00 GB / 0    free]
  PV /dev/emcpowert1    VG auditlogvg      lvm2 [89.99 GB / 0    free]
  PV /dev/emcpowerb1    VG auditdatavg     lvm2 [25.00 GB / 0    free]
  PV /dev/emcpowerc1    VG auditdatavg     lvm2 [25.00 GB / 0    free]
  PV /dev/emcpowerd1    VG auditdatavg     lvm2 [25.00 GB / 0    free]
  PV /dev/emcpowere1    VG auditdatavg     lvm2 [25.00 GB / 0    free]
  PV /dev/emcpowerk1    VG auditdatavg     lvm2 [25.00 GB / 0    free]
  PV /dev/emcpowerm1    VG auditdatavg     lvm2 [25.00 GB / 0    free]
  PV /dev/emcpowero1    VG auditdatavg     lvm2 [25.00 GB / 0    free]
  PV /dev/emcpowerq1    VG auditdatavg     lvm2 [25.00 GB / 0    free]
  PV /dev/emcpowerp1    VG auditdatavg     lvm2 [25.00 GB / 0    free]
  PV /dev/emcpowerr1    VG auditdatavg     lvm2 [25.00 GB / 0    free]
  PV /dev/emcpowerab1   VG auditdatavg     lvm2 [25.00 GB / 0    free]
  PV /dev/emcpowerf1    VG metadatavg      lvm2 [11.00 GB / 0    free]
  PV /dev/emcpowerg1    VG metadatavg      lvm2 [11.00 GB / 0    free]
  PV /dev/emcpowerh1    VG metadatavg      lvm2 [11.00 GB / 0    free]
  PV /dev/emcpoweri1    VG metadatavg      lvm2 [11.00 GB / 0    free]
  PV /dev/emcpowers1    VG metadatavg      lvm2 [20.00 GB / 0    free]
  PV /dev/emcpowera1    VG metadatavg      lvm2 [20.00 GB / 0    free]
  PV /dev/emcpowerae1   VG metadatavg      lvm2 [14.00 GB / 0    free]
  Total: 32 [1.04 TB] / in use: 32 [1.04 TB] / in no VG: 0 [0   ]

Solution


This scenario indicates that a disk is missing from the volume group.  This is clear since pvscan scans all disks for physical volumes, and it's telling us that it cannot find a device.  In my case, I deleted a LUN from the EMC that I knew was no longer being used, but I forgot to update the LVM configuration.  To correct the issue, I removed the lost physical volume from the volume group using the --removemissing argument of the vgreduce command.

Tip: Run vgreduce with the --test and --verbose options to validate what will be executed and confirm this is what you want to do.

[root@dwetlprod2 ~]# vgreduce --removemissing --verbose metabackupvg
    Finding volume group "metabackupvg"
    Wiping cache of LVM-capable devices
  Couldn't find device with uuid 'R5zG2s-g4yi-ytEO-8Xvk-2B0s-S36G-9nWhXP'.
  Couldn't find all physical volumes for volume group metabackupvg.
  Couldn't find device with uuid 'R5zG2s-g4yi-ytEO-8Xvk-2B0s-S36G-9nWhXP'.
  Couldn't find all physical volumes for volume group metabackupvg.
  Couldn't find device with uuid 'R5zG2s-g4yi-ytEO-8Xvk-2B0s-S36G-9nWhXP'.
  Couldn't find all physical volumes for volume group metabackupvg.
  Couldn't find device with uuid 'R5zG2s-g4yi-ytEO-8Xvk-2B0s-S36G-9nWhXP'.
  Couldn't find all physical volumes for volume group metabackupvg.
  Couldn't find device with uuid 'R5zG2s-g4yi-ytEO-8Xvk-2B0s-S36G-9nWhXP'.
  Couldn't find device with uuid 'R5zG2s-g4yi-ytEO-8Xvk-2B0s-S36G-9nWhXP'.
  Couldn't find device with uuid 'R5zG2s-g4yi-ytEO-8Xvk-2B0s-S36G-9nWhXP'.
  Couldn't find device with uuid 'R5zG2s-g4yi-ytEO-8Xvk-2B0s-S36G-9nWhXP'.
    Archiving volume group "metabackupvg" metadata (seqno 73).
    metabackupvg/backup2lv has missing extents: removing (including dependencies)
    Removing LV backup2lv from VG metabackupvg
    Removing PV with UUID R5zG2s-g4yi-ytEO-8Xvk-2B0s-S36G-9nWhXP from VG metabackupvg
    Creating volume group backup "/etc/lvm/backup/metabackupvg" (seqno 74).
  Wrote out consistent volume group metabackupvg
[root@dwetlprod2 ~]#

If a device needs to be added back, a solution for recovery is to cut another 70G LUN on the EMC, present it to the host and add it back into the volume group with the same UUID.  Read my post on adding a new lun.

[root@dwetlprod2 ~]# pvcreate --uuid R5zG2s-g4yi-ytEO-8Xvk-2B0s-S36G-9nWhXP /dev/emcpowerah
  Physical volume "/dev/emcpowerah" successfully created
[root@dwetlprod2 ~]# vgcfgrestore metabackupvg
  Restored volume group metabackupvg
[root@dwetlprod2 ~]# vgscan
  Reading all physical volumes.  This may take a while...
  Found volume group "srcdata1vg" using metadata type lvm2
  Found volume group "srcdata2vg" using metadata type lvm2
  Found volume group "metalogvg" using metadata type lvm2
  Found volume group "auditbackupvg" using metadata type lvm2
  Found volume group "auditlogvg" using metadata type lvm2
  Found volume group "metabackupvg" using metadata type lvm2
  Found volume group "auditdatavg" using metadata type lvm2
  Found volume group "metadatavg" using metadata type lvm2

Run a file system check on the device then mount it.  If your device (LUN) was mistakenly deleted, or in the case of physical media the disk has gone kaput, then you'll need to restore data from backups.

You may have noticed that I didn't even fdisk the replacement device.  Don't forget to do this step if you will be restoring data and you're restoring to a partition.

免责声明:文章转载自《Linux_LVM Couldn't find device with uuid》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇基于Mix网络的通信系统安全性性能分析【转】Kali更新源下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

Arch Linux 分区设定以及新增用户等命令

一.启动虚拟机  二.进入live(选择第一个) 进入root根目录 cd /  三.硬盘分区   Ⅰ.查看设备信息 fdisk -l 或者 lsblk    Ⅱ.分配空间 cfdisk /dev/sda          Ⅲ.格式化分区 mkfs.fat /dev/sda1 mkswap /dev/sda2 mkfs.ext4 /dev/...

Debian 7 安装 Python3.4

Debian 7 自带的python是2.7.3,要用最新的3.4版本怎么办?我们从官网下载压缩包自己编译。 一、安装编译用的包 1 $ sudo apt-get install build-essential 2 $ sudo apt-get install libncurses5-dev libncursesw5-dev libreadline6-de...

Linux centosVMware 命令 lvm、磁盘故障小案例

一、lvm命令 LVM:逻辑分区管理,可基于动态的扩展缩小硬件设备的使用空间,注意:lvm磁盘复杂,由于使用lvm,数据丢失恢复起来有一定风险。概念:pv、VG、lvpv(物理卷,有pp基本单位构成):物理磁盘VG(卷组,由pv基本单位构成):一个或多个物理磁盘(容量)的集合lv(逻辑卷,由lp基本单位构成):VG下划分出来的使用分区(空间)fs:file...

Linux为普通用户挂载磁盘

问题 都知道mount/umount命令需要root权限 有时候希望将U盘挂载文件夹的所有者设为普通用户方便读写 解决 gnome 使用gnome的系统内置gio mount 挂载 $ gio mount -d /dev/sdb1 Mounted /dev/sdb1 at /media/ubuntu/5459-2B27 卸载 $ gio mount -u...

linux下重新安装grub

介绍 本篇指南会告诉你如果不知什么缘故丢失了GRUB后如何用一张Arch安装光盘重装GRUB。 注意 在这篇指南,我将使用sda1作为我的根udev类型references。如果你使用0.7.1以前的安装光盘,你应该将udev references换成devfs references。如果不明白请参见Technical_Terms#Hard_Drives。...

48 git使用

0 引言git/github是当前最好的代码版本管理和协同工作工具。最近我终于用上了这一先进工具,撒花撒花! # 先把大神廖雪峰的链接献上https://www.liaoxuefeng.com/wiki/896043488029600# 官方教程https://git-scm.com/ 1 配置git使用环境git的使用环境主要包括git的安装、设置SSH...