I have a requirement of backup of a vg containing a file system.
vg1 contains 3 LV each of 50G size. They are coming out from ~350G harddisk. and only 150G is being used.
Now, i want to dd this hdisk and restore to another machine. I am not sure how to go about this.
Can some one please point me how to go about this?
i am trying
dd if=/dev/vg1 of=/export/home/image1 bs=64M
but it is throwing dd read error: No such device or address
Why in the world are you using DD? And you are using VG.
Does those LV's have a mount point? Do you have a backup tool? (like TSM, netbackup etc..,)
If your answer is yes then try this,
1st take the snap of vg by running
mkvgdata -X -m <vgname>, this will just capture the skeleton of your VG (that includes your filesystem info and its size
The information is captured under '/tmp/vgdata' directory, look for your vgname directory under that (it will contain files like filesystems vgname.data, loglv.map, etc..,).
Now, goto the destination system where you want to restore the VG
Remember, that you need a disk of same size as it will create the same mapping.
copy the vgdata directory to the destination server and run
restvg -r -d <location of vgdata/vgname.data file> <hdiskX>
It will recreate all the Logical volumes and also mount the file systems.
Now restore the data from your backup tool.
Second option (say you don't have backup tool) is using savevg to take the entire VG backup
savevg -i -A -f /<location of backup>, it will be a full backup.
if you use '-r' flag, it wont backup the files in VG (just like mkvgdata command)
Actually, i am very new to this platform and someone told me to do this task
From Node1
1) create a VG with 1 or more LV
2) create a file system on this vg.
3) varyoff vg1
4) exportvg hdisk31
Now from node1
1) importvg hdisk5
2) varyonvg vg1
As disk is shared among node1 and node2.
I am unable to do that.
For systems which don't have shared disk. I have to do below things
From Node1,
1) use dd to copy whole image ( ~10G) of hdisk31
2) restore on node3 using dd of same size disk.
3) Now, importvg hdisk?
4) Now, ensure vg and lv is available.
5) now, mount file system
am i missing any thing.
We don't have any backup thing. we want to back of dd image only.
You are confusing me here, what are you trying to do?
You are saying for system you don't have shared disk you are importing the disk. How come you import a disk? what is the point of importing a disk when it is not shared?
Look, simple approach is use the savevg and restvg.