1836481 Members
1811 Online
110101 Solutions
New Discussion

cannot remove files

 
Snop Hsieh
Occasional Advisor

cannot remove files

Hi all:
OS is HP-ux 11i.There are some files in a directory.Use ll command, it show
./file1 not found
./file2 not found
./file3 not found
total 0
When i use rm command, it show
rm: cannot stat file1: No such device or address
rm: cannot stat file2: No such device or address
rm: cannot stat file3: No such device or address

How can i remove these files?

Thanks.
6 REPLIES 6
john korterman
Honored Contributor

Re: cannot remove files

Hi,

there seems to be a mismatch between the files referenced and what is actually present on the disk.

It may be remedied by a file system check - or perhaps even by recreating the files manually - but before that you should check for bad disks, e.g. execute ioscan, look into the syslog, as this could very well be the problem.



regards,
John K.
it would be nice if you always got a second chance
Snop Hsieh
Occasional Advisor

Re: cannot remove files

The status is happened when power failed.
The fsck must umount filesystem.May i remove or recreate these files in a mounted filesystem.
Thank you.
Muthukumar_5
Honored Contributor

Re: cannot remove files

try as,

# sync
# /usr/sbin/fsck
# echo $?
# sync

If it returns more than 33 file system is damaged severly.

hth.
Easy to suggest when don't know about the problem!
john korterman
Honored Contributor

Re: cannot remove files

Hi,

check first for missing disks, as this might be due to the powerfailure you mention. Try this command:
# ioscan -fnC disk

and look for NO_HW, (which I hope you do not see), but if you do, then check that power is available for the disks in question.

regards,
John K.
it would be nice if you always got a second chance
Snop Hsieh
Occasional Advisor

Re: cannot remove files

I umount the filesystem, use fsck check
this filesystem. And remove these files.
Thanks, everyone.
Snop Hsieh
Occasional Advisor

Re: cannot remove files

Thanks, everyone.