RAW DEVICE와 FILE SYSTEM 간에 오라클 데이터화일 이동하기

제품 : ORACLE SERVER
작성날짜 : 1999-11-30
RAW DEVICE와 FILE SYSTEM 간에 오라클 데이터화일 이동하기
======================================================
유닉스 명령이 dd를 이용하여 오라클 데이터화일을 Unix File System과 Raw
Device 간에 이동할 수 있으나, 플랫폼 별 Raw Device의 특성으로 인하여 주의할
점이 있다. 만일 잘못된 이동으로 인하여 데이터베이스가 기동하지 못하면,
ORA-7366 (sfifi: invalid file, file does not have valid header block.)
에러가 발생할 수 있다.
예를 들어 Digital unix의 경우는 raw device에 64k OS 헤더가 필요하므로 dd
명령어 옵션 중 iseek와 oseek를 활용하여야 한다.
다음은 예제를 통하여 데이터화일을 Raw Device에서 Unix File System으로
이동하는 절차이다.
(운영 현황)
- 현재의 위치: /dev/rdsk/c0t15d0s7
- 이동할 위치: /oracle/file/system.dbf
- 화일의 크기: 488636416 bytes <--- V$DATAFILE.BYTES column 값!
- DB_BLOCK_SIZE: 2048 bytes
(준비 단계)
1. Oracle 블럭 수 계산:
BYTES / DB_BLOCK_SIZE = 488636416 / 2048 = 238592 (블럭)
2. O/S file header 블럭 추가:
238592 + 1 = 238593 (블럭)
: "ls -l /oracle/file/system.dbf" 명령으로 확인 가능하며, O/S file
header는 1블럭으로 항상 일정함.
3. Raw Device OS header 블럭 계산:
64K / DB_BLOCK_SIZE = 65536 / 2048 = 32 (블럭)
: 사용할 dd 명령어 중 블럭의 크기를 DB_BLOCK_SIZE(2048바이트)로 할
예정이므로 2048로 나누어야 함.
(명령어 형식)
$ dd if=<raw device> of=<UFS file> bs=<oracle blocksize>
iseek=<blocks to skip> count=<total count>
(명령어 수행 절차)
(1) SVRMGR> STARTUP MOUNT
(2) SVRMGR> !dd if=/dev/rdsk/c0t15d0s7 of=/oracle/file/system.dbf
bs=2048 iseek=32 count=238593
(3) SVRMGR> ALTER DATABASE RENAME FILE '/dev/rdsk/c0t15d0s7' TO
'/oracle/file/system.dbf';
(4) SVRMGR> ALTER DATABASE OPEN;
========================================================================
반대로 Unix File System에서 Raw Device로 이동하는 명령어 형식은 아래와 같다.
(명령어 형식)
$ dd if=<UFS file> of=<raw device> bs=<oracle blocksize> \
oseek=<blocks to skip> count=<total count>
유사한 방식으로 데이타 화일 뿐 아니라 리두 로그 화일도 이동할 수 있다.
[주의] Raw Device의 블럭 헤더의 크기는 OS마다 다를 수 있으므로 플랫폼
벤더사에 미리 확인한 후 작업하여야 한다.

Similar Messages

  • OPS/RAC Vs Raw Device/File System

    Hello, firts to all, I want to know what is OPS/RAC and Raw Device/File System.
    And then know the diferens between both.
    I apologize for my english.
    Thanks.

    OPS is Oracle parallel server was available up to Oracle 8i and RAC is Real application cluster is available from Oracle 9i.
    Raw device is just presenting the disk to server and using it. File system is presenting disk more transparent and managable form using OS or third party software.
    You need to refer respective documents to know them in detail.
    Ashok

  • Browsing other devices' file system.

    I figured out that a Nokia 9500 does not act as a PDA when connected with other devices. While from a PDA u can see a Nokia 9500 file system, from a Nokia 9500 u can't see the other device file system and browse it. Am I missing something?

    It's the PDA that's missing something... security rules and regulations! You have never been able to browse the file system of another device from Nokia phones that I know of.
    This is something about other manufacturers that really disturbs me... does nobody else think that potentially this could lead to serious security issues??
    PS. If any Nokia people read this, thanks... and please don't adopt this in future either!

  • Raw devices files

    Hi,
    I already created raw devices on database 10g R2. How can make those raw devices available to oracle user?
    Best Regards
    Yassin
    Message was edited by:
    Yassin

    Yes, the os is Sun Solaris and my question how can
    create tablespaces on raw devices.create tablespace abcd datafile '/dev/rdsk/c0t0d0s4/abcd.dbf' size ...
    This is an example only, adapt it to your needs! Never fill up the rawdevice completely, leave some space for emergency situations. A different question: why are you using raw devices? What's the output of uname -a? Beginning with Solaris 8 (don't know the maintenance level), you can mount filesystems with the direct io option which gives you almost raw device performance with all advantages of a file system.
    Thank you.
    Yassin
    Message was edited by:
    Yassin

  • Can you please advice on RAW device file permission change to crw-r-----

    Currently we have Oracle9i (9.2.0.5) RAC on IBM AIX 5.2 system with 2 node cluster.
    We use the RAW device for Oracle data file default file permission for raw device is crw-rw---- can we change to crw-r-----(remove write permission from group).
    Can you please advice.
    Thanks & Regards

    Hi,
    What is your intention behind this? If protection, there can ve other ways possible.
    Regards,
    Ankit

  • Globaldevices file system

    Hi
    Solaris Cluster 3.3 u2 on Solaris 10 x86.
    I have dedicated slice for global device file system. During the cluster creation, i have not chosen the default method which is lofi method.
    For node "node1",
        Is it okay to use this default (yes/no) [yes]?  no
        Testing for "/globaldevices" on "node1" ... done
    For node "node2",
        Is it okay to use this default (yes/no) [yes]?  no
        Testing for "/globaldevices" on "node2" ... done
    After cluster creation, i am seeing lofi device for /global, i am not seeing the slice which i used for /globaldevices is used.
    # mount | grep lofi
    /global/.devices/node@1 on /dev/lofi/127 read/write/setuid/devices/rstchown/intr/largefiles/logging/noquota/global/xattr/nodfratime/onerror=panic/dev=240007f on Wed Oct  9 07:30:23 2013
    /global/.devices/node@2 on /dev/lofi/126 read/write/setuid/devices/rstchown/intr/largefiles/logging/noquota/global/xattr/nodfratime/onerror=panic/dev=240007e on Wed Oct  9 07:30:23 2013
    # mount | grep globaldevices
    /globaldevices on /dev/dsk/c0t0d0s3 read/write/setuid/devices/rstchown/intr/largefiles/logging/xattr/onerror=panic/dev=840083 on Wed Oct  9 07:30:07 2013
    # lofiadm
    Block Device             File
    /dev/lofi/126            /.globaldevices
    # du -h /.globaldevices
    1.0G   /.globaldevices
    Someone clarify me why the cluster used lofi? Since i have a dedicated slice for /globaldevice, why the cluster created lofi again ?
    Thanks & Regards,
    Shashi Kanth.

    Hi.
    According
    Planning the Oracle Solaris OS - Oracle Solaris Cluster Software Installation Guide
    In case you want have use /globaldevice as separated slice, you should:
    1.  Create UFS file systems on required device. You require at least 512 MB.
    2. Add record for this device to /etc/vfstab
    3.Mount /globaldevice.
    In this case cluster installation script will not create /globaldevice on lofi.
    Additional requirements:
    Planning the Global Devices, Device Groups, and Cluster File Systems - Oracle Solaris Cluster Software Installation Guid…
    You can use this procedure:
    Administering Device Groups - Oracle Solaris Cluster System Administration Guide
    for Migrate the Global-Devices Namespace From a lofi Device to a Dedicated Partition.
    Regards.

  • Convert Raw Device to file system based file systems for datafiles [HP-UX]

    Hello experts,
    Once again in seek of guidance..
    I am in the process of migrating my database (Oracle 7.2.3 on HP-UX 10.20 to Oracle 8.1.7 64-bits on HP-UX 11).
    Amongst one of our steps is to convert our RAW Device datafiles to File System based files within the same server and version - Oracle 7.2.3 on HP-UX 10.20.
    E.g. /dev/vg00/rlvol1 to become /d01/oradata/cmtdb/tbs1.dbf
    Is this something possible?
    Can i just do the following:
    a. Shutdown database (normal)
    b. dd if=/dev/vg00/rlvol1 of=/d01/oradata/cmtdb/tbs1.dbf bs=20k
    c. chown oracle7:dba /d01/oradata/cmtdb/tbs1.dbf
    d. svrmgrl> startup mount
    e. alter database rename file '/dev/vg00/rlvol1' to '/d01/oradata/cmtdb/tbs1.dbf'
    f. alter database open.
    Thanks very much for your replies.
    Please tell me about possible problems that i can anticipate.
    Best Regards
    Yogeeraj

    Hello experts,
    Once again in seek of guidance..
    I am in the process of migrating my database (Oracle 7.2.3 on HP-UX 10.20 to Oracle 8.1.7 64-bits on HP-UX 11).
    Amongst one of our steps is to convert our RAW Device datafiles to File System based files within the same server and version - Oracle 7.2.3 on HP-UX 10.20.
    E.g. /dev/vg00/rlvol1 to become /d01/oradata/cmtdb/tbs1.dbf
    Is this something possible?
    Can i just do the following:
    a. Shutdown database (normal)
    b. dd if=/dev/vg00/rlvol1 of=/d01/oradata/cmtdb/tbs1.dbf bs=20k
    c. chown oracle7:dba /d01/oradata/cmtdb/tbs1.dbf
    d. svrmgrl> startup mount
    e. alter database rename file '/dev/vg00/rlvol1' to '/d01/oradata/cmtdb/tbs1.dbf'
    f. alter database open.
    Thanks very much for your replies.
    Please tell me about possible problems that i can anticipate.
    Best Regards
    Yogeeraj

  • Is database using File system, RAW devices or ASM?

    Hi there
    Is is possible to find out if the database is using File system, RAW devices or ASM for storage?
    I think for ASM, we can tell by querying the V$DATAFILE view if it has ' DATA ' or something like that (a name that has ' ' prefixed to it). Is this the only way? How about other sotrage types (RAW and Filesystem)?
    Thanks in advance!

    user12033597 wrote:
    I think for ASM, we can tell by querying the V$DATAFILE view if it has ' DATA ' or something like that (a name that has ' ' prefixed to it). Is this the only way? How about other sotrage types (RAW and Filesystem)?V$DATAFILE or DBA_DATA_FILE
    Raw depends on your OS - in *nix, likely something like /dev/sdc1
    ASM depends on ASM and will include + and will follow an ASM pattern, such as described http://docs.oracle.com/cd/B19306_01/server.102/b14200/clauses004.htm
    File depends on OS - in *nix, likely start with a '/' and NOT be in /dev or /proc.  In Winders start with C:\ or some other disk path.
    Nicely discussed in the docs in the Administrators Guide found at http://tahiti.oracle.com

  • Raw devices versus Cluster File Systems in RAC 10gR2

    Hi,
    Does anyone using cluster file systems in a RAC 10gR2 installation, specifically IBM’s GPFS?
    I’ve visited a company that is running RAC 10gR2 in AIX over raw devices. Why someone would choose to use raw devices , with all the problems to administer , when all the modern file systems are so powerful? Is there any issues when using cluster file systems + RAC? Is there considerable performance benefits when using raw devices with RAC ?
    I´ve always used Oracle stand alone instances over file systems (since version 7) , and performance was always very good. I´ve tested raw devices almost 10 years ago , and even in that time (the hardware today is much better - SAN , 15K rpm disks , huge caches - and the file systems software today is much better) the cost to administer it does not compensate the benefits (only 5% more faster than file systems in Oracle 7).
    So , besides any limitations imposed by RAC , why use raw devices nowadays ?
    Regards,
    Antonio Belloni

    Hi,
    spontaneously, my question would be: How did you eliminate the influence of the Linux File System Cache on ext3? OCFS2 is accessed with the o_direct flag - there will be no caching. The same holds true for RAW devices. This could have an influence on your test and I did not see a configuration step to avoid it.
    What I saw, though, is "counter test": "I have tried comparing simple file copies from an OS level and the speed differences are not apparent - so the issue only manifests itself when the data is read via an oracle db." and I have no good answer to that one.
    Maybe this paper has: http://www.oracle.com/technology/tech/linux/pdf/Linux-FS-Performance-Comparison.pdf - it's a bit older, but explains some of the interdependencies.
    Last question: While you spent a lot of effort on proving that this one query is slower on OCFS2 or RAW than on ext3 for the initial read (that's why you flushed the buffer cache before each run), how realistic is this scenario when this system goes into production? I mean, how many times will this query be read completely from disk as opposed to use some block from the buffer? If you consider that, what impact does the "IO read time from disk" have on the overall performance of the system? If you do not isolate the test to just a read, how do writes compare?
    Just some questions. Thanks.

  • IS RAW DEVICES SUPPORTED OVER A CLUSTER FILE SYSTEM

    Can raw partions be defined for datafiles after having choosen Cluster file system as storage option for database while creating fresh database using
    DBCA?

    > Do update on how the partitions have to be defined in either cases?
    For both ASM and OCFS, a partition must exist on the disk - it can be of any partition type. Does not matter. Simply that the s/w references a partition and not an entire disk.
    So for example, /dev/sdaf and dev/sdag are two shared devices on the cluster (LUNs on the SAN or whatever).
    You create a partition on each. E.g
    # fdisk -l /dev/sdaf
    Disk /dev/sdaf: 36.5 GB, 36573020160 bytes
    255 heads, 63 sectors/track, 4446 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Device Boot Start End Blocks Id System
    /dev/sdaf1 1 4446 35712463+ 83 LinuxTo use the first device as a OCFS device, you need to build an ocfs file system on it using mkfs.
    And then it can be mounted as a "normal" cooked file system mount. Remember that /etc/fstab needs to be updated for mounting it on startup.
    To use the second device for ASM, you have two choices. If you have the ASMlib kernel module installed, you can use that to configure a volume label and assign it for use by ASM.
    Alternatively, you simply map the device (partition) to a raw device for detection by ASM. E.g.
    # raw /dev/raw/raw1 /dev/sdag1Of course, you also need to make this permanent by updating the raw device list config file so that this mapping is performed on reboot. On Linux, this is the /etc/sysconfig/rawdevices file. Also remember that the user and group access for the logical raw device created, must allow ASM full access to it (e.g. use chmod oracle.dba /dev/raw/raw1).
    In a nutshell, this is how to raw devices are used as ocfs and asm volumes. (on RHEL specifically, but I expect no major differences in this approach on other o/s's)

  • How to converrt files on RAW devices in ASM to non ASM file system.

    Hi all,
    I have on  problem .
    Is that possible to migrate ASM  raw files system to non ASM file .
    If possible plzz describe them.
    If not also please tell y not?
    Thanks in addvance
    Regards
    Krishna

    Hi,
    I totally agree with Mahir. And I just want to share one thing:
    Use %U to generate guaranteed unique names :
    For backupsets, %U means: %u_%p_%c
    For an image copy of a datafile, %U means: data-D-%d_id-%I_TS-%N_FNO-%f_%u
    For an image copy of an archived redolog, %U means: arch-D_%d-id-%I_S-%e_T-%h_A-%a_%u
    For an image copy of a control file, %U means: cf-D_%d-id-%I_%u
    Thank you

  • Raw Device Backup to file system(OPS 8i)

    Hi
    Our currently setup is
    Oracle database 8.1.6 (Oracle Parallel Server) Two Node
    Noarchive Mode
    Solaris 2.6
    all database file ,redo logfiles,controlfiles under raw device.
    database size 16 G.B
    oracle block size 8192
    currently we are using only export backup of oracle.
    But now i want to take cold backup of oracle database to disk.
    cold backup Raw --> Disk
    How we can take cold backup with dd command and skip parameter ?
    Is anybody have practical idea of dd command with skip parameter.
    Thanks and regards
    Kuljeet pal singh

    you can use ufsdump instead of dd

  • Removing file system from meta devices in solaris 10

    hi,
    I have created a file system on meta device in solaris 10 using below command
    newfs /dev/md/rdsk/d110
    now i want to remove file system to make the meta device free, required command to remove file system ?
    Regards
    Zeeshan

    Thanks for your response , actually i have performed the below steps to release the space from mount point /u05 which i want to make the space as raw device so that i can use it for ASM , so my question is that how can i unformat the file system so that it can be a raw device.
    umount /u05
    metaclear d110
    (Now i have the below two metadevices 500gb each which i want to use as raw device so that i can allocate it to ASM (Automatic Storage management). So how can we make it as raw device ??
    /dev/dsk/emcpower17a
    /dev/dsk/emcpower17a

  • EXT3 to RAW file system

    hi all,
    i have RHEL as 4 and i have 3 partitions on 200gb hard disk d01 d02 d03 with ext3 file system now i want to change the d01 ext3 file system to raw partition for implementing ASM can some one help me out that would be great help thanks very much in advance.

    1. make a backup of your database
    2. decide if you want to use ASMlib or raw devices
    the following is the text in an article on installing oracle 10g (http://www.oracle.com/technology/pub/articles/chan-ubl-vmware.html#5)
    A raw device mapping is required only if you are planning on creating ASM disks using standard Linux I/O. An alternative to creating ASM disks is to use the ASM library driver provided by Oracle. You will configure ASM disks using ASM library driver later.
    Perform the following tasks to map the raw devices to the shared partitions created earlier. The raw devices have to bind with the block devices each time a cluster node boots.
    Add the following lines in /etc/sysconfig/rawdevices.
    /etc/sysconfig/rawdevices
    /dev/raw/raw1 /dev/sdc1
    /dev/raw/raw2 /dev/sdd1
    /dev/raw/raw3 /dev/sde1
    To make the mapping effective immediately, execute the following commands as the root user:
    # /sbin/service rawdevices restart
    Assigning devices:
    /dev/raw/raw1 --> /dev/sdc1
    /dev/raw/raw1: bound to major 8, minor 33
    /dev/raw/raw2 --> /dev/sdd1
    /dev/raw/raw2: bound to major 8, minor 49
    /dev/raw/raw3 --> /dev/sde1
    /dev/raw/raw3: bound to major 8, minor 65
    done
    # chown oracle:dba /dev/raw/raw[1-3]
    # chmod 660 /dev/raw/raw[1-3]
    # ls -lat /dev/raw/raw*
    crw-rw---- 1 oracle dba 162, 3 Nov 4 07:04 /dev/raw/raw3
    crw-rw---- 1 oracle dba 162, 2 Nov 4 07:04 /dev/raw/raw2
    crw-rw---- 1 oracle dba 162, 1 Nov 4 07:04 /dev/raw/raw1
    As the oracle user, execute
    rac1-> ln -sf /dev/raw/raw1 /u01/oradata/devdb/asmdisk1
    rac1-> ln -sf /dev/raw/raw2 /u01/oradata/devdb/asmdisk2
    rac1-> ln -sf /dev/raw/raw3 /u01/oradata/devdb/asmdisk3
    Modify /etc/udev/permissions.d/50-udev.permissions. Raw devices are remapped on boot. The ownership of the raw devices will change to the root user by default upon boot. ASM will have problem accessing the shared partitions if the ownership is not the oracle user. Comment the original line, “raw/*:root:disk:0660” in /etc/udev/permissions.d/50-udev.permissions and add a new line, “raw/*:oracle:dba:0660.”
    /etc/udev/permissions.d/50-udev.permissions
    # raw devices
    ram*:root:disk:0660
    #raw/*:root:disk:0660
    raw/*:oracle:dba:0660

  • Uninstall Oracle Culster (RAC) & Oracle Database with Raw File System (LVM)

    Hello,
    I have configured "Oracle RAC" with "Database" on Hp Unix 11.23 Platform. The shared storage is based on "raw" file system,which has mounted through "SAN" Storage. We have used total 18 LV (logical volumes) for oracle & clusterware.
    By mistaken, I have configured wrong "Public, Private IP Address & Virtual IP Addresses" during RAC installation,thus my oracle "crs" is not working perfectly. So, is it possible to modify the "public,private & Virtual" IP Addresses? If Yes, provide me the step by step modification link.
    Moreover, I would like to know certain steps to uninstall entire "Oracle Clusterware & Database." Kindly do the needful the "uninstallation" steps & is it necessary to remove & recreate LVM partitions, on which "oracle crs & database" has installed?
    Advanced Thanks,
    Nishith Vyas

    Hi,
    You haven't told anything about version...
    By mistaken, I have configured wrong "Public, Private IP Address & Virtual IP Addresses" during RAC installation,thus my oracle "crs" is not working perfectly. So, is it possible to modify the "public,private & Virtual" IP Addresses? If Yes, provide me the step by step modification link.BTW, this thread has information that can drive You to this change:
    Re: Is it possible?
    Moreover, I would like to know certain steps to uninstall entire "Oracle Clusterware & Database." Kindly do the needful the "uninstallation" steps &Again... No versions, but You this thread can drive You to this
    How to cleanup / remove RAC installation (CRS,RDBMS,ASM)
    is it necessary to remove & recreate LVM partitions, on which "oracle crs & database" has installed?I don't think so. If all steps on uninstalling procedure don't work, You'll can try "zero" the information on the raw device using dd.
    Hope it helps,
    Cerreia

Maybe you are looking for

  • How to use LDAP with Oracle forms 10g on Oracle application server

    Hi, I need some help on this. I have developed oracle forms 10g on application server 9iAS. The client want to use the existing LDAP authentication to the software we wrote. I do not know how I could configure to use the existing LDAP authentication

  • Display problems in IE 7?

    Hello, I updated some files in Dreamweaver yesterday and ever since I sent them live I  am having some display issues with a few of our pages in IE 7. The pages display  fine in IE 8, Chrome, Safari and Firefox. In IE7 there is a huge amount of white

  • Placed .ai files becomes transparent on PDF??

    Hi fellow InDesign users, I have a problem with my CS3 InDesign (fully upgraded/updated) and CS3 Illustrator (also fully upgraded/updated) I have an Illustrator file which I would like to place in my layout. The artwork is completely white (C=0, M=0,

  • All confused about Dunning Terms

    I have gone over the training and the posts concerning the dunning terms and am a bit confused as to what to mark as to the "Effictive After" in Dunning Levels - Setup Lets say I have an invoice with today's date March 7th and the due date is in 10 d

  • Pattern brush alignment for a circle.

    Here are my two attempts at this simple pattern: The example on the left clearly shows the alignment that I want to correct. Is there a way to adjust this alignment? Playing with the scale and fit options (of the pattern brush) didn't seem to help. W