1826190 Members
2470 Online
109691 Solutions
New Discussion

Re: iscsi and saniq

 
SOLVED
Go to solution
Scott_14
Regular Advisor

iscsi and saniq

Is anyone out there using iscsi and saniq for doing snap shots?

If so can someone offer me some useful process or how they are doing this for a backup?
Someone from my end did a snap on the san side, however I am believing there more to this than that, as in having to at least mount the file system that is getting the snap so it has useful data structure so it can be backed up, or exported to another system for backup.

thanks
scott
9 REPLIES 9
Tim Nelson
Honored Contributor

Re: iscsi and saniq

I am not using iscsi or saniq but I would be lieve the method of snap copies would be then same.

Set up array resources for snap, quiesce the source application, execute snap. Present snap volume on same or other host, import vgs, fsck filesystems, mount and execute backups.

Scott_14
Regular Advisor

Re: iscsi and saniq

Well, the snap was done at the san level, before the system even knew about it, and for I guess giggles it was then presented
back to the system where I can see the drives, but I was concerned of importing it, since I did not want to overwrite the current volume group that was snapped, and I did not know if this type of snap, actually had all the volume group and lvol data to be able to import, since I did not have this disk mounted before.

so if its snapped at the sna level your saying we should be able to import it?
Tim Nelson
Honored Contributor
Solution

Re: iscsi and saniq

You can import the devices with a differnt VG name.

( you may have to execute vgchgid on the volumes if you get a message durning the import )

Here would be the steps.
vgexport -p -m /tmp/map.vgorig /dev/vgorig
mkdir /dev/vgnew
mknod /dev/vgnew/group c 64 0x0A0000
vgimport -m /tmp/map.vgorig /dev/vgnew /dev/dsk/cxtxdx ...list all disks
vgchange -a y /dev/vgnew
fsck /dev/vgnew/lvolx ( repeat for each )
mount /dev/vgnew/lvolx /snap/vol1

Then before the next snap.
umount
vgchange -a n /dev/vgnew
vgexport /dev/vgnew


Don't forget that if the snap is taken in while the application is running your data will most likely be corrupt. Either shutdown the app during snap or at least put in some form of hot backup mode.


Scott_14
Regular Advisor

Re: iscsi and saniq

Tim
one silly question,

this is assuming the disk and such is mounted on the system during the snap?

I do have a process to freeze the db.

I only ask the above is because someone had snapped it before the system even knew of it.

I do thank you for your time.

Scott
Tim Nelson
Honored Contributor

Re: iscsi and saniq



>>this is assuming the disk and such is mounted on the system during the snap?

Which disk ? The snap disk ? or the origionals ?




Scott_14
Regular Advisor

Re: iscsi and saniq

The Snap was done at the SAN level, with the disk not even mounted/presendted to the system.

I was not sure if being done this way if you could import it, since the disk was never configured on the HP side, it was presented
after the SNAP.

So being done this way, you can also import it? I did not know since I never really exported it first.

thanks
Tim Nelson
Honored Contributor

Re: iscsi and saniq

The snap disks are going to be exact duplicates of the sources including LVM header info hence the need to do a vgimport with a new name using the map file from the origionals.

This cannot be done while the snaps are registered by the system for one of two reasons. 1) the filesystem stucture is updated behind the scene and will confuse the OS if mounted during snap operation. 2) Most of the time snap operations take the snap volumes offline if only for an instant, if still active on the system then you will get errors on the system.

Summary of procedure:

Initial first time:
execute snap
present snap vols to server
ioscan and insf so server sees new vols
vgimport using map file from origionals
activate vg
fsck new vols
mount new vols

Time to re-snap:
unmount snap vols from server
deactivate vg
vgexport
execute snap

Time to remount:
ioscan to re-register device files
vgimport with map file
fsck
mount
Scott_14
Regular Advisor

Re: iscsi and saniq

BINGO

That is what I was asking, maybe not enough coffee....

THANKS...

I was not sure if it would replicate the volume group info, so for the fast test we did, I was in a sense correct that it was a duplicate and needed imported, however it would have to be done as a different group.

The ideal here was to mount it to another system.

Thank you.

Scott
Tim Nelson
Honored Contributor

Re: iscsi and saniq

If mounting the snaps to another server you will need to add the vgchgid command to the list of actions just prior to the vgimport.

i.e. vgchgid /dev/rdsk/cxtxdx /dev/rdsk/cxtxdx ...


Check out the man page for description.