Eu tenho lutado contra esse problema há algum tempo.
Eu tenho um Volume Lógico com 3 discos, 1.5TB, 2TB e 3TB. A unidade de 1,5 TB está falhando. Muitos erros de I / O e setores defeituosos.
Eu comecei pvmove para mover as extensões existentes na unidade com falha para a unidade de 3 TB (há espaço suficiente à esquerda).
Mudei 99% das extensões, mas o último percentual parece ser impossível de ler. A leitura falha e pvm sai.
Este é o estado atual:
root@server:~# pvdisplay
/dev/sdd: read failed after 0 of 4096 at 0: Input/output error
/dev/sdd: read failed after 0 of 4096 at 1500301819904: Input/output error
/dev/sdd: read failed after 0 of 4096 at 1500301901824: Input/output error
/dev/sdd: read failed after 0 of 4096 at 4096: Input/output error
/dev/sdd1: read failed after 0 of 4096 at 1500300771328: Input/output error
/dev/sdd1: read failed after 0 of 4096 at 1500300853248: Input/output error
/dev/sdd1: read failed after 0 of 4096 at 0: Input/output error
/dev/sdd1: read failed after 0 of 4096 at 4096: Input/output error
Couldn't find device with uuid hFhfbQ-4cuW-CSlE-qhfO-GNl8-Jvt7-4nZTWK.
--- Physical volume ---
PV Name /dev/sda # old, working drive
VG Name lvm_group1
PV Size 1.82 TiB / not usable 1.09 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 476932
Free PE 0
Allocated PE 476932
PV UUID FEoDYU-Lhjf-FdI1-Ei5p-koue-PIma-TGvs9A
--- Physical volume ---
PV Name /dev/sdd1 # old failing drive
VG Name lvm_group1
PV Size 1.36 TiB / not usable 2.40 MiB
Allocatable NO
PE Size 4.00 MiB
Total PE 357699
Free PE 357600
Allocated PE 99
PV UUID hFhfbQ-4cuW-CSlE-qhfO-GNl8-Jvt7-4nZTWK
--- Physical volume ---
PV Name /dev/sdf # new drive
VG Name lvm_group1
PV Size 2.73 TiB / not usable 4.46 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 715396
Free PE 357746
Allocated PE 357650
PV UUID qs4BVK-PAPv-I1DG-x5wJ-dRNq-vhBE-wQeJL6
Veja o que o pvmove está dizendo:
root@server:~# pvmove /dev/sdd1:335950-336500 /dev/sdf --verbose
Finding volume group "lvm_group1"
Archiving volume group "lvm_group1" metadata (seqno 93).
Creating logical volume pvmove0
Moving 50 extents of logical volume lvm_group1/cryptex
Found volume group "lvm_group1"
activation/volume_list configuration setting not defined: Checking only host tags for lvm_group1/cryptex
Updating volume group metadata
Found volume group "lvm_group1"
Found volume group "lvm_group1"
Creating lvm_group1-pvmove0
Loading lvm_group1-pvmove0 table (253:2)
Loading lvm_group1-cryptex table (253:0)
Suspending lvm_group1-cryptex (253:0) with device flush
Suspending lvm_group1-pvmove0 (253:2) with device flush
Found volume group "lvm_group1"
activation/volume_list configuration setting not defined: Checking only host tags for lvm_group1/pvmove0
Resuming lvm_group1-pvmove0 (253:2)
Found volume group "lvm_group1"
Loading lvm_group1-pvmove0 table (253:2)
Suppressed lvm_group1-pvmove0 identical table reload.
Resuming lvm_group1-cryptex (253:0)
Creating volume group backup "/etc/lvm/backup/lvm_group1" (seqno 94).
Checking progress before waiting every 15 seconds
/dev/sdd1: Moved: 4.0%
/dev/sdd1: read failed after 0 of 4096 at 0: Input/output error
No physical volume label read from /dev/sdd1
Physical volume /dev/sdd1 not found
ABORTING: Can't reread PV /dev/sdd1
ABORTING: Can't reread VG for /dev/sdd1
Existem apenas 99 extensões restantes na unidade com falha. Eu estou bem com a perda desses dados - eu só quero puxar esta unidade e jogá-lo fora sem perder dados em outras unidades.
Então eu tentei pvremove:
root@server:~# pvremove /dev/sdd1
/dev/sdd1: read failed after 0 of 4096 at 1500300771328: Input/output error
/dev/sdd1: read failed after 0 of 4096 at 1500300853248: Input/output error
/dev/sdd1: read failed after 0 of 4096 at 0: Input/output error
/dev/sdd1: read failed after 0 of 4096 at 4096: Input/output error
No physical volume label read from /dev/sdd1
Physical Volume /dev/sdd1 not found
E depois vgreduce:
root@server:~# vgreduce lvm_group1 --removemissing
/dev/sdd: read failed after 0 of 4096 at 0: Input/output error
/dev/sdd: read failed after 0 of 4096 at 1500301819904: Input/output error
/dev/sdd: read failed after 0 of 4096 at 1500301901824: Input/output error
/dev/sdd: read failed after 0 of 4096 at 4096: Input/output error
/dev/sdd1: read failed after 0 of 4096 at 1500300771328: Input/output error
/dev/sdd1: read failed after 0 of 4096 at 1500300853248: Input/output error
/dev/sdd1: read failed after 0 of 4096 at 0: Input/output error
/dev/sdd1: read failed after 0 of 4096 at 4096: Input/output error
Couldn't find device with uuid hFhfbQ-4cuW-CSlE-qhfO-GNl8-Jvt7-4nZTWK.
WARNING: Partial LV cryptex needs to be repaired or removed.
WARNING: Partial LV pvmove0 needs to be repaired or removed.
There are still partial LVs in VG lvm_group1.
To remove them unconditionally use: vgreduce --removemissing --force.
Proceeding to remove empty missing PVs.
O pvdisplay ainda está mostrando a unidade com falha ...
Alguma idéia?