Hi there, today, on my job, my boss, tell me need an urgent backup of hard drive. i clone the hard drive. and have LVM. i create the image from wizard "device-image" all normal.
But when i restore to the hard drive, the LVM partitions and subvolumes are not restored. have a volume group called "Sistemas" inside "Ubuntu" (18.04) and "Debian" (9.4) (74 GB in total). but i don't know how is the right way to restore without problems. because of that, the grub, can't start, obviosly the partition try to find dont exist.
In the hard drive when i restore the LVM2 (in this case the /dev/sdb5), the partition have flag LVM, but just say type "Unkown" (for example in gparted)
root@MZ-MC-03:/home/estudiante# fdisk -lu
Disco /dev/sda: 298,1 GiB, 320072933376 bytes, 625142448 sectores
Unidades: sectores de 1 * 512 = 512 bytes
Tamaño de sector (lógico/físico): 512 bytes / 512 bytes
Tamaño de E/S (mínimo/óptimo): 512 bytes / 512 bytes
Tipo de etiqueta de disco: dos
Identificador del disco: 0x2c554224
Disposit. Inicio Comienzo Final Sectores Tamaño Id Tipo
/dev/sda1 * 2048 7813119 7811072 3,7G 82 Linux swap / Solaris
/dev/sda2 7815166 625141759 617326594 294,4G 5 Extendida
/dev/sda5 7815168 163004415 155189248 74G 8e Linux LVM
/dev/sda6 163006464 625141759 462135296 220,4G 83 Linux
Disco /dev/sdb: 111,8 GiB, 120034123776 bytes, 234441648 sectores
Unidades: sectores de 1 * 512 = 512 bytes
Tamaño de sector (lógico/físico): 512 bytes / 512 bytes
Tamaño de E/S (mínimo/óptimo): 512 bytes / 512 bytes
Tipo de etiqueta de disco: dos
Identificador del disco: 0x0cdb4912
Disposit. Inicio Comienzo Final Sectores Tamaño Id Tipo
/dev/sdb1 * 2048 8390655 8388608 4G 82 Linux swap / Solaris
/dev/sdb2 8390656 234440703 226050048 107,8G 5 Extendida
/dev/sdb5 8392704 163581951 155189248 74G 8e Linux LVM
Disco /dev/mapper/Sistemas-Ubuntu: 35,4 GiB, 37996199936 bytes, 74211328 sectores
Unidades: sectores de 1 * 512 = 512 bytes
Tamaño de sector (lógico/físico): 512 bytes / 512 bytes
Tamaño de E/S (mínimo/óptimo): 512 bytes / 512 bytes
Disco /dev/mapper/Sistemas-Debian: 35,4 GiB, 37996199936 bytes, 74211328 sectores
Unidades: sectores de 1 * 512 = 512 bytes
Tamaño de sector (lógico/físico): 512 bytes / 512 bytes
Tamaño de E/S (mínimo/óptimo): 512 bytes / 512 bytes
root@MZ-MC-03:/home/estudiante# pvscan
PV /dev/sda5 VG Sistemas lvm2 [<74,00 GiB / 3,22 GiB free]
Total: 1 [<74,00 GiB] / in use: 1 [<74,00 GiB] / in no VG: 0 [0 ]
root@MZ-MC-03:/home/estudiante# vgscan
Reading volume groups from cache.
Found volume group "Sistemas" using metadata type lvm2
root@MZ-MC-03:/home/estudiante# pvs -v --segments /dev/sdb5
Wiping internal VG cache
Wiping cache of LVM-capable devices
Failed to find physical volume "/dev/sdb5".
root@MZ-MC-03:/home/estudiante# pvs -v --segments /dev/sda5
Wiping internal VG cache
Wiping cache of LVM-capable devices
PV VG Fmt Attr PSize PFree Start SSize LV Start Type PE Ranges
/dev/sda5 Sistemas lvm2 a-- <74,00g 3,22g 0 9059 Debian 0 linear /dev/sda5:0-9058
/dev/sda5 Sistemas lvm2 a-- <74,00g 3,22g 9059 9059 Ubuntu 0 linear /dev/sda5:9059-18117
/dev/sda5 Sistemas lvm2 a-- <74,00g 3,22g 18118 825 0 free
root@MZ-MC-03:/home/estudiante# pvscan
PV /dev/sda5 VG Sistemas lvm2 [<74,00 GiB / 3,22 GiB free]
Total: 1 [<74,00 GiB] / in use: 1 [<74,00 GiB] / in no VG: 0 [0 ]
which is the correct why to restore the partitions inside the mapper?
Looks like it should be OK for Clonezilla live to backup and restore for you. Which version of Clonezilla live did you use?
Have you tried the latest Clonezilla live 2.5.6-22 ro 20180812-bionic?
Steven