HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
cancel
Showing results for 
Search instead for 
Did you mean: 

Noob At Volume Manipulation

 
J.Kimbrell
Advisor

Noob At Volume Manipulation

Hello All,
I have a question. The following is my current setup:
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 1179648 611704 563664 52% /
/dev/vg00/lvol1 1776056 31248 1567200 2% /stand
/dev/vg00/lvol8 20971520 6766176 14094432 32% /var
/dev/vg00/lvol7 4587520 1713496 2852600 38% /usr
/dev/vg00/lvol4 524288 270896 251584 52% /tmp
/dev/vg00/lvol6 5111808 3996016 1107136 78% /opt
/dev/vg00/lvol5 114688 9688 104248 9% /home
The above volumes are on "c2t1d0"

a ioscan shows:
Class I H/W Path Driver S/W State H/W Type Description
============================================================================
disk 0 0/0/3/0.0.0.0 sdisk CLAIMED DEVICE TEAC DV-28E-C
/dev/dsk/c0t0d0 /dev/rdsk/c0t0d0
disk 1 0/1/1/0.1.0 sdisk CLAIMED DEVICE HP 73.4GST373453LC
/dev/dsk/c2t1d0 /dev/rdsk/c2t1d0
disk 2 0/1/1/1.0.0 sdisk CLAIMED DEVICE HP 73.4GST373453LC
/dev/dsk/c3t0d0 /dev/rdsk/c3t0d0

I want to run a data dump to c3t0d0 but need to know if I must create the "lvol*'s on c3 like they are on c2 and how to do that so they are identical, or will the data dump (dd) do that automagically ?
Let me know what additional info you might need. Again, major noob to this....
19 REPLIES
Shrikant Lavhate
Esteemed Contributor

Re: Noob At Volume Manipulation

Hi there,

you want a data dump? If you want a current copy of data and take it away then any backup (dd, fbackup)or copy utility works for you.
If you are looking for mirroring the data then you must follow the root mirror steps since it looks like you are aiming at lvols of root VG.

Itanium:
http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801?ciid=00089099cee021109099cee02110275d6e10RCRD

PA-RISC:
http://h30499.www3.hp.com/t5/System-Administration/11-23-on-PA-RISC-Procedure-for-root-mirroring/m-p/3800318#M266404


And if main objective behind backing up root VG is OS backup then "ignite" is the way to go!
Refer ignite guide for more details.

--SK

Will it remain a personal, if I broadcast it here!
Shrikant Lavhate
Esteemed Contributor

Re: Noob At Volume Manipulation

Hi there,

you want a data dump? If you want a current copy of data and take it away then any backup (dd, fbackup)or copy utility works for you.
If you are looking for mirroring the data then you must follow the root mirror steps since it looks like you are aiming at lvols of root VG.

Itanium:
http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801?ciid=00089099cee021109099cee02110275d6e10RCRD

PA-RISC:
http://h30499.www3.hp.com/t5/System-Administration/11-23-on-PA-RISC-Procedure-for-root-mirroring/m-p/3800318#M266404


And if main objective behind backing up root VG is OS backup then "ignite" is the way to go!
Refer ignite guide for more details.

--SK

Will it remain a personal, if I broadcast it here!
Pete Randall
Outstanding Contributor

Re: Noob At Volume Manipulation

See Clay's "lifeboat" comments in this thread:

http://h30499.www3.hp.com/t5/LVM-and-VxVM/Create-copy-of-boot-disk-How/m-p/2896744#M13268


Note that I said comments (plural)!


Pete


Pete
J.Kimbrell
Advisor

Re: Noob At Volume Manipulation

As stated, I want to do a ;
dd if=/dev/rdsk/c2t1d0 of=/dev/rdsk/c3t0d0

but need to know if I need to create all the (c2t1d0) /dev/vg00/lvol*'s on c3t0d0 (vg01) as they are on c2t1d0? and how to do that.
Also, does c3t0d0 need to be mounted first or not before running the "dd"?

Thx ahead of time .
J.
J.Kimbrell
Advisor

Re: Noob At Volume Manipulation

Hi Pete, thx for that, but I still have a couple of questions to be answered in my previous post.
Pete Randall
Outstanding Contributor

Re: Noob At Volume Manipulation

See Peggy Fong's detailed response in this thread. That should answer your qestions.

(thread deleted)


Also, Clay offers his "lifeboat creation" script in this thread:

http://h30499.www3.hp.com/t5/System-Administration/Copying-the-boot-disk/m-p/2611549#M36256

Pete


Pete
J.Kimbrell
Advisor

Re: Noob At Volume Manipulation

Thx to everyone, I've looked at the suggested threads and still getting nowhere.
I've had the volume group "vg00" as seen below:

# bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 1179648 681072 494824 58% /
/dev/vg00/lvol1 1776056 31248 1567200 2% /stand
/dev/vg00/lvol8 20971520 6708312 14151912 32% /var
/dev/vg00/lvol7 4587520 1719472 2846648 38% /usr
/dev/vg00/lvol4 524288 270896 251584 52% /tmp
/dev/vg00/lvol6 5111808 3996016 1107136 78% /opt
/dev/vg00/lvol5 114688 26360 87704 23% /home
*****Then created a new vg (vg01) as seen below:
/dev/vg01/lvol1b 1795241 9 1615707 0% /standb
/dev/vg01/lvol3b 1179648 16758 1090217 2% /rootb
/dev/vg01/lvol4b 524288 16597 475968 3% /tmpb
/dev/vg01/lvol5b 114688 1141 106458 1% /homeb
/dev/vg01/lvol6b 5111808 17721 4775714 0% /optb
/dev/vg01/lvol7b 4587520 17593 4284314 0% /usrb
/dev/vg01/lvol8b 20971520 21608 19640550 0% /varb

Then, when I run the following:
dd if=/dev/vg00/lvol1 of=/dev/vg01/standb bs=8000

I get a big fat file under /dev/vg01 instead of the volume /standb.

# pwd
/dev/vg01
# ls -lrt
total 1134864
cr--r--r-- 1 root sys 64 0x010000 Feb 18 12:59 group
br--r----- 1 root sys 64 0x010001 Feb 18 12:59 lvol1b
cr--r----- 1 root sys 64 0x010001 Feb 18 12:59 rlvol1b
cr--r----- 1 root sys 64 0x010003 Feb 18 12:59 rlvol3b
br--r----- 1 root sys 64 0x010003 Feb 18 12:59 lvol3b
br--r----- 1 root sys 64 0x010004 Feb 18 12:59 lvol4b
cr--r----- 1 root sys 64 0x010004 Feb 18 12:59 rlvol4b
br--r----- 1 root sys 64 0x010005 Feb 18 12:59 lvol5b
cr--r----- 1 root sys 64 0x010005 Feb 18 12:59 rlvol5b
cr--r----- 1 root sys 64 0x010006 Feb 18 12:59 rlvol6b
br--r----- 1 root sys 64 0x010006 Feb 18 12:59 lvol6b
br--r----- 1 root sys 64 0x010007 Feb 18 12:59 lvol7b
cr--r----- 1 root sys 64 0x010007 Feb 18 12:59 rlvol7b
cr--r----- 1 root sys 64 0x010008 Feb 18 12:59 rlvol8b
br--r----- 1 root sys 64 0x010008 Feb 18 12:59 lvol8b
br--r----- 1 root sys 64 0x010002 Feb 18 13:13 lvol2b
cr--r----- 1 root sys 64 0x010002 Feb 18 13:13 rlvol2b
-rw-rw-rw- 1 root sys 581042176 Feb 18 13:20 standb <--Big Fat file.

Why is this not going to /standb ???


J.Kimbrell
Advisor

Re: Noob At Volume Manipulation

Wow, just great, ran the lifeboat script and this is what I got....

# lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c2t1d0 (0/1/1/0.1.0) -- Boot Disk
Boot: lvol1 on: /dev/dsk/c2t1d0
Root: lvol3 on: /dev/dsk/c2t1d0
Swap: lvol2 on: /dev/dsk/c2t1d0
Dump: lvol2 on: /dev/dsk/c2t1d0, 0

Boot Definitions for Volume Group /dev/vg01:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c3t0d0 (0/1/1/1.0.0) -- Boot Disk
No Boot Logical Volume configured
Root: ??? on: /dev/dsk/c3t0d0
Swap: ??? on: /dev/dsk/c3t0d0
Dump: ??? on: /dev/dsk/c3t0d0, 0

*************
Where are the files at? bdf shows nothing different that it did before i ran the script.
J.Kimbrell
Advisor

Re: Noob At Volume Manipulation

Nobody? Must have stumped the experts..;-)
Torsten.
Acclaimed Contributor

Re: Noob At Volume Manipulation

You want to have a kind of "backup" of your boot disk? If you have 11.23 or above you should use DRD!

However, you should mirror your boot disk and do the "backup" on a third disk!

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
J.Kimbrell
Advisor

Re: Noob At Volume Manipulation

Thx torsten, but no help, need to make an exact copy of primary disk, without mirroring, just want an exact copy.

Using all the suggest scripts, lifeboats are not working, can't see how they ever did, but trying an exact copy of syntax that they supply shows errors.

SO, the original question still stands, how to make an exact copy of a disk to another disk without mirroring.

Torsten.
Acclaimed Contributor

Re: Noob At Volume Manipulation

>> dd if=/dev/vg00/lvol1 of=/dev/vg01/standb bs=8000


The system did what you told to do, create a file named /dev/vg01/standb.

If you do this kind of "copy", take vg00/rlvol1 as source, vg01/rlvol1 as destination (lvol to lvol).


Better use DRD, if you run 11.23 or 11.31!!!

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
J.Kimbrell
Advisor

Re: Noob At Volume Manipulation

Thx torsten, did that with similar results.
Shows blocks copied, but I can't find where they went:

Filesystem kbytes used avail
/dev/vg00/lvol5 114688 26368 87696 23% /home

***************************************
/dev/vg01/lvol5b 114688 1206 106461 1% /homeb

dd if=/dev/vg00/lvol5 of=/dev/vg01/lvol5b bs=8000

No different in the file sizes, so, where did it actually go to?

Patrick Wallek
Honored Contributor

Re: Noob At Volume Manipulation

If you go back and re-read Clay's response in one of the threads provided, you will see that he does NOT do the 'dd' at the LVOL level. Rather, he does it disk-to-disk.

dd if=/dev/rdsk/c1t6d0 of=/dev/rdsk/c2t6d0 bs=8000k

This command will make an exact copy of disk c1t6d0 to disk c2t6d0.

If you just need an exact copy, then modify your dd accordingly.

If should look something like:

dd if=/dev/rdsk/c2t1d0 of=/dev/rdsk/c3t0d0 bs=8000k

Now if disk c2t1d0 goes down, you can replace it with the other disk and boot normally.

I would quit trying to muck with dd'ing from one LV to another.
J.Kimbrell
Advisor

Re: Noob At Volume Manipulation

Hi Patrick,
Thx for the response.
I did the copy as you suggested and as was suggested in previous posts, however, going from /dev/vg00/lvol5 to /dev/vg01/homeb doesn't show anything other than a big old file under as showed earlier.

Shouldn't I be able to see something go to the other disk? Shouldn't I be able to see files on the destination disk?

Do I have to mount the destination disk?....like I said, noob at this and I'm not getting any decent help here. Sorry guys, but it is what it is...
Torsten.
Acclaimed Contributor

Re: Noob At Volume Manipulation

>> going from /dev/vg00/lvol5 to /dev/vg01/homeb


I already told you, this is wrong.

You copy the LVOL to a file.



What is your OS version???

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
J.Kimbrell
Advisor

Re: Noob At Volume Manipulation

Maybe I'm missing something, I don't want to copy a directory to a file, I want to copy it to another disk using "dd".

My OS is; HP-UX ptcsrv3 B.11.23

Also, when I try:
# dd if=/dev/rdsk/c2t1d0 of=/dev/rdsk/c3t0d0 bs=8000
dd read error: Invalid argument
0+0 records in
0+0 records out

Wow, my ignorance is frustrating.
Torsten.
Acclaimed Contributor

Re: Noob At Volume Manipulation

I would try this:

# drd clone -p -v -t /dev/dsk/c3t0d0

(if c3t0d0 is your empty disk)


This makes a (bootable!) clone of the current boot disk. (-p is for preview)

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Torsten.
Acclaimed Contributor

Re: Noob At Volume Manipulation

The advantage of DRD:

You can boot this clone directly, you can even install patches on the inactive image or mount it easily.

The disadvantage of "dd":

You cannot boot this disk without change the slot or adjust the LVM configuration, you cannot (should not) even mount it without changing the VG id.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!