Operating System - HP-UX
1829636 Members
1743 Online
109992 Solutions
New Discussion

Re: Copying raw files to cooked filesystem files: size of OS header in HP-UX

 
SOLVED
Go to solution
Ron Levy
Advisor

Copying raw files to cooked filesystem files: size of OS header in HP-UX

I'm trying to copy a raw filesystem to a cooked filesystem. I need to be sure of the raw device header size, so I don't copy it as well. Where can I find this information for HP-UX 11.00?

Thanks,
Ron Levy
4 REPLIES 4
PIYUSH D. PATEL
Honored Contributor

Re: Copying raw files to cooked filesystem files: size of OS header in HP-UX

Hi,

The raw filesystem will be always accessed by
/dev/vg01/rlvol1 and the normal filesytem will be accessed by /dev/vg01/lvol1

What exactly do you want to do ??

You cannot copy the contents of the raw filesystem into a cooked filesystem.

Piyush
A. Clay Stephenson
Acclaimed Contributor

Re: Copying raw files to cooked filesystem files: size of OS header in HP-UX

If I understand your question, there is no 'header' associated with a raw device file - it is all data. If the raw file, is an LVM LVOL then lvdisplay will display the size of the device. If it is a physical disk then diskinfo can be used.

Probably the most general answer is to use dd to dtermine this; e.g.
dd if=/dev/rdsk/c1t5d0 of=/dev/null bs=64k

You will get a count of blocks when dd finished. (You would also use dd to do the actual copy.)
If it ain't broke, I can fix that.
Ron Levy
Advisor

Re: Copying raw files to cooked filesystem files: size of OS header in HP-UX

In further detail, I'm trying to use dd to convert an Oracle raw device to a cooked file. On the Oracle website, it indicates that you should skip a certain number of blocks in the raw device using the 'iseek' option so as to end up with something that works. The number of blocks to be skipped depends on the size of the raw device header which is dependent on OS.

Thanks,
-Ron Levy
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Copying raw files to cooked filesystem files: size of OS header in HP-UX

Although I was almost positive, I checked MetaLink and found that HP-UX and Solaris require no iseek; there are no headers. You simply do a raw vanilla dd to copy. Several years ago HP and Oracle jointly taught a class called 'Managing Oracle on HP-UX' and in my class materials I found this reference dealing with going from a cooked file to a raw device:

The partition for a datafile must be two Oracle blocks larger than the datafile placed there - Add a spare megabyte for safety.

The partition for a redo log must be 512 bytes larger than the redo log placed there - Add a spare megabyte for safety.

You therefore should have absolutely no problem going the other way.



If it ain't broke, I can fix that.