Restauration Acronis avec des partitions LVM

De Ikoula Wiki
Jump to navigation Jump to search

EN COURS Quand vous disposez de partition LVM, la restoration ne parviendra pas a restorer correctement a tables de partition et les volumes LVM. Cette article va nous expliquer comment procéder à la restoration des volumes.


Pre-requis

  • Disposer d'une sauvegarde Acronis
  • Un livecd linux (Ubuntu, SystemeRescueCD, Debian Live,...)

backup-lvm

vgcfgbackup -f backup-lvm

backup-disk

sfdisk -d /dev/sda > backup-disk

restoration-disk

sfdisk /dev/sda < backup-disk

restoration LVM

Restoration PV

  • liste des uuid et disque
grep -b1 device backup-lvm
[root@sysresccd /]# grep -b1 device backup-lvm
596-                    id = "0ZRVSE-JPIj-0BHA-HdK1-fe7a-nVPK-n9VWz0"
645:                    device = "/dev/sda3"    # Hint only
681-
--
837-                    id = "zYP1ZL-F24C-Icyx-sAgh-JXuu-JZEy-daT2We"
886:                    device = "/dev/sda4"    # Hint only
922-

Ensuite nous allons recréé les PV avec les meême uuid :

pvcreate --uuid "0ZRVSE-JPIj-0BHA-HdK1-fe7a-nVPK-n9VWz0" --restorefile backup-lvm /dev/sda3
pvcreate --uuid "zYP1ZL-F24C-Icyx-sAgh-JXuu-JZEy-daT2We" --restorefile backup-lvm /dev/sda4

restoration LVM VG

Nous allons vérifier quel VG restorer, présent dans le backup :

[root@sysresccd /]# vgcfgrestore -l -f backup-lvm

  File:         backup-lvm
  Couldn't find device with uuid 0ZRVSE-JPIj-0BHA-HdK1-fe7a-nVPK-n9VWz0.
  Couldn't find device with uuid zYP1ZL-F24C-Icyx-sAgh-JXuu-JZEy-daT2We.
  VG name:      vg01
  Description:  vgcfgbackup -f backup-lvm
  Backup Time:  Wed Nov 27 13:24:30 2019

Ensuite nous lancons la restoation du vg :

[root@sysresccd /]# vgcfgrestore -f backup-lvm vg01
  Volume group vg01 has active volume: swap.
  Volume group vg01 has active volume: root.
  WARNING: Found 2 active volume(s) in volume group "vg01".
  Restoring VG with active LVs, may cause mismatch with its metadata.
Do you really want to proceed with restore of volume group "vg01", while 2 volume(s) are active? [y/n]: y
  Restored volume group vg01
[root@sysresccd /]#

Nous pouvons enfin vérifier que nos volume sont présent :

[root@sysresccd /]# lvdisplay
  --- Logical volume ---
  LV Path                /dev/vg01/swap
  LV Name                swap
  VG Name                vg01
  LV UUID                gEX2PA-PqmJ-nPzm-uYYq-X5PQ-KsOs-NkzxZh
  LV Write Access        read/write
  LV Creation host, time debian9x64, 2017-07-07 10:48:35 +0000
  LV Status              available
  # open                 0
  LV Size                952.00 MiB
  Current LE             238
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:0

  --- Logical volume ---
  LV Path                /dev/vg01/root
  LV Name                root
  VG Name                vg01
  LV UUID                UgVY3d-9INb-Kctr-vCk0-wCfk-dqKE-9o5to2
  LV Write Access        read/write
  LV Creation host, time debian9x64, 2017-07-07 10:48:42 +0000
  LV Status              available
  # open                 0
  LV Size                <98.13 GiB
  Current LE             25121
  Segments               2
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:1

[root@sysresccd /]#


restoration accronis

Restoration Grub