Como acessar um disco de sistema antigo conectado via USB que tenha o mesmo id de grupo de volume

1

Recentemente, tive que substituir o disco do sistema em um servidor remoto e o DC anexou o disco antigo a uma porta USB. O problema é que o CentOS foi instalado em ambos usando todos os padrões, e agora a saída de lvscan é:

[root@IS-55825 /]# lvscan
  inactive          '/dev/vg_is55825/lv_root' [50.00 GiB] inherit
  inactive          '/dev/vg_is55825/lv_home' [53.46 GiB] inherit
  inactive          '/dev/vg_is55825/lv_swap' [7.67 GiB] inherit
  ACTIVE            '/dev/vg_is55825/lv_root' [50.00 GiB] inherit
  ACTIVE            '/dev/vg_is55825/lv_home' [53.24 GiB] inherit
  ACTIVE            '/dev/vg_is55825/lv_swap' [7.89 GiB] inherit

pvs pode dizer a diferença, mas não consigo descobrir como separá-los de uma maneira que eu possa montar uma das partições antigas para recuperar algumas informações de configuração:

[root@IS-55825 /]# pvs -v
    Using physical volume(s) on command line.
    Wiping cache of LVM-capable devices
    Wiping internal VG cache
    Cache: Duplicate VG name vg_is55825: Existing KbuKYZ-yPtq-VI65-DlqY-e0j3-5Van-9UTe06 (created here) takes precedence over gVj6yw-hbls-RgTh-MKe3-saoW-KH3B-ggf2LO
    Cache: Duplicate VG name vg_is55825: Existing KbuKYZ-yPtq-VI65-DlqY-e0j3-5Van-9UTe06 (created here) takes precedence over gVj6yw-hbls-RgTh-MKe3-saoW-KH3B-ggf2LO
  PV         VG         Fmt  Attr PSize   PFree DevSize PV UUID
  /dev/sda2  vg_is55825 lvm2 a--u 111.13g    0  111.13g QC5BPW-VdKx-dNnw-vSNm-cH6H-fZwB-HHXwFb
  /dev/sdd2  vg_is55825 lvm2 a--u 111.13g    0  111.13g LNSYx6-8DCv-u9CG-S1zv-vI20-fNIq-7BA8Le

É /dev/sdd2 que estou procurando, mas não será montado diretamente:

[root@IS-55825 /]# mount /dev/sdd2 /oldsys
mount: unknown filesystem type 'LVM2_member'

Eu tentei lvdisplay --select vg_uuid=LNSYx6-8DCv-u9CG-S1zv-vI20-fNIq-7BA8Le , mas não deu saída, e isso é o máximo que eu consegui ... Existe alguma maneira de obter acesso a ele?

    
por dsl101 05.07.2017 / 13:09

1 resposta

2

OK - Consegui corrigir isso usando vgrename . Em primeiro lugar, executando lvscan -v :

[root@IS-55825 ~]# lvscan -v
    Using logical volume(s) on command line.
    Cache: Duplicate VG name vg_is55825: Existing KbuKYZ-yPtq-VI65-DlqY-e0j3-5Van-9UTe06 (created here) takes precedence over gVj6yw-hbls-RgTh-MKe3-saoW-KH3B-ggf2LO
    Cache: Duplicate VG name vg_is55825: Existing KbuKYZ-yPtq-VI65-DlqY-e0j3-5Van-9UTe06 (created here) takes precedence over gVj6yw-hbls-RgTh-MKe3-saoW-KH3B-ggf2LO
    Cache: Duplicate VG name vg_is55825: Existing gVj6yw-hbls-RgTh-MKe3-saoW-KH3B-ggf2LO (created here) takes precedence over KbuKYZ-yPtq-VI65-DlqY-e0j3-5Van-9UTe06
  inactive          '/dev/vg_is55825/lv_root' [50.00 GiB] inherit
  inactive          '/dev/vg_is55825/lv_home' [53.46 GiB] inherit
  inactive          '/dev/vg_is55825/lv_swap' [7.67 GiB] inherit
    Cache: Duplicate VG name vg_is55825: Existing KbuKYZ-yPtq-VI65-DlqY-e0j3-5Van-9UTe06 (created here) takes precedence over gVj6yw-hbls-RgTh-MKe3-saoW-KH3B-ggf2LO
  ACTIVE            '/dev/vg_is55825/lv_root' [50.00 GiB] inherit
  ACTIVE            '/dev/vg_is55825/lv_home' [53.24 GiB] inherit
  ACTIVE            '/dev/vg_is55825/lv_swap' [7.89 GiB] inherit

Então imaginei que o% UUIDgVj6yw-hbls-RgTh-MKe3-saoW-KH3B-ggf2LO era o disco antigo. Então eu corri vgrename :

[root@IS-55825 ~]# vgrename gVj6yw-hbls-RgTh-MKe3-saoW-KH3B-ggf2LO vg_oldsys
  Processing VG vg_is55825 because of matching UUID gVj6yw-hbls-RgTh-MKe3-saoW-KH3B-ggf2LO
  Volume group "gVj6yw-hbls-RgTh-MKe3-saoW-KH3B-ggf2LO" successfully renamed to "vg_oldsys"

E então consegui montar /dev/vg_oldsys/lv-root . Ufa.

    
por 05.07.2017 / 16:12

Tags