PV Name [Unknown]

Nico17

New Member
Jan 9, 2025
3
0
1
Hello, I am asking for help after trying different methods without success.
One of my disks /dev/sda had an I/O error
I tried to copie the block on /dev/sdd with DDrescue, it worked BUT I'm not able to add the disk in the VG.

The pvdisplay look like :
Code:
pvdisplay
  --- Physical volume ---
  PV Name               /dev/sdc3
  VG Name               pve
  PV Size               <110.79 GiB / not usable 4.44 MiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              28361
  Free PE               3520
  Allocated PE          24841
  PV UUID               ZJ30d5-IPOM-IQjp-K2i4-6VEW-7d1j-rGMqz2
  
  WARNING: Couldn't find device with uuid MPnClk-O0ci-vgfE-3qc2-T7Tw-oloW-GK3LR9.
  WARNING: VG SSD_STORAGE is missing PV MPnClk-O0ci-vgfE-3qc2-T7Tw-oloW-GK3LR9 (last written to /dev/sda).
  --- Physical volume ---
  PV Name               [unknown]
  VG Name               SSD_STORAGE
  PV Size               894.25 GiB / not usable <3.34 MiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              228928
  Free PE               14336
  Allocated PE          214592
  PV UUID               MPnClk-O0ci-vgfE-3qc2-T7Tw-oloW-GK3LR9
  
  --- Physical volume ---
  PV Name               /dev/sdb
  VG Name               SSD_STORAGE
  PV Size               465.76 GiB / not usable 4.02 MiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              119234
  Free PE               13826
  Allocated PE          105408
  PV UUID               D6cCJQ-L10w-rTc7-iomA-Wzid-0b6l-HdcZVM

And the Fdisk look like
Code:
Disk /dev/sda: 894.25 GiB, 960197124096 bytes, 1875385008 sectors
Disk model: KINGSTON SA400S3
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sdb: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: CT500MX500SSD1 
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/sdc: 111.79 GiB, 120034123776 bytes, 234441648 sectors
Disk model: CT120BX500SSD1 
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 3144D45D-D7BE-4AAA-A651-13A3451C91E3

Device       Start       End   Sectors   Size Type
/dev/sdc1       34      2047      2014  1007K BIOS boot
/dev/sdc2     2048   2099199   2097152     1G EFI System
/dev/sdc3  2099200 234441614 232342415 110.8G Linux LVM


Disk /dev/sdd: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: PNY CS900 1TB SS
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: E69C0933-0F33-492D-AC9E-9FD328F9A58F


Disk /dev/mapper/pve-swap: 8 GiB, 8589934592 bytes, 16777216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/pve-root: 37.7 GiB, 40475033600 bytes, 79052800 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/pve-STK: 465 GiB, 499289948160 bytes, 975175680 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 65536 bytes / 65536 bytes

Anyone can help me?
 
If you have a VG spread out over 2 disks without underlying RAID, that's an unstable solution from the start.

As you are learning firsthand, if a drive goes out (and especially if you don't have backups) then you are kind of screwed without being able to just replace the bad disk and have it resilver with no data loss.

I suggest you look into ZFS. If you want to keep using LVM, then you would be better off making separate lvm-thin spaces across different disks rather than joining them logically. And you should definitely look into RAID, although RAID+LVM is actually more difficult to manage than ZFS

https://search.brave.com/search?q=r...summary=1&conversation=a5357a1c582c98e0e72c0b

https://github.com/kneutron/ansitest/blob/master/proxmox/proxmox-create-additional-lvm-thin.sh
 
I succeeded.
By rescue the disk with ddrecue.
Add the clone to the vg with vgextend.
Remove the corrupted disk with vgreduce (scary when the pv's as been "deleted")
Edit the /etc/archives/myvg.vg to according with the uuid of the clone disk
Restore the VG with vgcfgrestore -f myvg.vg
Retrieve PV's with the datas inside