Não consigo montar um instantâneo LVM em um host XEN

2

Gostaria de fazer backup de minhas VMs XEN copiando-rsyncing um instantâneo LVM. Eu estou tentando montar um instantâneo que contém um disco virtual do convidado XEN (ext4).

Abaixo estão todos os passos que eu sigo. Não consigo montar o instantâneo e parece que não há tabela de partições nele.

O único grupo de volumes existente é "VG_XenStorage-2be5fe38-c04b-3277-4ce0-438139457a4a"

O disco virtual que eu tento fazer backup é: "/ dev / VG_XenStorage-2be5fe38-c04b-3277-4ce0-438139457a4a / VHD-8c8064d2-0101-46d4-b1e5-607ad4a92621"

O nome do meu instantâneo LV é "vmbackup".

A página man do comando mount no host Xen não mostra ext4 como suportado. Portanto, fiz o mesmo teste com um disco ext3, mas ele me deu o mesmo resultado.

[root@ ~]# vgdisplay

  --- Volume group ---
  VG Name               VG_XenStorage-2be5fe38-c04b-3277-4ce0-438139457a4a
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  76
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                4
  Open LV               3
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               1.08 TB
  PE Size               4.00 MB
  Total PE              283852
  Alloc PE / Size       5258 / 20.54 GB
  Free  PE / Size       278594 / 1.06 TB
  VG UUID               n4NO4a-fLFT-GCO0-PSye-oW06-UWYP-qryubC

[root@ ~]# lvdisplay

  --- Logical volume ---
  LV Name                /dev/VG_XenStorage-2be5fe38-c04b-3277-4ce0-438139457a4a/MGT
  VG Name                VG_XenStorage-2be5fe38-c04b-3277-4ce0-438139457a4a
  LV UUID                uBsbF7-2O3B-S3S2-7t5M-wSCt-b8qu-2AufzM
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                4.00 MB
  Current LE             1
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  currently set to     1024
  Block device           252:1

  --- Logical volume ---
  LV Name                /dev/VG_XenStorage-2be5fe38-c04b-3277-4ce0-
438139457a4a/ISORepository
  VG Name                VG_XenStorage-2be5fe38-c04b-3277-4ce0-438139457a4a
  LV UUID                Bw8KcC-vexj-WEHx-W3dh-lo8b-UpGu-y7qWB4
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                10.00 GB
  Current LE             2560
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  currently set to     1024
  Block device           252:0

  --- Logical volume ---
  LV Name                /dev/VG_XenStorage-2be5fe38-c04b-3277-4ce0-438139457a4a/VHD-
8c8064d2-0101-46d4-b1e5-607ad4a92621
  VG Name                VG_XenStorage-2be5fe38-c04b-3277-4ce0-438139457a4a
  LV UUID                rCtzAA-VFUZ-tHLP-oJ1D-EHtR-ilXW-RcXwFg
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                10.03 GB
  Current LE             2567
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  currently set to     1024
  Block device           252:2

  --- Logical volume ---
  LV Name                /dev/VG_XenStorage-2be5fe38-c04b-3277-4ce0-438139457a4a/VHD-b1f9c38a-042e-4589-8ec5-6389aac8ee4d
  VG Name                VG_XenStorage-2be5fe38-c04b-3277-4ce0-438139457a4a
  LV UUID                1Ks1pR-MSbr-U4Q4-bq2T-Py2d-HtUX-0PZnbu
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                520.00 MB
  Current LE             130
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  currently set to     1024
  Block device           252:3

[root@ ~]# lvcreate -L1G -s -n vmbackup /dev/VG_XenStorage-2be5fe38-c04b-3277-4ce0-438139457a4a/VHD-8c8064d2-0101-46d4-b1e5-607ad4a92621
  Logical volume "vmbackup" created

[root@ ~]# lvscan
  ACTIVE            '/dev/VG_XenStorage-2be5fe38-c04b-3277-4ce0-438139457a4a/MGT' [4.00 MB] inherit
  ACTIVE            '/dev/VG_XenStorage-2be5fe38-c04b-3277-4ce0-438139457a4a/ISORepository' [10.00 GB] inherit
  ACTIVE   Original '/dev/VG_XenStorage-2be5fe38-c04b-3277-4ce0-438139457a4a/VHD-8c8064d2-0101-46d4-b1e5-607ad4a92621' [10.03 GB] inherit
  ACTIVE            '/dev/VG_XenStorage-2be5fe38-c04b-3277-4ce0-438139457a4a/VHD-b1f9c38a-042e-4589-8ec5-6389aac8ee4d' [520.00 MB] inherit
  ACTIVE   Snapshot '/dev/VG_XenStorage-2be5fe38-c04b-3277-4ce0-438139457a4a/vmbackup' [1.00 GB] inherit

[root@ ~]# kpartx -a -v /dev/VG_XenStorage-2be5fe38-c04b-3277-4ce0-438139457a4a/vmbackup

[root@ ~]# ls /dev/mapper/
control                                                                                                     
VG_XenStorage--2be5fe38--c04b--3277--4ce0--438139457a4a-VHD--8c8064d2--0101--46d4--b1e5--607ad4a92621-real
VG_XenStorage--2be5fe38--c04b--3277--4ce0--438139457a4a-ISORepository

VG_XenStorage--2be5fe38--c04b--3277--4ce0--438139457a4a-VHD--b1f9c38a--042e--4589--8ec5--6389aac8ee4d
VG_XenStorage--2be5fe38--c04b--3277--4ce0--438139457a4a-MGT

VG_XenStorage--2be5fe38--c04b--3277--4ce0--438139457a4a-vmbackup
VG_XenStorage--2be5fe38--c04b--3277--4ce0--438139457a4a-VHD--8c8064d2--0101--46d4--b1e5--607ad4a92621       VG_XenStorage--2be5fe38--c04b--3277--4ce0--438139457a4a-vmbackup-cow

[root@ ~]# mount /dev/mapper/VG_XenStorage--2be5fe38--c04b--3277--4ce0--438139457a4a-vmbackup /mnt
mount: you must specify the filesystem type

 [root@ ~]# mount VG_XenStorage--2be5fe38--c04b--3277--4ce0--438139457a4a-vmbackup-cow /mnt
mount: you must specify the filesystem type

[root@ ~]# dmesg | tail
[1531258.118928] device vif7.0 entered promiscuous mode
[1531258.515365] blkback: event-channel 8
[1531258.515551] blkback: ring-ref 8
[1531258.515742] blkback: protocol 3 (x86_64-abi)
[1531258.517356] blkback: event-channel 9
[1531258.517446] blkback: ring-ref 9
[1531258.517480] blkback: protocol 3 (x86_64-abi)
[1531258.521059] /local/domain/7/device/vif/0: Connected
[1531265.156744] /local/domain/7/device/vif/0: Connected
[1531265.157147] /local/domain/7/device/vif/0: Closed

[root@ ~]# mount -t ext4 /dev/VG_XenStorage-2be5fe38-c04b-3277-4ce0-438139457a4a/vmbackup /mnt
mount: wrong fs type, bad option, bad superblock on /dev/VG_XenStorage-2be5fe38-c04b-3277-4ce0-438139457a4a/vmbackup,
       missing codepage or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

[root@ ~]# dmesg | tail
[1531258.515365] blkback: event-channel 8
[1531258.515551] blkback: ring-ref 8
[1531258.515742] blkback: protocol 3 (x86_64-abi)
[1531258.517356] blkback: event-channel 9
[1531258.517446] blkback: ring-ref 9
[1531258.517480] blkback: protocol 3 (x86_64-abi)
[1531258.521059] /local/domain/7/device/vif/0: Connected
[1531265.156744] /local/domain/7/device/vif/0: Connected
[1531265.157147] /local/domain/7/device/vif/0: Closed
[1534417.547412] EXT4-fs (dm-4): VFS: Can't find ext4 filesystem

[root@ ~]# fdisk -l /dev/VG_XenStorage-2be5fe38-c04b-3277-4ce0-438139457a4a/vmbackup
Disk /dev/VG_XenStorage-2be5fe38-c04b-3277-4ce0-438139457a4a/vmbackup: 10.7 GB, 10766778368 bytes
255 heads, 63 sectors/track, 1308 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/VG_XenStorage-2be5fe38-c04b-3277-4ce0-438139457a4a/vmbackup doesn't contain a valid partition table

[root@ ~]# fdisk -l /dev/mapper/VG_XenStorage--2be5fe38--c04b--3277--4ce0--438139457a4a-vmbackup-cow
Disk /dev/mapper/VG_XenStorage--2be5fe38--c04b--3277--4ce0--438139457a4a-vmbackup-cow: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/mapper/VG_XenStorage--2be5fe38--c04b--3277--4ce0--438139457a4a-vmbackup-cow doesn't contain a valid partition table

[root@ ~]# lsmod | grep ext4
ext4                  312546  0
jbd2                   75354  1 ext4

Aqui está o resumo dos passos que eu sigo:

lvcreate -L1G -s -n vmbackup / dev / VG_XenStorage-2be5fe38-c04b-3277-4ce0-438139457a4a / VHD-8c8064d2-0101-46d4-b1e5-607ad4a92621

kpartx -a -v / dev / VG_XenStorage-2be5fe38-c04b-3277-4ce0-438139457a4a / vmbackup

monte / dev / VG_XenStorage-2be5fe38-c04b-3277-4ce0-438139457a4a / vmbackup / mnt mount: você deve especificar o tipo de sistema de arquivos

    
por Icu 22.02.2013 / 14:03

1 resposta

0

Finalmente, criei um script com base nos seguintes comandos:

xe vm-list é-control-domain = falso é-um-instantâneo = falso
xe vm-snapshot das VMs na lista
xe template-param-set é-a-template = falso ha-sempre-run = false uuid = ...
xe vm-export vm = snap_uuid nomedoarquivo = | ssh ... REMOTE_HOST "cat > /path/backup.xva"
xe vm-uninstall uuid = força do snap_uuid = true

Obrigado pelos seus conselhos.

    
por 26.03.2013 / 11:31