[Translated from mos] When Oracle software is installed, the/dev/null0 file is created ., Mosnull0
When Oracle software is installed, the/dev/null0 file is created.
Reference Original:
File/dev/null0 Is Created After Installation Of Oracle Software (Doc ID 1322550.1)
Applicable:
Oracle Database-Enterprise Edition-Version 10.2.0.1 and later
Information in this document applies to any platform.
Symptoms:
For security reasons, only licensed files can appear under/dev.
1. on HP-IA
[Celchp4]/refresh/home> ls-al/dev/| grep null
Crw-rw-1 bin 3 0x000002 May 16 07:30 null
-Rw-r -- 1 root sys 0 Jul 1 2010 null0
[Celchp4]/refresh/home> ll/dev/null
Crw-rw-1 bin 3 0x000002 May 16 07:53/dev/null
[Celchp4]/refresh/home> ll/dev/null0
-Rw-r -- 1 root sys 0 Jul 1 2010/dev/null0
[Celchp4]/refresh/home>
2. on IBM AIX
[Celcaix4]/home/bugmnt> ls-al/dev/| grep null
Crw-rw-1 root system 2, 2 May 16 07:58 null
-Rw-r -- 1 root system 0 Apr 08 2010 null0
Crw ------- 1 root system 7, 2 Jul 28 2009 sysdumpnull
[Celcaix4]/home/bugmnt> ll/dev/null
Crw-rw-1 root system 2, 2 May 16 07:58/dev/null
[Celcaix4]/home/bugmnt> ll/dev/null0
-Rw-r -- 1 root system 0 Apr 08 2010/dev/null0
[Celcaix4]/home/bugmnt>
3. on Oracle Solaris
[Celcsol4]/home/bugmnt> ls-al/dev/| grep null
Lrwxrwxrwx 1 root 9 Sep 10 2010 dtremote->/dev/null
Lrwxrwxrwx 1 root other 27 May 14 2008 null-> ../devices/pseudo/mm @ 0: null
-Rw-r -- 1 root other 0 Aug 31 2010 null0
[Celcsol4]/home/bugmnt>
4. on Linux
Grid @ gcsst1:/dev> ls-al/dev/| grep null
Crw-rw-1 root 1, 3 null
Lrwxrwxrwx 1 root 4 XOR-> null
Grid @ gcsst1:/dev>
Changes:
Oracle software installed
Cause:
Run root. sh to generate '/dev/null0 '.
[Pst4:/] # ls/dev/null *
/Dev/null
[Pst4:/] #/db01/oracle/products/10.2/db_2/root. sh
Running Oracle10 root. sh script...
The following environment variables are set:
ORACLE_OWNER = oracle
ORACLE_HOME =/db01/oracle/product/10.2/db_2
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in/usr/local/bin. Overwrite it? (Y/n) [n]:
The file "oraenv" already exists in/usr/local/bin. Overwrite it? (Y/n) [n]:
The file "coraenv" already exists in/usr/local/bin. Overwrite it? (Y/n) [n]:
Entries will be added to the/var/opt/oracle/oratab file as needed
Database Configuration Assistant when a database is created
Finished running generic part of root. sh script.
Now product-specific root actions will be saved med.
[Pst4:/] # ls/dev/null *
/Dev/null/dev/null0
[Pst4:/] #
A. from root. sh script
#
# If LOG is not set, then send output to/dev/null
#
If ["x $ {LOG}" = "x"-o "$ {LOG}" = ""]; then
LOG =/dev/null
Else
$ CP $ LOG $ {LOG} 0 2>/dev/null
$ ECHO ""> $ LOG
Fi
B. from truss output
91502 27646: execve ("/usr/bin/cp", 0x0003B95C, 0x0003B978) argc = 3
91503 27646: argv:/usr/bin/cp/dev/null/dev/null0
91504 27646: envp: HOME =/LANG = POSIX
91505 27646: LD_LIBRARY_PATH =:/usr/openwin/lib:/usr/X11R6/lib LOGNAME = root
91506 27646: MAIL =/var/mail // root OLDPWD =/
91507 27646: PATH =/usr/sbin:/usr/bin:/usr/openwin/bin:/usr/X11R6/bin :.
91508 27646: PS1 = [pst4: $ PWD] # PWD =/db01/oracle/product/10.2/db_2
91509 27646: SHELL =/bin/bash SHLVL = 1 SSH_CLIENT = 10.179.117.70 2617 22
91510 27646: SSH_CONNECTION = 10.179.117.70 2617 10.179.112.34 22
91511 27646: SSH_TTY =/dev/pts/2 TERM = xterm TZ = rok user = root
91512 27646: _ =/usr/bin/truss
91513 27646: resolvepath ("/usr/lib/ld. so.1", "/lib/ld. so.1", 1023) = 12
...
91577 27646: munmap (0xFF260000, 32768) = 0
91578 27646: pathconf ("/dev/null", 20) = 1
91579 27646: acl ("/dev/null", GETACLCNT, 0, 0x00000000) = 4
91580 27646: stat64 ("/dev/null", 0xFFBFEDA0) = 0
91581 27646: acl ("/dev/null", GETACL, 4, 0x000276C8) = 4
91582 27646: stat64 ("/dev/null0", 0x00026630) = 0
91583 27646: stat64 ("/dev/null0", 0x00026630) = 0
91584 27646: open64 ("/dev/null", O_RDONLY) = 3
91585 27646: creat64 ("/dev/null0", 0666) = 4
91586 27646: stat64 ("/dev/null0", 0x00026630) = 0
91587 27646: fstat64 (3, 0x000266C8) = 0
91588 27646: read (3, 0xFFBF6F00, 32768) = 0
Solution:
Ignore this phenomenon and delete the '/dev/null0' file, as long as no process uses this file (use lsof or fuser or any other appropriate tool to check whether null0 is being used by the process)