ls problem
 
*
Welcome, Guest. Please login or register. January 08, 2009, 11:48:10 PM


Login with username, password and session length


Pages: [1]   Go Down
  Print  
Author Topic: ls problem  (Read 1227 times)
0 Members and 1 Guest are viewing this topic.
Michael
Administrator
Hero Member
*****
Posts: 539


« Reply #7 on: March 09, 2008, 03:02:10 PM »

Hi
od -dc output intresting:
(For example unicode or unknown character on second line between 020 and pfile )
0000300    04256   28774   26988   25856   00000   00000   00000   00000
         020   �   p   f   i   l   e  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000320    04186   29539   29289   28788   29440   00000   00000   00000
         020   Z   s   c   r   i   p   t   s  \0  \0  \0  \0  \0  \0  \0
0000340    04288   30052   30061   28672   00000   00000   00000   00000
         020   �   u   d   u   m   p  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000360    04320   28261   29815   28530   27392   00000   00000   00000
         020   �   n   e   t   w   o   r   k  \0  \0  \0  \0  \0  \0  \0
How can I solve this problem online?
Thanks!
Toth

The first line is the 16 byte directory entry as decimal numbers, the second line is 16 bytes as characters.
The first two bytes are the inode number - so you read that from the first decimal number of the first line, the second line is used to see the file name. Since the first two bytes are the inode number (as chars) you ignore them.
0000300    04256   28774   26988   25856   00000   00000   00000   00000
         020   �   p   f   i   l   e  \0  \0  \0  \0  \0  \0  \0  \0  \0

from this pair of lines: the file "pfile" has inode number 4256.

ls -i pfile should confirm this.

What I would have wanted to see from fsck was which inode showed up as duplicate, and use ncheck to find all files referencing the inode.
Logged
Toth
Full Member
***
Posts: 22


« Reply #6 on: March 08, 2008, 08:51:52 AM »

Hi!
Today I can umount this filesystem, and try run fsck:
The current volume is: /dev/satadminlv
Primary superblock is valid.
fsck: 0507-149 Duplicate block references have been detected in Metadata.
        fsck cannot continue.
Errors detected in the file system inode allocation map.
fsck: 0507-278 Cannot continue.
File system is dirty.
Try this commands, but output allways same:
fsck -y /dev/satadminlv
fsck -p /dev/satadminlv
So, I recreate filesystem, and backup from tsm...
Thanks!
Toth
Logged
Toth
Full Member
***
Posts: 22


« Reply #5 on: March 07, 2008, 10:33:50 AM »

Hi
od -dc output intresting:
(For example unicode or unknown character on second line between 020 and pfile )
0000300    04256   28774   26988   25856   00000   00000   00000   00000
         020   �   p   f   i   l   e  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000320    04186   29539   29289   28788   29440   00000   00000   00000
         020   Z   s   c   r   i   p   t   s  \0  \0  \0  \0  \0  \0  \0
0000340    04288   30052   30061   28672   00000   00000   00000   00000
         020   �   u   d   u   m   p  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000360    04320   28261   29815   28530   27392   00000   00000   00000
         020   �   n   e   t   w   o   r   k  \0  \0  \0  \0  \0  \0  \0
How can I solve this problem online?
Thanks!
Toth
Logged
Michael
Administrator
Hero Member
*****
Posts: 539


« Reply #4 on: March 05, 2008, 10:58:39 PM »

If you are still having problems with this, please use either ls -i ./* or od -dc . to list the directory and the inode numbers of the the files listed in the directory.

Once you have the inode number you can use ncheck to examine the file information further. Remember, the actual definition of a file is the inode. A directory entry is simply a linkage to an inode. This is why hard link (that increases the link count of an inode) literally point to the same file, while a symbolic link is simply a special file that is a path to a file or directory (i.e. a symbolic link is a new object (inode) where as a hard link is not a new object (inode) but an additional link to it.

Again, if you are still having problems with this, please reply, and I'll think about additional possibilities about resolving it. One of my considerations is that the jfslog (or jfs2log) is corrupt (did you have a crash and the application was started on another node, or perhaps more dangerous - did you have a partioned cluster? Your complaint/problem is "typical" of what might happen in a partitioned cluster.)
Logged
John Peck
Global Moderator
Senior Member
*****
Posts: 46


« Reply #3 on: March 04, 2008, 08:28:39 PM »


Yes fsck will be able to fix actual filesystem problems,
if there are indeed any when you run it.

To unmount the filesystem you have to stop all the processes using it.
Therefore you may as well shutdown to single user mode,
stop all applications anyway, and try the "ipcs" "ipcrm" "rm -i" suggestions first, because they have almost the same requirements.

Running ipcrm on the wrong message queue for a running application could be nasty.  However, something has gone wrong with the application clearly, and so you might need to re-start it in any case to recover fully from this.
Maybe ipcs shows that there is no longer a message queue being held open by anything for this file, just an old filename reference in the directory file.

The "rm -i" of an apparently non-existent file shouldn't be doing any more than removing the name from the containing directory file list, and you can do that with the system up.  fsck would also fix that type of issue, but only with the filesystem unmounted.
Logged
Toth
Full Member
***
Posts: 22


« Reply #2 on: March 04, 2008, 03:10:08 PM »

Hi!
Thanks for Your reply!
I didn't write it:
this system run hacmp, and this filesystem on shared volume group (7x24).
If I understand you: just fsck help me, if umount this filesystem, and don't exist other solution my problem.
ipcs list too long on normal working system /and dangerous running ipcrm/
Reboot didn't help me: some bad file exist on system before reboot.
Mv folder don't help, because oracle use some files on this folders.
Thanks!
Toth
Logged
John R Peck
Administrator
Senior Member
*****
Posts: 55


« Reply #1 on: March 04, 2008, 02:25:20 PM »

OK, so lots of files were listed and then the one name "does not exist", even though it apparently knows enough about it to mention that.

The directory (which is a file) contains the list of file names in that directory. 

The "./*" in your commands is being expanded by the shell to the names of all the files in the directory and then the command is run with all those expanded names sent to it. 

There could for example be something odd with that file name, a hidden character perhaps.  The graphic space character in the character set (which can be called up in an octal way at least) can be used to create a file with a name of apparently <blank> which then doesn't show up in a normally viewed "ls" list say. 

But the other message about a "message queue" is significant also.  Research the commands "ipcs" and "ipcrm":
man ipcs
man ipcrm

As the message queue area is probably the reason, try that first.  The only message queue I have on my system is for "printq".  I suggest you shutdown to single user operations - to be safe there is nothing else running that might need such a thing - then list the message queues the system thinks it has with "ipcs" and try "ipcrm -q XXXX" to delete whatever XXXX you think it might be associated with this file.  (A reboot would surely fix any erroneous deletions at this point.)

Then if it's still a problem with "ls" and "du", try an "rm -i *", which will present each of the expanded filenames for possible removal if you enter "y" to confirm it, and that does then handle each odd name too. 
Alternatively, try making a new directory, copying all the known OK files in to that with "cp -p name1 name2 etc ../newdirectory" to maintain settings, then delete the original directory from above it (so that the offending name doesn't enter into the piece).

Note by the way that fsck only works properly on an unmounted filesystem, as where mounted you will get "errors" about open files and invalid inode maps with random frequency because the filesystem is then in use.  So that output was actually OK, nothing really wrong with your filesystem at all in all probably.
Logged
Toth
Full Member
***
Posts: 22


« on: March 03, 2008, 04:52:48 PM »

Hi!
We got this message some files on jfs2 filesystem:
ls -l ./*
...
ls: 0653-341 The file ./filename.trc does not exist.
************
And if we run df:
du -sk ./*
...
du: ./filename.trc: A file, file system or message queue is no longer available.
*************
I tried run fsck when filesystem monted:
fsck /oradata/SATPROD/admin
The current volume is: /dev/datalv
File system is currently mounted.
Primary superblock is valid.
fsck: Performing read-only processing does not produce dependable results.
fsck: 0507-149 Duplicate block references have been detected in Metadata.
        fsck cannot continue.
Errors detected in the file system inode allocation map.
fsck: 0507-278 Cannot continue.
File system is currently mounted.
fsck: Performing read-only processing does not produce dependable results.
*************
This files created by oracle. How can we delete this files, or how can we repair this filesystem?
Thanks!
Tot

(
oslevel -s:
5300-06-04-0748
System Model: IBM,9119-595
Processor Type: PowerPC_POWER5
CPU Type: 64-bit
Kernel Type: 64-bit
Platform Firmware level: SF240_332
Firmware Version: IBM,SF240_332
)
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.892 seconds with 19 queries.




eXTReMe Tracker

Terms of Use and Privacy and Security Policies
Copyright 2001-2008 Michael Felt and ROOTVG.NET