Restoring RAID1 from xfsdump

Issues related to applications and software problems
tomek_vz82
Posts: 3
Joined: 2017/09/20 07:40:43

Restoring RAID1 from xfsdump

Postby tomek_vz82 » 2017/09/20 08:03:21

Hy,

Beginner here si please bare with me for any stupid decisions....I try to create a simple backup/restore solution for CentOS 7 Samba server, for root (OS) partition (like Acronis Trueimage for Windows or Clonezilla). It runs everything on 2 drives in RAID1+separate HDD for backup,i keep samba shares on separated partition and i make backups on that with rsnapshot/rsync. So what i do is to create level 0 xfsdump to a file on separate HDD every 1 week like this:

xfsdump -l 0 -M CentOS -L "Backup level 0 of ROOT `date`" -f /backup/ROOT_DUMP /

I wold like to restore this dump image to new server or drives in case of emergency. I try to restore this to new drives (i experiment in KVM/QEMU and on test PC) however - OS does not boot. Error is that dracut-initramfs cann't find new "RAID HDD" (/dev/disk/by-UUID/*******). UUID for new RAID array is correct but this does not work. I do this:

Build new RAID1 (Fedora Live boot cd):

1. mdadm --create --verbose /dev/md0 --level=mirror --raid-devices=2 /dev/sda1 /dev/sdb1 --metadata=0.90
2. format md0 drive - XFS > mount md0 to /mnt
3. Xfsrestore -f ROOT_DUMP /mnt
4. mdadm -Es > replace UUID of RAID array in mdadm.conf and grub.cfg and fstab (dev/sda1 UUID in this case)
mdadm -Es > RAID UUID zamijenit u grub.cfg
5. Grub 2 restore (md0 is mounted on /mnt):
sudo mount --bind /dev /mnt/dev &&
sudo mount --bind /dev/pts /mnt/dev/pts &&
sudo mount --bind /proc /mnt/proc &&
sudo mount --bind /sys /mnt/sys &&
sudo chroot /mnt
grub2-install /dev/sda
grub2-install /dev/sdb
grub2-mkconfig -o /boot/grub2/grub.cfg
6. reboot to OS

And nothing...tried also to tinker with initramfs but same result:

dracut -f /boot/initramfs-2.6.32-358.el6.x86_64.img 2.6.32-358.el6.x86_64 (depending on installed kernel)

What am i doing wrong?

hunter86_bg
Posts: 735
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: Restoring RAID1 from xfsdump

Postby hunter86_bg » 2017/09/21 18:07:59

Have you compared your steps to the Red Hat's guide?

tomek_vz82
Posts: 3
Joined: 2017/09/20 07:40:43

Re: Restoring RAID1 from xfsdump

Postby tomek_vz82 » 2017/09/25 09:08:52

hunter86_bg wrote:Have you compared your steps to the Red Hat's guide?


I compared my solution to this:

https://access.redhat.com/documentation ... store.html

I don't see difference...do you have in mind some other guide?

P.S. - tried this on Debian briefly - it works so i know it is probably something in CentOS i need to change for it to work. Selinux is disabled when XFSDUMP was made so that should not be the problem...

hunter86_bg
Posts: 735
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: Restoring RAID1 from xfsdump

Postby hunter86_bg » 2017/09/25 14:20:14

Could you try the following:
1.Create a dump
2.Load the Install DVD
3.Remove the files manually

Code: Select all

rm -rf /mnt/sysimage/*

4.Restore from the dump and boot from the restored machine

tomek_vz82
Posts: 3
Joined: 2017/09/20 07:40:43

Re: Restoring RAID1 from xfsdump

Postby tomek_vz82 » 2017/09/25 16:03:04

hunter86_bg wrote:Could you try the following:
1.Create a dump
2.Load the Install DVD
3.Remove the files manually

Code: Select all

rm -rf /mnt/sysimage/*

4.Restore from the dump and boot from the restored machine


I tried something similar - i deatached two raid drives and connected two new drives and tried to do xfsrestore from image (third drive) - same problem. I don't understand.

P.S.tried same thing with Fedora - works. Could this be a bug or is it maybe something about my hardware that makes problems?

hunter86_bg
Posts: 735
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: Restoring RAID1 from xfsdump

Postby hunter86_bg » 2017/09/25 18:02:57

It seems to be lacking a 'feature'.Just open a bug in bugzilla.