[Rear-users] Testing REAR in an XEN Environtment with SUSE Enterprise Linux 11 SP1

Welte Gerhard gerhard.welte at badenIT.de
Thu Aug 25 14:57:18 CEST 2011


Hallo,

now I had rescued volta on ampere. But I used a mix of different backup-types: PXE,NFS, EXTNERAL...
I had to cleanup the whole backups and try again...

I'm not sure what happens, which backup has produced my backup.tar.gz...

I rescue ampere with the following config-file:

name="ampere"
description="ampere"
memory=512
maxmem=512
vcpus=4
on_poweroff="destroy"
on_reboot="restart"
on_crash="destroy"
localtime=0
builder="linux"
kernel="/installxen/rear/volta.kernel"
ramdisk="/installxen/volta/volta.initrd.cgz"
disk=[  'file:/installxen/volta/rear-volta.iso,xvdh:cdrom,r' , 'phy:/dev/mapper/
ampere_rootvg,xvda,w' , ]
vif=[ 'mac=00:16:3e:60:d9:86,bridge=br17', ]
vfb=['type=vnc,vncunused=1']
root="/dev/mapper/ampere_rootvg-LogVol00 ro"

with the command:

xm create -c ampere-rescue

Using config file "/etc/xen/vm/ampere-rescue".
Started domain ampere (id=110)
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 2.6.32.24-0.2-xen (geeko at buildhost) (gcc version 4.
3.4 [gcc-4_3-branch revision 152973] (SUSE Linux) ) #1 SMP 2010-10-29 16:39:49 +
0200
[    0.000000] Command line: root=/dev/mapper/ampere_rootvg-LogVol00 ro
[    0.000000] KERNEL supported cpus:
[    0.000000]   Intel GenuineIntel
[    0.000000]   AMD AuthenticAMD
[    0.000000]   Centaur CentaurHauls
[    0.000000] Xen-provided physical RAM map:
[    0.000000]  Xen: 0000000000000000 - 0000000020800000 (usable)
[    0.000000] last_pfn = 0x20800 max_arch_pfn = 0x80000000
[    0.000000] init_memory_mapping: 0000000000000000-0000000020800000
[    0.000000] RAMDISK: 00768000 - 04bd8000
[    0.000000] ACPI in unprivileged domain disabled
[    0.000000] (3 early reservations) ==> bootmem [0000000000 - 0020000000]
[    0.000000]   #0 [0000768000 - 0004d06000]     Xen provided ==> [0000768000 -
 0004d06000]
[    0.000000]   #1 [0000002000 - 00007470a8]    TEXT DATA BSS ==> [0000002000 -
 00007470a8]
[    0.000000]   #2 [0004d06000 - 0004e0c000]          PGTABLE ==> [0004d06000 -
 0004e0c000]
[    0.000000] Zone PFN ranges:
[    0.000000]   DMA      0x00000000 -> 0x00001000
[    0.000000]   DMA32    0x00001000 -> 0x00100000
[    0.000000]   Normal   0x00100000 -> 0x00100000
[    0.000000] Movable zone start PFN for each node
[    0.000000] early_node_map[2] active PFN ranges
[    0.000000]     0: 0x00000000 -> 0x00020000
[    0.000000]     0: 0x00020800 -> 0x00020800
[    0.000000] NR_CPUS:512 nr_cpumask_bits:512 nr_cpu_ids:4 nr_node_ids:1
[    0.000000] PERCPU: Embedded 18 pages/cpu @ffff880004bdd000 s41112 r8192 d244
24 u73728
[    0.000000] pcpu-alloc: s41112 r8192 d24424 u73728 alloc=18*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[    0.000000] Swapping MFNs for PFN 637 and 4be3 (MFN 2026422 and 1cd112c)
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pag
es: 129252
[    0.000000] Kernel command line: root=/dev/mapper/ampere_rootvg-LogVol00 ro
[    0.000000] PID hash table entries: 2048 (order: 2, 16384 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 7, 524288 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 6, 262144 bytes)
[    0.000000] allocated 5324800 bytes of page_cgroup
[    0.000000] please try 'cgroup_disable=memory' option if you don't want memor
y cgroups
[    0.000000] Software IO TLB disabled
[    0.000000] Memory: 430216k/532480k available (3430k kernel code, 8192k absen
t, 93404k reserved, 2894k data, 344k init)
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS:6464 nr_irqs:2416
[    0.000000] Xen reported: 3332.446 MHz processor.
[    0.000000] Console: colour dummy device 80x25
[    0.000000] console [tty0] enabled
[    0.000000] console [xvc-1] enabled
[    0.284016] Calibrating delay using timer specific routine.. 6669.15 BogoMIPS
 (lpj=13338317)
[    0.284029] pid_max: default: 32768 minimum: 301
[    0.284094] Security Framework initialized
[    0.284115] AppArmor: AppArmor initialized
[    0.284143] Mount-cache hash table entries: 256
[    0.284257] Initializing cgroup subsys ns
[    0.284265] Initializing cgroup subsys cpuacct
[    0.284270] Initializing cgroup subsys memory
[    0.284279] Initializing cgroup subsys devices
[    0.284283] Initializing cgroup subsys freezer
[    0.284287] Initializing cgroup subsys net_cls
[    0.284340] SMP alternatives: switching to UP code
[    0.311465] Brought up 1 CPUs
[    0.311569] devtmpfs: initialized
[    0.311901] regulator: core version 0.5
[    0.331812] Time: 165:165:165  Date: 165/165/65
[    0.331952] NET: Registered protocol family 16
[    0.333390] SMP alternatives: switching to SMP code
[    0.544093] Brought up 4 CPUs
[    0.544775] PCI: Fatal: No config space access function found
[    0.544781] PCI: setting up Xen PCI frontend stub
[    0.546483] bio: create slab <bio-0> at 0
[    0.546847] ACPI: Interpreter disabled.
[    0.547199] suspend: event channel 15
[    0.547546] xen_mem: Initialising balloon driver.
[    0.549064] vgaarb: loaded
[    0.549187] PCI: System does not support PCI
[    0.549194] PCI: System does not support PCI
[    0.549264] NetLabel: Initializing
[    0.549269] NetLabel:  domain hash size = 128
[    0.549272] NetLabel:  protocols = UNLABELED CIPSOv4 [    0.549287] NetLabel:  unlabeled traffic allowed by default
[    0.549293] Switching to clocksource xen
[    0.549512] AppArmor: AppArmor Filesystem Enabled
[    0.549512] pnp: PnP ACPI: disabled
[    0.549512] NET: Registered protocol family 2
[    0.549512] IP route cache hash table entries: 16384 (order: 5, 131072 bytes)
[    0.549512] TCP established hash table entries: 65536 (order: 8, 1048576 byte
s)
[    0.549512] TCP bind hash table entries: 65536 (order: 8, 1048576 bytes)
[    0.549512] TCP: Hash tables configured (established 65536 bind 65536)
[    0.549512] TCP reno registered
[    0.549512] NET: Registered protocol family 1
[    0.549546] Unpacking initramfs...
[    0.653902] Freeing initrd memory: 70080k freed
[    0.670571] platform rtc_cmos: registered platform RTC device (no PNP device
found)
[    0.672873] audit: initializing netlink socket (disabled)
[    0.672892] type=2000 audit(1314276253.150:1): initialized
[    0.684904] VFS: Disk quotas dquot_6.5.2
[    0.684977] Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.685079] msgmni has been set to 290
[    0.685383] alg: No test for stdrng (krng)
[    0.685383] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 2
54)
[    0.685383] io scheduler noop registered
[    0.685383] io scheduler anticipatory registered
[    0.685383] io scheduler deadline registered
[    0.685383] io scheduler cfq registered (default)
[    0.685383] pci-stub: invalid id string ""
[    0.686935] Non-volatile memory driver v1.3
[    0.687010] Xen virtual console successfully installed as xvc0
[    0.687038] Event-channel device installed.
[    0.690577] Console: switching to colour frame buffer device 100x37
[    0.695520] console [tty0] enabled
[    0.696368] input: Xen Virtual Keyboard as /devices/virtual/input/input0
[    0.696451] input: Xen Virtual Pointer as /devices/virtual/input/input1
[    0.702453] Fixed MDIO Bus: probed
[    0.702511] PNP: No PS/2 controller found. Probing ports directly.
[    0.703389] i8042.c: No controller found.
[    0.703486] mice: PS/2 mouse device common for all mice
[    0.704038] TCP cubic registered
[    0.704153] registered taskstats version 1
[    0.704232] PCI IO multiplexer device installed.
[    0.704279]   Magic number: 1:252:3141
[    0.802104] XENBUS: Device with no driver: device/vbd/51824
[    0.802514] XENBUS: Device with no driver: device/vbd/51712
[    0.802920] XENBUS: Device with no driver: device/vif/0
[    0.803481] Freeing unused kernel memory: 344k freed
[    0.804065] Write protecting the kernel read-only data: 5724k


Relax & Recover Version 1.11.0 / 2011-05-24 10:39:25 +0200
Copyright (C) 2006-2011
        Schlomo Schapiro, Immobilien Scout GmbH
        Gratien D'haese, IT3 Consultants
Relax & Recover comes with ABSOLUTELY NO WARRANTY; for details
see the GNU General Public License at http://www.gnu.org/licenses/gpl.html

Host volta using Backup NETFS and Output PXE
Build date: Thu, 25 Aug 2011 09:41:26 +0200

Welcome to SLES for SAP Applications GMC 11.1 (x86_64) - Kernel 2.6.32.24-0.2-xe
n (xvc0).

volta login:

Loggin in as root and start rear recover....

volta login: root

Welcome to Relax & Recover. Run "rear recover" to restore your system !

RESCUE volta:~ # rear recover
Relax & Recover Version 1.11.0 / 2011-05-24 10:39:25 +0200
Calculating backup archive size  OK
Backup archive size is 1.1G (compressed)
Initializing physical devices  OK
Creating file systems  OK
Recreated this filesystem layout:
Filesystem            Size  Used Avail Use% Mounted on
/dev/xvda2             10G  154M  9.4G   2% /mnt/local
Restoring from 'nfs://srvxen02.badenova.intern/installxen/volta/backup.tar.gz'
Restored 2688 MiB [avg 50986 KiB/sec]  OK
Restored 2688 MiB in 55 seconds [avg 50059 KiB/sec]
Restoring the bootloader (SuSE style)
Creating swap files and partitions  OK
Finished recovering your system

You can explore it under /mnt/local

Thank you for using Relax & Recover Version 1.11.0


Finished in 73 seconds.


Than he recovered from an NFS-Backup.... I don't know why... but I take a look tomorrow...

Have a nice evening.

Bye

Vegisto


-----Ursprüngliche Nachricht-----
Von: Welte Gerhard [mailto:gerhard.welte at badenIT.de]
Gesendet: Donnerstag, 25. August 2011 12:42
An: Discussions about Relax & Recover
Betreff: Re: [Rear-users] Testing REAR in an XEN Environtment with SUSE Enterprise Linux 11 SP1

Hi,

Thanks Schlomo. I'm not sure if I had corect files, I get following error:

Using config file "/etc/xen/vm/ampere".
Error: (22, 'Invalid argument')

I create local.conf on volta:

# sample local configuration
OUTPUT=PXE
PXE_TFTP_PATH=/installxen/rear
PXE_CONFIG_PATH=$PXE_TFTP_PATH
PXE_CREATE_LINKS=IP

# optionally define (non-default) backup software, e.g. TSM, NBU, DP, BACULA BACKUP=EXTERNAL EXTERNAL_BACKUP="rsync -aAXSHx --delete --numeric-ids //boot srvxen02:/installxen/volta/external/"
EXTERNAL_RESTORE="rsync -aAXSH --numeric-ids srvxen02:/installxen/volta/external/ /mnt/local/"
EXTERNAL_CHECK="ssh srvxen02 date '+CHECK EXTERNAL srvxen02 AT %F %T' 1>&2"
EXTERNAL_IGNORE_ERRORS=( 23 24 )

/installxen is mounted from srvxen02 via nfs on volta.

Then I use

# xm delete ampere

And

# xm new ampere with following ampere file:

name="ampere"
description="ampere"
uuid="d8825f38-a8ca-3f65-899f-6d0e577af67f"
memory=512
maxmem=512
vcpus=4
on_poweroff="destroy"
on_reboot="restart"
on_crash="destroy"
localtime=0
keymap="de"
builder="hvm"
device_model="/usr/lib/xen/bin/qemu-dm"
kernel="/installxen/volta/volta.kernel"
boot="d"
disk=[ 'phy:/dev/mapper/ampere_rootvg,xvda,w', 'file:/installxen/volta/rear-volt a.iso,xvdb:cdrom,r', ] vif=[ 'mac=00:16:3e:60:d9:86,bridge=br17', ] vfb=['type=vnc,vncunused=1']
apci=0
acpi=1
pae=1
usb=1
usbdevice="tablet"
serial="pty"

Than I used your script:

#!/bin/bash
# start ampere in rescue mode
xm create -f ampere
kernel=/installxen/rear/volta.kernel
ramdisk=/installxen/rear/volta.initrd.cgz
bootloader= extra="rw selinux=0" root=/dev/ram $@

Then I get the error...

Can you post me your xen-config file from devxvm001.

Thanks a lot.

Ciao

Vegisto


-----Ursprüngliche Nachricht-----
Von: Schlomo Schapiro [mailto:schlomo at schapiro.org]
Gesendet: Montag, 22. August 2011 16:21
An: rear-users at lists.sourceforge.net
Betreff: Re: [Rear-users] Testing REAR in an XEN Environtment with SUSE Enterprise Linux 11 SP1

Hi,

there are many things that can go wrong. Personally I had success with XEN VM recovery with a slightly different approach:

1. I used OUTPUT=PXE to get the kernel/initrd without a boot loader

2. I wrote a little XEN VM start script that would start the recovery VM with the kernel/initrd that had been created in step 1

3. Of course the original and recovery VM have to have a similar setup (mostly HVM or PV).

Maybe this will help:

My script to start the recovery looks like this:

#!/bin/bash
# start devxvm in rescue mode
xm create -f devxvm001
kernel=/backup/devxvm001/boot/rescue/devxvm001.arc.int.kernel
ramdisk=/backup/devxvm001/boot/rescue/devxvm001.arc.int.initrd.cgz
bootloader= extra="rw selinux=0" root=/dev/ram $@

(and devxvm001 is the VM to recover)

My /etc/rear/local.conf (using rsync as EXTERNAL command, could be also done with the BACKUP=RSYNC support)

# get the boot files in /boot/rescue
OUTPUT=PXE
PXE_TFTP_PATH=/boot/rescue
PXE_CONFIG_PATH=$PXE_TFTP_PATH
PXE_CREATE_LINKS=IP

# use rsync for simple backup
BACKUP=EXTERNAL
EXTERNAL_BACKUP="rsync -aAXSHx --delete --numeric-ids / /boot devxen001:/backup/devxvm001/"
EXTERNAL_RESTORE="rsync -aAXSH --numeric-ids devxen001:/backup/devxvm001/ /mnt/local/"
EXTERNAL_CHECK="ssh devxen001 date '+CHECK EXTERNAL devxen001 AT %F %T'
1>&2"
EXTERNAL_IGNORE_ERRORS=( 23 24 )

devxen001 is my XEN host and backup server, devxvm001 is the XEN PV VM to backup and recover.

HTH,
Schlomo

PS: And this was on RHEL5 with Paravirtualization, I don't have any experience with SLES and XEN VMs with regard to ReaR.

On 22.08.2011 14:42, Welte Gerhard wrote:
> Hallo,
>
>
>
> we are testing REAR with XEN on SLES11 SP1. We have two XEN domU
> (volta and ampere) on the dom0 (srvxen02):
>
>
>
> -          Relax & Recover Version 1.11.0 / 2011-05-24 10:39:25 +0200
> (rpm-Installation)
>
> -          On volta we try an mkbackup:
>
> Relax & Recover Version 1.11.0 / 2011-05-24 10:39:25 +0200
>
> The preparation phase  OK
>
> Physical devices that will be recovered: /dev/xvda
>
> Saving disk partitions.
>
> Saving LVM layout.
>
> Saving Filesystem layout.
>
> Saving Swap information.
>
> Saving Encrypted volumes.
>
> Creating root FS layout  OK
>
> Copy files and directories  OK
>
> Copy program files & libraries  OK
>
> Copy kernel modules  OK
>
> Checking udev  OK
>
> Using kernel /boot/vmlinuz-2.6.32.24-0.2-xen
>
> Create initramfs  OK
>
> Making ISO image  OK
>
> Wrote ISO Image /tmp/rear-volta.iso (30M)
>
> Copying resulting files to nfs location  OK
>
> Creating tar archive '/tmp/rear.LF3PIShkSjpC6ZR/netfs/volta/backup.tar.gz'
>
> Archived 817 MiB [avg 3404 KiB/sec]  -^CFinished in 383 seconds.
>
> You should also rm -Rf /tmp/rear.LF3PIShkSjpC6ZR
>
>
>
> -          volta:/etc/rear # more local.conf
>
> OUTPUT=ISO
>
> BACKUP=NETFS
>
> NETFS_URL=nfs://srvxen02.badenova.intern/installxen
>
>
>
> -          The second domU (ampere) is defined to start from the
> previously created iso from the backup:
>
>
>
> srvxen02:/etc/xen/vm # more ampere
>
> name="ampere"
>
> description="ampere"
>
> uuid="d8825f38-a8ca-3f65-899f-6d0e577af67f"
>
> memory=512
>
> maxmem=512
>
> vcpus=4
>
> on_poweroff="destroy"
>
> on_reboot="restart"
>
> on_crash="destroy"
>
> localtime=0
>
> keymap="de"
>
> builder="hvm"
>
> device_model="/usr/lib/xen/bin/qemu-dm"
>
> kernel="/usr/lib/xen/boot/hvmloader"
>
> boot="d"
>
> disk=[ 'phy:/dev/mapper/ampere_rootvg,xvda,w',
> 'file:/installxen/volta/rear-volta.iso,xvdb:cdrom,r', ]
>
> vif=[ 'mac=00:16:3e:60:d9:86,bridge=br17', ]
>
> vfb=['type=vnc,vncunused=1']
>
> apci=0
>
> acpi=1
>
> pae=1
>
> usb=1
>
> usbdevice="tablet"
>
> serial="pty"
>
>
>
> Now we are trying to boot ampere. The boot menu is coming up:
>
>
>
> Relax & Recover v1.11.0
>
>
>
> Recover volta
>
>
>
> Other actions…
>
> .
>
>
>
> If we try to boot from the Option Recover volta the following Error appears:
>
>
>
> *Invalid or corrupt kernel image.*
>
> *Boot:*
>
> * *
>
> What’s wrong in paradies?
>
>
>
> Thanx in advance
>
>
>
> Vegisto
>
>
>
> ----------------------------------------------------------------------
> -------- uberSVN's rich system and user administration capabilities
> and model configuration take the hassle out of deploying and managing
> Subversion and the tools developers use with it. Learn more about
> uberSVN and get a free download at:
> http://p.sf.net/sfu/wandisco-dev2dev
>
>
>
> _______________________________________________
> Rear-users mailing list
> Rear-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rear-users

------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model configuration take the hassle out of deploying and managing Subversion and the tools developers use with it. Learn more about uberSVN and get a free download at:  http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
Rear-users mailing list
Rear-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rear-users
------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than alternatives and 25% more efficient.
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
Rear-users mailing list
Rear-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rear-users


More information about the rear-users mailing list