Recovery from HP 2000 snapshots. Mount GFS2 on single node

Last week I had to recover one of my virtual machine images from snapshot. I’m using HP2000 storage with feature of snapshot schedule. My schedule is configured to keep 4 snapshots in storage, so i can revert my volume up to 4 days back.

So I have my snapshot with  Clustered LVM, GFS2 filesystem and my virtual machines images on it.

The first problem I had was when I tried to map snapshot to one of my clustered hosts. Mapped Volume had the same blkid what existing ones so multiphd thought it was just another path to disk. The easiest way to fix it was to recover my snapshots from another host connected to SAN. I will call this host backup_recovery_host

I mapped Snapshot to my backup_recovery_host , and I had to reload qlogic driver to see it:

modprobe -r qla2xxx

modprobe  qla2xxx

Now using fdisk -l I saw my snapshots.

Next step was to copy lvm configuration from /etc/lvm/backup/Volume_Group.xml  on one of cluster nodes. and put it in the same directory on my backup_recovery_host.Now problem is that I’m using clustered lvm on my cluster, so every Volume group can be used only in cluster, so I had to make it work on a single host.To do that I had to edit Volume_Group.xml file and erase option “Clustered” from status. Here is an example of file.

before:

Volume_Group {
id = "fFzAj3-KW3t-BjdC-gv4a-saOo-W6WC-19Ak8v"
seqno = 2
status = ["RESIZEABLE", "READ", "WRITE", "CLUSTERED"]

....................

after

Volume_Group {
id = "fFzAj3-KW3t-BjdC-gv4a-saOo-W6WC-19Ak8v"
seqno = 2
status = ["RESIZEABLE", "READ", "WRITE"]

.........................

Ok now we have to restore information about our Volume_Group ( but now it is’n seen as clustered). We can use command:

vgcfgrestore Volume_Group

now using lvs command we can see logical volumes on Volume_Group. Now we have to make them online using command:

lvchange -ay /dev/Volume_Group/Logical_Volume

So we can try to mount our filesystem now. Next problem is that it has GFS2 filesystem on it which is configured to work in cluster environment. To mount it on a backup_recovery_host in /mount_point use:

mount.gfs2 -o ignore_local_fs,lockproto=lock_nolock /dev/Volume_Group/Logical_Volume /mount_point/

This command forces filesystem to work without lock protocol and allows us to mount filesystem on backup_recovery_host.

Now we can restore our images

 

Advertisements

2 thoughts on “Recovery from HP 2000 snapshots. Mount GFS2 on single node

  1. Turki says:

    Thank you very much.
    It worked like a charm !

    Regards,
    Turki

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s