Hi, I downloaded lsof and ran it against some datafiles - basically
oracle is the only one holding any locks
./lsof_4.73 /ocfs1/oradata/LPTE3/odm01.dbf
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
oracle 26149 oracle 31uW REG 8,1 20979712 2948608
/ocfs1/oradata/LPTE3/odm01.dbf
oracle 26151 oracle 33u REG 8,1 20979712 2948608
/ocfs1/oradata/LPTE3/odm01.dbf
oracle 26155 oracle 28u REG 8,1 20979712 2948608
/ocfs1/oradata/LPTE3/odm01.dbf
[root@LNCSTRTLDB03 root]# ps -ef | grep 26149
oracle 26149 1 0 09:13 ? 00:00:00 ora_dbw0_LPTE3
[root@LNCSTRTLDB03 root]# ps -ef | grep 26151
oracle 26151 1 0 09:13 ? 00:00:00 ora_lgwr_LPTE3
[root@LNCSTRTLDB03 root]# ps -ef | grep 26155
oracle 26155 1 0 09:13 ? 00:00:00 ora_smon_LPTE3
So database writer, log writer and smon are using the file which is
stopping me from copying it using the standard command, is it possible
Oracle isnt playing the game here?
On Wed, 01 Dec 2004 18:17:04 +0000, Bryce <philip.copeland@oracle.com>
wrote:> On Wed, 2004-12-01 at 18:02, David Sharples wrote:
>
>
> > Thanks,
> >
> > all im using to open the database is Oracle itself (9iR2)
> >
> > Now these files were created on normal ext 3 filesystems and then
> > manually copied to the ocfs filesystems using straight copy
> >
> > I repeated your test and here are the results
> >
> > [oracle@LNCSTRTLDB03 LPTE3]$ dd if=/dev/zero of=testfile bs=1024000
count=256
> > 256+0 records in
> > 256+0 records out
> > [oracle@LNCSTRTLDB03 LPTE3]$ ls -ltr testfile
> > -rw-r--r-- 1 oracle dba 262144000 Dec 1 17:48 testfile
> > [oracle@LNCSTRTLDB03 LPTE3]$ cp --o_direct testfile
/ocfs4/oradata/LPTE3/
> >
> > (worked)
> >
> > [oracle@LNCSTRTLDB03 LPTE3]$ md5sum --o_direct testfile
/ocfs4/oradata/LPTE3/
> > md5sum: unrecognised option `--o_direct'
> >
> > (--o_direct didnt work)
>
> yeah, I updated textutils with a version of md5sum that supported
> --o_direct. you don't absolutely need to have it but it's nice to
hae
> around 8)
>
>
>
> > [oracle@LNCSTRTLDB03 LPTE3]$ md5sum testfile
/ocfs4/oradata/LPTE3/testfile
> > ab3248888d6f10ef30a084fac6a1e2fd testfile
> > ab3248888d6f10ef30a084fac6a1e2fd /ocfs4/oradata/LPTE3/testfile
> >
> > (so they are the same)
> >
> > [oracle@LNCSTRTLDB03 LPTE3]$ cp --o_direct testfile /tmp
> > [oracle@LNCSTRTLDB03 LPTE3]$ cp testfile /ocfs4/oradata/LPTE3/testfile
> > [oracle@LNCSTRTLDB03 LPTE3]$
> >
> >
> > both those copy command succeeded and the md5sum is the same.
> >
> > I'm kinda stuck in my thinking now - do I have a problem or not.?
Or
> > is oracle not opening my files without the o_direct support. I didnt
> > change any db parameters after I moved the files onto ocfs.
> >
> > Thanks for the effort
> >
> > Confused
> >
> > Dave
>
>
> before copying type
> lsof <dir>/odm01.dbf
> and see what other processes have open locks on it
>
> eg lsof /dev/tty1 will show all processes with open handles on /dev/tty1
>
> Phil
> =-->
>
>
>
> > On Wed, 01 Dec 2004 17:28:54 +0000, Bryce
<philip.copeland@oracle.com> wrote:
> > > I've two ocfs FS's mounted
> > > [root@localhost root]# df
> > > Filesystem 1k-blocks Used Available Use% Mounted
on
> > > /dev/hda5 986080 564320 421760 58% /mnt
> > > /dev/hda6 985984 836896 149088 85% /mnt2
> > >
> > > [root@localhost root]# mount | grep ocfs
> > > /dev/hda5 on /mnt type ocfs (rw)
> > > /dev/hda6 on /mnt2 type ocfs (rw)
> > >
> > > Ok lets crate a 256Mb test file on /mnt
> > > [root@localhost root]# dd if=/dev/zero of=/mnt/testfile bs=1024
> > > count=256
> > > 256+0 records in
> > > 256+0 records out
> > >
> > > Now then lets copy it to another ocfs FS
> > > [root@localhost root]# cp --o_direct /mnt/testfile /mnt2/testfile
> > >
> > > Did it copy it correctly?
> > > [root@localhost root]# md5sum --o_direct /mnt/testfile
/mnt2/testfile
> > > ec87a838931d4d5d2e94a04644788a55 /mnt/testfile
> > > ec87a838931d4d5d2e94a04644788a55 /mnt2/testfile
> > >
> > > Good. Now can we just drop it on /tmp?
> > > [root@localhost root]# cp --o_direct /mnt/testfile /tmp
> > >
> > > Hummmmm
> > >
> > > One possibility is that the database file is not FS block sized
aligned
> > > but cp should have spotted that and bailed with an error if that
was the
> > > case.
> > >
> > > Another possibility is that some other program has opened the
database
> > > WITHOUT O_DIRECT support. When this happens, O_DIRECT will not be
> > > provided with a lock and it will bail out, at least until such
time as
> > > the non O_DIRECT program closes it's access to the database.
> > >
> > > If all programs accessing/opening/modifying the file are using
O_DIRECT
> > > file access then you won't see this problem.
> > >
> > >
> > >
> > > Phil
> > > =--> > >
> > > On Wed, 2004-12-01 at 17:04, David Sharples wrote:
> > > > Thanks,
> > > >
> > > > When doing that command it works and the file gets copied.
> > > >
> > > > and yes I am using AS2.1. and /tmp is ext3
> > > >
> > > > However I get the same error(?) when I try to copy between
two ocfs filesystems
> > > >
> > > > [oracle@LNCSTRTLDB03 tmp]$ cp /ocfs/oradata/LPTE3/odm01.dbf
> > > > /ocfs4/oradata/LPTE3/
> > > > cp: cannot stat `/ocfs/oradata/LPTE3/odm01.dbf': No such
file or directory
> > > > [oracle@LNCSTRTLDB03 tmp]$ cp /ocfs1/oradata/LPTE3/odm01.dbf
> > > > /ocfs4/oradata/LPTE3/
> > > > cp: cannot open `/ocfs1/oradata/LPTE3/odm01.dbf' for
reading: Permission denied
> > > > [oracle@LNCSTRTLDB03 tmp]$ cp --o_direct
> > > > /ocfs1/oradata/LPTE3/odm01.dbf /ocfs4/oradata/LPTE3/
> > > > cp: cannot open `/ocfs1/oradata/LPTE3/odm01.dbf' for
reading: Permission denied
> > > > [oracle@LNCSTRTLDB03 tmp]$ cp --o_direct=131072,0
> > > > /ocfs1/oradata/LPTE3/odm01.dbf /ocfs4/oradata/LPTE3/
> > > > [oracle@LNCSTRTLDB03 tmp]$
> > > >
> > > > just to prove that they are really ocfs :-)
> > > >
> > > > [root@LNCSTRTLDB03 root]# debugocfs -h /dev/sda1
> > > > debugocfs 1.1.2-PROD1 Fri Apr 2 13:59:11 PST 2004 (build
> > > > fcb0206676afe0fcac47a99c90de0e7b)
> > > > diskheader:
> > > > version = 1.2
> > > > signature = OracleCFS
> > > > mount_point = /ocfs1
> > > >
> > > > and
> > > >
> > > > [root@LNCSTRTLDB03 root]# debugocfs -h /dev/sda4
> > > > debugocfs 1.1.2-PROD1 Fri Apr 2 13:59:11 PST 2004 (build
> > > > fcb0206676afe0fcac47a99c90de0e7b)
> > > > diskheader:
> > > > version = 1.2
> > > > signature = OracleCFS
> > > > mount_point = /ocfs4
> > > >
> > > > Am i missing something here?
> > > >
> > > >
> > > >
> > > > On Wed, 01 Dec 2004 16:48:08 +0000, Bryce
<philip.copeland@oracle.com> wrote:
> > > > > *scratch*
> > > > > lets see
> > > > > try
> > > > > cp --o_direct=131072,0 xdb01.dbf /tmp
> > > > >
> > > > > which basically says 'try to copy in the file using
o_direct blocks of
> > > > > 128Mb and copy out to /tmp without o_direct'
> > > > >
> > > > > --o_direct just by itself will assume that the src and
destination FS's
> > > > > are o_direct capable
> > > > >
> > > > > In your case, I'm assuming that /tmp isn't and
is a ext2 or ext3 FS.
> > > > > The use of fileutils suggests that you're using
AS2.1 which did not
> > > > > silently ignore o_direct on ext3 like EL3 does.
> > > > >
> > > > > Phil
> > > > > =--> > > > >
> > > > >
> > > > >
> > > > > On Wed, 2004-12-01 at 15:43, David Sharples wrote:
> > > > > > I have these versions.
> > > > > >
> > > > > > [root@LNCSTRTLDB03 LPTE3]# rpm -qa | grep tar
> > > > > > tar-1.13.25-9
> > > > > > [root@LNCSTRTLDB03 LPTE3]# rpm -qa | grep
fileutils
> > > > > > fileutils-4.1-10.23
> > > > > > [root@LNCSTRTLDB03 LPTE3]#
> > > > > >
> > > > > > They were got from the coreutils page on oss today
> > > > > >
> > > > > > Thanks
> > > > > >
> > > > > >
> > > > > > On Wed, 1 Dec 2004 07:37:31 -0800, Wim Coekaerts
> > > > > > <wim.coekaerts@oracle.com> wrote:
> > > > > > > that's odd. if you use odirect it should
actually work maybe you ran
> > > > > > > into another fileutils bug are you on the
latest version ?
> > > > > > > we need to be doing a better qa job on the
fileutils
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > On Wed, Dec 01, 2004 at 02:59:15PM +0000,
David Sharples wrote:
> > > > > > > > Another question.
> > > > > > > >
> > > > > > > > When my database is running, I do
> > > > > > > >
> > > > > > > > [oracle@LNCSTRTLDB03 LPTE3]$ cp
--o_direct xdb01.dbf /tmp
> > > > > > > > cp: cannot open `xdb01.dbf' for
reading: Permission denied
> > > > > > > > [oracle@LNCSTRTLDB03 LPTE3]$
> > > > > > > >
> > > > > > > > When the database is shudown it works.
> > > > > > > >
> > > > > > > > Is this normal for ocfs because with any
other filesystem I can just
> > > > > > > > copy a file at any time (Its only a
testing, I know I cant copy
> > > > > > > > datafiles and have them consistent)
> > > > > > > >
> > > > > > > > Thanks
> > > > > > > >
_______________________________________________
> > > > > > > > Ocfs-users mailing list
> > > > > > > > Ocfs-users@oss.oracle.com
> > > > > > > >
http://oss.oracle.com/mailman/listinfo/ocfs-users
> > > > > > >
> > > > > > _______________________________________________
> > > > >
> > > > >
> > > > > > Ocfs-users mailing list
> > > > > > Ocfs-users@oss.oracle.com
> > > > > > http://oss.oracle.com/mailman/listinfo/ocfs-users
> > > > >
> > > > >
> > >
> > >
>
>