Backup agent for Linux servers and workstations on-premises or in the public cloud
PTide
Veeam Software
Posts: 4663
Liked: 386 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: Restoring a Volume to Software-RAID1

Post by PTide » Sep 18, 2018 6:16 pm

Hi,

It will be added in the upcoming release.

Thanks

MyKey0815
Enthusiast
Posts: 42
Liked: 4 times
Joined: Aug 25, 2016 12:54 pm
Full Name: Michael Kolowicz
Contact:

Re: Restoring a Volume to Software-RAID1

Post by MyKey0815 » Jan 03, 2019 5:33 pm

Hello again,

i have seen, that the software-raid is now included in the restore-cd (v2.0).

Can someone describe how i can restore the full machine backup to a new harddrive (same size as the original).

My Problem: I have a mdadm-Raid on my machine and i will find out, how i can do a downgrade/remove the mdadm for easier backup with veeam.

If i start the recovery cd then i see on the left side:

Code: Select all

sda - 1.82TB
On the right side the structure of the Raid:

Code: Select all

md0 952.4M /boot (ext2)
sda (boot) 1.82T
sbb (boot) 1.82T
vg_ucs_root 1.76TB
  lv_ucs_root 1.76T / (ext4)
Can anybody describe the needed steps for restore to ONE Harddrive?

PTide
Veeam Software
Posts: 4663
Liked: 386 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: Restoring a Volume to Software-RAID1

Post by PTide » Jan 03, 2019 6:41 pm

Hi,

Where does that vg_ucs_root reside, is it on RAID too? What is the output of your lsblk -af?

In general, you need to select that "/boot" on the right and restore it to sda on the left. That will automatically create partition of a required size. Next, you select lv_ucs_root logical volume on the right and restore it to the remaining FREE space on the left. Or, alternatively, you can select the remaining FREE space and create a VG out of it, create a logical volume and restore the lv_ucs_root there.

Thanks!

MyKey0815
Enthusiast
Posts: 42
Liked: 4 times
Joined: Aug 25, 2016 12:54 pm
Full Name: Michael Kolowicz
Contact:

Re: Restoring a Volume to Software-RAID1

Post by MyKey0815 » Jan 07, 2019 9:41 am

Thank you for the reply. Here the result:

Code: Select all

root@ucs100091:~# lsblk -af
NAME                          FSTYPE            LABEL                 UUID                                   MOUNTPOINT
loop0
loop1
loop2
loop3
loop4
loop5
loop6
loop7
sda
├─sda1                        linux_raid_member unassigned-hostname:0 8ca29786-b4d2-6db4-fbcb-8f629636b792
│ └─md0                       ext2                                    85baf293-8fab-40bf-99a8-3b69f17b622a   /boot
├─sda2                        linux_raid_member unassigned-hostname:1 baa72337-41f9-9d7c-39af-4fdf721e4aad
│ └─md1                       swap                                    f35aff87-d944-4013-9222-411010d7c21f   [SWAP]
└─sda3                        linux_raid_member unassigned-hostname:2 2013bcbf-62ba-02ca-ca8e-9a1f5d133de5
  └─md2                       LVM2_member                             xl7Rx3-20MM-tOAP-e9ep-xgiU-gawr-Sc17Bd
    └─vg_ucs_root-lv_ucs_root ext4                                    61db28f8-9421-4638-a7e6-700bec3a1eeb   /
sdb
├─sdb1                        linux_raid_member unassigned-hostname:0 8ca29786-b4d2-6db4-fbcb-8f629636b792
│ └─md0                       ext2                                    85baf293-8fab-40bf-99a8-3b69f17b622a   /boot
├─sdb2                        linux_raid_member unassigned-hostname:1 baa72337-41f9-9d7c-39af-4fdf721e4aad
│ └─md1                       swap                                    f35aff87-d944-4013-9222-411010d7c21f   [SWAP]
└─sdb3                        linux_raid_member unassigned-hostname:2 2013bcbf-62ba-02ca-ca8e-9a1f5d133de5
  └─md2                       LVM2_member                             xl7Rx3-20MM-tOAP-e9ep-xgiU-gawr-Sc17Bd
    └─vg_ucs_root-lv_ucs_root ext4                                    61db28f8-9421-4638-a7e6-700bec3a1eeb   /
sr0
I have try your mention steps. But when i restore "/boot" then i have no "Free space" to restore "lv_ucs_root". Which additional steps are needed?

PTide
Veeam Software
Posts: 4663
Liked: 386 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: Restoring a Volume to Software-RAID1

Post by PTide » Jan 07, 2019 10:05 am

It seems that automatic creation didn't work. Then please select "sda" on the left, press Enter, create partition table, and after that you should see "free" under "sda".
Press 'Enter' on that "free" entry, choose "restore volume from..." and select "/boot" on the right. Repeat the procedure for "/" partition.

Thanks!

MyKey0815
Enthusiast
Posts: 42
Liked: 4 times
Joined: Aug 25, 2016 12:54 pm
Full Name: Michael Kolowicz
Contact:

Re: Restoring a Volume to Software-RAID1

Post by MyKey0815 » Jan 09, 2019 8:26 pm

Thank you. In the last days i have do multiple Restores of the partions. But "the best" result is follwing error:

Code: Select all

Busybox 1.22 .......

(initramfs)
I didn´t find a working way to reaktivate the backup on the new drive.

I have try to start with the rescue-disc and repair the grub. But that is not enough.

PTide
Veeam Software
Posts: 4663
Liked: 386 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: Restoring a Volume to Software-RAID1

Post by PTide » Jan 10, 2019 1:05 pm

It might be so that your filesystem needs to be checked. Try to type exit while in the initramfs commandline and see if it gives you a hints on which filesystem is not ok. After that run fsck against the device.

Thanks!

MyKey0815
Enthusiast
Posts: 42
Liked: 4 times
Joined: Aug 25, 2016 12:54 pm
Full Name: Michael Kolowicz
Contact:

Re: Restoring a Volume to Software-RAID1

Post by MyKey0815 » Jan 10, 2019 1:37 pm

If i execute exit then come up following hint:

Code: Select all

ALERT! /dev/mapper/vg_ucs_root-lv_ucs_root does not exists. Dropping to a shell

MyKey0815
Enthusiast
Posts: 42
Liked: 4 times
Joined: Aug 25, 2016 12:54 pm
Full Name: Michael Kolowicz
Contact:

Re: Restoring a Volume to Software-RAID1

Post by MyKey0815 » Jan 10, 2019 2:18 pm

Now I will try following steps:

1.) Recreate the same partioning of the new disc with the paramters of the source disk
- sda1 1GB
- sda2 66GB
- sda3 1.9TB
2.) Start the veeam-recovery cd and connect to shared folder with image
3.) Select current image and snapshot
4.) Restore md0 to sda1
5.) On sda3 create a LVM
- Groupname is the same like the source: vg_ucs_root
6.) Now a new free partion is under the vg_.... Select this and restore lv_ucs_root to this partition

I hope that it works - in 5 hours i will it know ;-)

PTide
Veeam Software
Posts: 4663
Liked: 386 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: Restoring a Volume to Software-RAID1

Post by PTide » Jan 10, 2019 2:36 pm

Right, the error means that you need to either

a) modify grub config so that it will search for the new root partition instead of the old root logical volume
b) create volume group and a logical volume with the same name during restore

Thanks

MyKey0815
Enthusiast
Posts: 42
Liked: 4 times
Joined: Aug 25, 2016 12:54 pm
Full Name: Michael Kolowicz
Contact:

Re: Restoring a Volume to Software-RAID1

Post by MyKey0815 » Jan 11, 2019 2:53 pm 1 person likes this post

Here are the missing steps after restore

7.) Download Super GRUB2 Disk http://www.supergrubdisk.org/super-grub2-disk/
- the menu entry “Enable GRUB2’s RAID and LVM support” has to be selected. Activating the RAID/LVM support may take a moment. This step may be omitted and can be catched up on later if neccessary.
- Select the entry “Detect and show boot methods”. Please note: depending on the complexity of your setup, this might take a moment. A black screen is shown while detecting.
- The next menu shows all available boot options. Select an appropriate entry containing the text “Univention Corporate Server”.
8.) Repair GRUB
- login UCS
- Open Terminal/Console
- sudo su
dpkg-reconfigure grub-pc
“Linux command line”: Press Return to keep the value as-is
“default command line for Linux”: Press Return to keep the value as-is
Question for changed configuration file „/etc/default/grub“: Press Return to keep the configuration file as-is.
“devices for GRUB installation”: select the correct device(s) (i.e. the device(s) the BIOS is configured to boot from) to install GRUB on.
Multiple devices can be selected.
Please note: Select only devices (e.g. /dev/sda), not partitions (e.g. /dev/sda1). Do not select device mapper devices (e.g. /dev/dm-0).
ucr commit /etc/default/grub
9.) Reboot


Thanks for all help here. Now I can use the restore!!!!!

PTide
Veeam Software
Posts: 4663
Liked: 386 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: Restoring a Volume to Software-RAID1

Post by PTide » Jan 11, 2019 2:59 pm

Thank you for getting back to us with that. Maybe we could implement some sort of semi-automatic post-restore routines for advanced restore scenarios (migration from/to RAID, dissimilar hardware restores, etc.) in the next versions of recovery ISO.

Thanks!

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests