Dd of disk contains vg and restore on another m/c


 
Thread Tools Search this Thread
Operating Systems AIX Dd of disk contains vg and restore on another m/c
# 1  
Old 09-19-2013
Dd of disk contains vg and restore on another m/c

Hello gurus,

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
Code:
dd if=/dev/vg1 of=/export/home/image1 bs=64M

but it is throwing dd read error: No such device or address

thanks in advance

Last edited by Scott; 09-19-2013 at 04:29 PM.. Reason: Code tags
# 2  
Old 09-19-2013
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
Code:
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
Code:
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
Code:
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)

Use restore command to restore the VG.
# 3  
Old 09-20-2013
Hello,

Thanks and appreciate you response.

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.

Thank in advance.
# 4  
Old 09-20-2013
Quote:
Originally Posted by abhishekdave
Hello,

Thanks and appreciate you response.

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.

Thank in advance.

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.
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. HP-UX

How to restore from disk?

Our new rx2800 server is running HP-UX 11iV3. We have a cron script to perform an fbackup to a file on disk nightly. Now I'm trying to do a test restore, but I can't seem to find the correct way to specify the backup file as the source in frecover. Can anyone point me in the right direction? ... (5 Replies)
Discussion started by: jduehmig
5 Replies

2. UNIX for Advanced & Expert Users

LVM - restore metadata on other disk

Hi guys, I would like to ask your opinion about my theory, how to fix my broken LVM without risking any data loss. I use Archlinux at home. I just love this distro, even it gives me a lots of work (particularly after system updates). Basic system spec: AMD FX(tm)-6100 Six-Core Processor... (1 Reply)
Discussion started by: lyynxxx
1 Replies

3. AIX

mksysb restore - Wrong OS level for restore

Hi all, I am still working on my mksysb restore. My latest issue is during an alt_disk_install from tape I got the following error after all the data had been restored. 0505-143 alt_disk_install: Unable to match mksysb level 5.2.0 with any available boot images. Please correct this... (0 Replies)
Discussion started by: pobman
0 Replies

4. Solaris

after ZFS can not restore VTOC of disk..

I tried to use zfs .. only for test ..so when I take my test disks into zfs pool their VTOC changed .. and 7th slice does not appear now. How can I restore default VTOC to my disks. my machine is x86 .. SunFire X4200 .. so this disks do not have slices like sparc machines .. they have... (6 Replies)
Discussion started by: samar
6 Replies

5. UNIX for Dummies Questions & Answers

How to restore a dump file on the disk

Hi all, i am a real dummy to unix and in need of help.My platform is Sun solaris(5.9) I have a dump file, an oracle cold backup taken with ufsdump command. This dump file resides on the disk, not the tape. I want to extract this dump file to a directory. But i cant, i read about ufsrestore... (1 Reply)
Discussion started by: merope
1 Replies

6. Filesystems, Disks and Memory

Restore to disk from tape

I have been restoring from tape some old data. I have done quite a few tapes and have had no problems until now. The command I am running is "dd if=/dev/rmt/1hbn bs=1024 | tar -pBxF - ". This is the second tape have have come up with the error "Not enough space". This tape has a couple of... (1 Reply)
Discussion started by: mtoombs
1 Replies
Login or Register to Ask a Question