How to fix Duplicated Inode Problems??

How to fix Duplicated Inode Problems??

Post by Ken Abrahamse » Wed, 12 May 1999 04:00:00



I have discovered 3 files / directories all with the same Inode number which
has been causing the listed CORE_DUMPS on our AIX 4.3.2.0 system. I have
other duplicated Inodes in the error log, so I'm hoping to get pointers to
use to resolve each of these duplicate Inode cases one by one. What I'd like
to do is the following:

1. >>Safely<< delete the -MULS file entirely as it's no longer needed.

2. Preserve the cispub71 directory AND the  file
/usr/lpp/bos.html.en_US.cmds/deinstlbos.html.en_US.cmds.cmds5.al but resolve
the duplicate Inode usage.

Any pointers as to how to accomplish these two task >> safely <<? I can do
this work on the weekend and restore files / directories from a current tar
tape, if needed.

Quote:>>>>> Also anyone know of any reason why these items would have been given

the same Inode number in the first place???

The -MULS item was from a load of an AIX 3.2.5 'tar -pxv' tape, the cispub71
directory was from a AIX 3.2.5 volume group imported into an AIX 4.3.2
system, and the
/usr/lpp/bos.html.en_US.cmds/deinstlbos.html.en_US.cmds.cmds5.al was from an
AIX software load from AIX 4.3 install media.

Thanks!
ken abrahamsen

# oslevel
4.3.2.0
## errpt -a|pg
---------------------------------------------------------------------------
LABEL:          CORE_DUMP
IDENTIFIER:     C60BB505

Date/Time:       Mon May 10 17:01:08
Sequence Number: 913
Machine Id:      000081827100
Node Id:         Rita
Class:           S
Type:            PERM
Resource Name:   SYSPROC

Description
SOFTWARE PROGRAM ABNORMALLY TERMINATED

Probable Causes
SOFTWARE PROGRAM

User Causes
USER GENERATED SIGNAL

        Recommended Actions
        CORRECT THEN RETRY

Failure Causes
SOFTWARE PROGRAM

        Recommended Actions
        RERUN THE APPLICATION PROGRAM
        IF PROBLEM PERSISTS THEN DO THE FOLLOWING
        CONTACT APPROPRIATE SERVICE REPRESENTATIVE

Detail Data
SIGNAL NUMBER
          11
USER'S PROCESS ID:
      101402
FILE SYSTEM SERIAL NUMBER
          11
INODE NUMBER
       18539
PROGRAM NAME
uvsh
ADDITIONAL INFORMATION
??
??
??
Unable to generate symptom string.
---------------------------------------------------------------------------
# pwd
/
# ls -aliRFN|pg|grep 18539
18539 -rw-rw-rw-   1 root     sys          137 Apr 06 1995  -MULS
18539 drwxrwsr-x  17 root     cispub     29184 May 10 17:05 cispub71/
18539 -rw-r-----   1 root     system     33215 May 03 1998
bos.html.en_US.cmdsl
#

# pwd
/u0/aix325/uv.325/u1/uv/catdir
# ls -ali|pg
18539 -rw-rw-rw-   1 root     sys          137 Apr 06 1995  -MULS

# pwd
/usr/lpp/bos.html.en_US.cmds/deinstl
# ls -ali|pg
18539 -rw-r-----   1 root     system     33215 May 03 1998
bos.html.en_US.cmds.cmds5.al

TIA.
ken abrahamsen

 
 
 

How to fix Duplicated Inode Problems??

Post by Greg Wimpe » Wed, 12 May 1999 04:00:00


Ummmm.... if files are on different file systems, then they can have
whatever inode numbers they want.  Inodes must only be unique within a
file system, not across file systems.  The very fact that they have
different mode strings indicates that they can't be on the same file
system.  I doubt that a file system with two inodes with the same
number would even be mountable, much less usable.

I think you are barking up the wrong tree.  What is the program that
is coredumping?  The errpt says 'uvsh', and it's dying with signal 11,
i.e. good old segmentation violation.  That program is the culprit.
It has nothing to do with duplicate inodes.  Did you just see this in
the errpt and decide that it's a problem, or are these core dumps
causing a system problem?  If you've got software developers on your
system, they are probably dumping core all the time.  Or you've got a
buggy application.  In any case, AIX will gladly log all of these core
dumps into the error log for you, just in case you're interested.

Hope this helps.
--
Greg Wimpey  Despammify address to reply


 
 
 

How to fix Duplicated Inode Problems??

Post by NICHOLAS DRON » Thu, 13 May 1999 04:00:00


: I have discovered 3 files / directories all with the same Inode number which
: has been causing the listed CORE_DUMPS on our AIX 4.3.2.0 system. I have
: other duplicated Inodes in the error log, so I'm hoping to get pointers to
: use to resolve each of these duplicate Inode cases one by one. What I'd like
: to do is the following:

: 1. >>Safely<< delete the -MULS file entirely as it's no longer needed.

: 2. Preserve the cispub71 directory AND the  file
: /usr/lpp/bos.html.en_US.cmds/deinstlbos.html.en_US.cmds.cmds5.al but resolve
: the duplicate Inode usage.

: Any pointers as to how to accomplish these two task >> safely <<? I can do
: this work on the weekend and restore files / directories from a current tar
: tape, if needed.

: >>>>> Also anyone know of any reason why these items would have been given
: the same Inode number in the first place???

A file or directory that has the same inode number as another file
or directory is a hard link.  A hard-linked directory is a very
bad thing.  You can try using unlink (or look at the example of
fsdb that a gentleman from Purdue posted earlier today) to rid
your system of errant hard links.   (This assumes that these files
are in the same filesystem, which is non-controversial as they
appear to be in the same directory.)  An important question
is whether you have a good backup of this filesystem.

 
 
 

1. fs/inode.c sync fix and fs/ext2/inode.c tidy

These patches can be pulled from bk://bcrlbits.bkbits.net/linux-2.5
First one: in fs/ext2/inode.c merge ext2_fsync_inode into ext2_sync_file
as that's the only place it can be called from.

Second one only touches fs/inode.c:sync_one to replace the if I_LOCK
check with a while.  Basically, the inode sync could end up deferring
to writeback if the inode is already locked.  This breaks things like
O_SYNC which assume the inode sync is synchronous and only returns
when the data is safely on disk.  This patch will need to go into 2.4
after a bit of testing for unexpected interactions.

Patches are included below for reading.

                -ben
--
"A man with a bass just walked in,
 and he's putting it down
 on the floor."

diff -Nru a/fs/ext2/ext2.h b/fs/ext2/ext2.h
--- a/fs/ext2/ext2.h    Thu Mar  7 16:02:59 2002

 /* fsync.c */
 extern int ext2_sync_file (struct file *, struct dentry *, int);
-extern int ext2_fsync_inode (struct inode *, int);

 /* ialloc.c */
 extern struct inode * ext2_new_inode (struct inode *, int);
diff -Nru a/fs/ext2/fsync.c b/fs/ext2/fsync.c
--- a/fs/ext2/fsync.c   Thu Mar  7 16:02:59 2002

 int ext2_sync_file(struct file * file, struct dentry *dentry, int datasync)
 {
        struct inode *inode = dentry->d_inode;
-       return ext2_fsync_inode(inode, datasync);
-}
-
-int ext2_fsync_inode(struct inode *inode, int datasync)
-{
        int err;

        err  = fsync_inode_buffers(inode);

diff -Nru a/fs/inode.c b/fs/inode.c
--- a/fs/inode.c        Thu Mar  7 16:02:59 2002

 static inline void sync_one(struct inode *inode, int sync)
 {
-       if (inode->i_state & I_LOCK) {
+       while (inode->i_state & I_LOCK) {
                __iget(inode);
                spin_unlock(&inode_lock);
                __wait_on_inode(inode);
                iput(inode);
                spin_lock(&inode_lock);
-       } else {
-               __sync_one(inode, sync);
        }
+
+       __sync_one(inode, sync);
 }

 static inline void sync_list(struct list_head *head)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

2. a

3. HTFS inode problem fixed yet?

4. How to patch an already patched file?

5. duplicate inodes

6. shell script to detect if the process is runiing

7. Duplicate inodes...

8. Lexmark 3200 in Mandrake 8.1

9. 2.4: Fix duplicate #include in journal.c

10. [3/8] fix duplicate decls in swsusp

11. Fix for duplicate /proc entries

12. duplicate PID fix for 2.4

13. Cannot fix missing '..' in inode - need help