SUMARRY: Help with RAW Devices

From: gdemps - Gareth Dempsey <GDEMPS_at_acxiom.co.uk>
Date: Tue, 25 Jul 2000 09:15:05 +0100

Thanks go to;

Vipin Gokhale
Serguei Patchkovskii
Alan _at_ Nabeth

I have included their answers in full and attached my original question at
the bottom.



        First, Oracle is wrong about the size of the "header" data,
        it is only a few sectors. It won't be more than 16 sectors
        (8 KB) and may only be one.

        If the target disk already has a disklabel, it is usually
        read-only except by the applications that manage it. That's
        the reason you want to skip it, so that you don't try to
        write a read-only area. If the disk doesn't have a label
        or you've made the label read-write, then you don't need
        to worry about the write error you'd get trying to copy it.

        Since the partition table is part of the disklabel, you do
        want to allow for it if the target disk is a different size
        than the source. Moving to a smaller disk, you'll have some
        partitions that are larger than the disk. Some disk related
        software double checks that the partition size isn't larger
        than the available space, but some doesn't. If moving to a
        larger disk, the partition table of the source disk will
        limit the space you can use.

----------------------------------------------------------------------


Don't need to seek/skip when copying between raw volumes; however you still
may
need to use these options if you're copying to partition a or c. A and c
partitions partitions include first physical block of the device which the
OS
write protects.


--------------------------------------------------------------------------

I belive this is wrong: the "header" on a *non-bootable* disk is just a
volume
label - and it takes 1 sector (512 bytes). A bootable disk will additionally
contain primary and secondary boot records; they *may* add up to 64K - but I
don't know whether they do or not. In any event, the disk label and boot
records appear ONLY at the beginning of the physical disk, so that only the
raw devices pointing to partitions starting at sector 0 (partitions a and c
by default) will have some reserved space on them. You are perfectly free
to use all blocks of any raw partition with does not start at sector 0.


----------------------------------------------------------------------------
------

Original Q:


> One of our DBA's is wanting to move datafiles between raw volumes and I
> think I can use dd to do this, I've tried to find some information
relating
> to this and I noticed the following extract in some Oracle docs.
>
> Digital UNIX utilises a 64k operating system header at the beginning of
each
> raw device.
>
> Use the seek= option with the UNIX dd command to skip the first 64k of the
> raw
> device before attempting to write data. Assuming the default blocksize of
> 512
> bytes used by dd, the value would be seek=128.
>
> My question is;
> can I go ahead and copy the operating system header from one raw device to
> another, or do I need to add in the seek option in dd.

Best Regards,
Gareth Dempsey
UNIX Systems Administrator
Acxiom LTD
Tel: 0191 525 7474
Fax: 0191 525 7007



The information contained in this communication is
confidential, is intended only for the use of the recipient
named above, and may be legally privileged. If the reader
of this message is not the intended recipient, you are
hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.
If you have received this communication in error, please
re-send this communication to the sender and delete the
original message or any copy of it from your computer
system.
Received on Tue Jul 25 2000 - 08:15:17 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:41 NZDT