How to re-attach FC storage after reinstalling rhev manager ?
Hi,
After successfull setup of a rhevm with 2 rhevh both connected to an NFS ISO and a FC domain, I decided to reinstall the manager from scratch (with the last version as the previous was beta one).
I managed reattaching the NFS ISO but I'm unable to reattach FC storage.
This is the Multipath -ll output showing that both LUNs are available:
3600508b40006bd730005300000090000 dm-1 HP,HSV200
size=150G features='1 queue_if_no_path' hwhandler='0' wp=rw
|-+- policy='round-robin 0' prio=50 status=active
| |- 0:0:1:1 sdc 8:32 active ready running
| `- 1:0:0:1 sde 8:64 active ready running
`-+- policy='round-robin 0' prio=10 status=enabled
|- 0:0:0:1 sda 8:0 active ready running
`- 1:0:1:1 sdg 8:96 active ready running
3600508b40006bd730005300000100000 dm-2 HP,HSV200
size=151G features='1 queue_if_no_path' hwhandler='0' wp=rw
|-+- policy='round-robin 0' prio=50 status=active
| |- 0:0:1:2 sdd 8:48 active ready running
| `- 1:0:0:2 sdf 8:80 active ready running
`-+- policy='round-robin 0' prio=10 status=enabled
|- 0:0:0:2 sdb 8:16 active ready running
`- 1:0:1:2 sdh 8:112 active ready running
[root@rhevh2 ~]#
I successfully managed creating a new FC domain using my second LUN (151GB one).
Is there any thing to do to get this storage back up?
Regards
Bernard
Responses
Hi,
If you are looking to create a new Storage domain using the lun and don't want to preserve guest images from old set up or other data that may be in the lun, then you need to wipe out the data from the lun using dd.
dd if=/dev/zero of=/dev/lun/lun
Then press ctr + c after 5 seconds and try to re-add the storage domain.
If there are guest images in the lun that need to be retrieved, there is no supported way to do that if you have not exported them to an export domain.
To protect against RHEV-M failure, you need to have a reecent backup of the RHEV-M database. With the database and the LUNs intact, you can recover from any failure.
In production I normally dump my database using a simple script once every hour, and rsync those dump files to a remote host. This is something VERY easily done, through just a couple of lines in bash and cron.
You need to understand that the storage domain only contains VM images, with no indication as to which image belongs to which VM, and which belongs to a template and not a VM. This is why there are export domains by the way - during the export, the VM data is dumped into an OVF file that is stored on the export domain along with the images
The database contains the data that maps VM disk images to VMs, snpashots and templates. These two need to work together, and without the database, the storage domain is just a bunch of images, where it's not easy to determine which used to belong to which VM.
> what if a production RHEVM manager fail?
If you have database backup from the crashed rhevm, it's possible to restore the database to the newly installed RHEVM so that you can use everything from the old storage domain. Make it a practice to backup database and other configuration files regularly.
> Is there any conservative things to do (exports?) so that to be able to recover
VMs in case of?
Ofcourse, you need to backup data in your vms. You can regularly backup your vms to export domain or you can run a backup agent inside you vm to take backup of important files and application to a remote server. So if the vm crashes beyond recovery, you can import from the export domain or provision a fresh vm and restore application data from backup.
it is posible if you have a export domain and luns are intact :) , the procedure is odd but it could be possible ,
the requeriments are
1) Reinstall the RHEV-M, configure a Datacenter , Cluster, Hosts, Storage Data Domain(FC/iSCSI) active
2) Configure a export domain with suficient space to exports vms.
3) Connect the luns to RHEV-M host
4) scan your disk to search vgs :
4.1) lvmdiskscan
4.2) pvscan
4.3) vgscan
4.4) vgchange -ay vg_name
5) look to lvs master , mount /dev/vgname/master /mnt/rhevmaster
6) cd vms, you will see a vm ids dirs
7) cd eb8aab1a-e94b-4d89-9ca4-de6db1610d74
8) view file.ovf
9) look for ids of disks virtual machine grep --color -i disk file.ovf
10) create a virtual machine importing disks using virt-manager
11) Test the machine run
12) Shutdown the vm
13) Active and Attach the Export Storage Domain
14) Use virt-v2v to export the vm again to RHEV in new Data Storage Domain
kind regards,