如何通过“找不到设备”来修复失败的LVM卷?


1

在我的arch linux机箱上进行相当标准的升级后的下一次启动时,系统无法启动并在维护模式下停止;我发现如果我在/ etc / fstab中注释了我在辅助磁盘上的lvm分区(我的root和home不在LVM中),它接受启动。

现在它运行正常但我无法访问此分区上的数据,并且无法创建必要的设备。 LVM的各种扫描命令告诉我: “警告:过滤器未发现或拒绝PV WbbZgi-PEpk-mWNz-faCX-IT1n-Vrsd-wFoGOP设备。” 我没有更改任何配置,我在/etc/lvm/lvm.conf中没有任何过滤器。以下是我认为相关的一些信息:

[root@bureau64 ~]# cat /etc/fstab
# /dev/sdb3
UUID=a2b6fa8e-1255-4563-b126-153c5a9178b5   /           btrfs       rw,noatime,ssd,space_cache,subvolid=5,subvol=/  0 0
# /dev/sdb4
UUID=a8c42099-3ec2-4bb9-b0ea-a126167523ef   /home       btrfs       rw,noatime,ssd,space_cache,subvolid=5,subvol=/  0 0
# /dev/sdb1
UUID=bc6e027d-ae37-419e-b394-02d4674e693f   /boot       ext2        rw,relatime,block_validity,barrier,user_xattr,acl   0 2
# /dev/sdb2
UUID=839a15de-bd4d-47a1-9727-6a9d394d741a   none        swap        defaults    0 0
## THE ONE I HAD TO COMMENT :
#/dev/VGroupe0/data             /data       ext4        rw,data=ordered 0 2

[root@bureau64 ~]# ls /dev/VGroupe0
ls: impossible d'accéder à '/dev/VGroupe0': Aucun fichier ou dossier de ce type

[root@bureau64 ~]# pvscan 
  WARNING: Device for PV WbbZgi-PEpk-mWNz-faCX-IT1n-Vrsd-wFoGOP not found or rejected by a filter.
  PV /dev/sda4   VG VGroupe0        lvm2 [217,46 GiB / 168,00 MiB free]
  PV [unknown]   VG VGroupe0        lvm2 [107,57 GiB / 77,57 GiB free]
  Total: 2 [<325,04 GiB] / in use: 2 [<325,04 GiB] / in no VG: 0 [0   ]

[root@bureau64 ~]# lvscan 
  WARNING: Device for PV WbbZgi-PEpk-mWNz-faCX-IT1n-Vrsd-wFoGOP not found or rejected by a filter.
  inactive          '/dev/VGroupe0/root' [25,00 GiB] inherit
  inactive          '/dev/VGroupe0/home' [5,00 GiB] inherit
  inactive          '/dev/VGroupe0/data' [<217,30 GiB] inherit

[root@bureau64 ~]# blkid 
/dev/sda1: UUID="0C60E75260E740D6" TYPE="ntfs" PARTUUID="c169c169-01"
/dev/sda2: UUID="395e11a4-6841-455c-b2f6-ff84d8d73f49" TYPE="ext2" PARTUUID="c169c169-02"
/dev/sda3: LABEL="swap" UUID="bf964fa7-8690-4111-89d1-7cbbc0a1df43" TYPE="swap" PARTUUID="c169c169-03"
/dev/sda4: UUID="CF3ZqC-JNaF-BMlE-uCT8-Mv0E-dfPm-a2vmea" TYPE="LVM2_member" PARTUUID="c169c169-04"
/dev/sdb1: UUID="bc6e027d-ae37-419e-b394-02d4674e693f" TYPE="ext2" PARTUUID="a294f4fa-01"
/dev/sdb2: UUID="839a15de-bd4d-47a1-9727-6a9d394d741a" TYPE="swap" PARTUUID="a294f4fa-02"
/dev/sdb3: UUID="a2b6fa8e-1255-4563-b126-153c5a9178b5" UUID_SUB="22f83bf4-0c48-44ad-b016-7edf820c365e" TYPE="btrfs" PARTUUID="a294f4fa-03"
/dev/sdb4: UUID="a8c42099-3ec2-4bb9-b0ea-a126167523ef" UUID_SUB="ae03aa3d-8823-47ea-83b2-53f584e03e59" TYPE="btrfs" PARTUUID="a294f4fa-04"

我不完全记得我的LVM分区的配置,卷'root'和'home'来自之前的安装,我不关心它们,但我非常关心'数据'。如何解决此问题并再次挂载我的分区?


您的系统只有两个硬盘吗?
Ignacio Vazquez-Abrams

是的:我后来安装了一个HD和一个SSD,因此LVM卷中的旧root和home。
Guillaume Deshors

Answers:


0

vgreduce --removemissing --force centos

(在我的情况下,centos是VG名称替换为您各自的VG名称)

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.