- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Cannot Delete Empty Directory
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2004 08:41 AM
тАО02-26-2004 08:41 AM
Total 0
There is no "." or ".."
When I try to rm -rf the directory as root, it returns the following:
rm: directory
Anyone have an idea. Thanks in advance.
Tommy
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2004 08:44 AM
тАО02-26-2004 08:44 AM
Re: Cannot Delete Empty Directory
maybe lsof or fusers -cu to identify a process on the fs
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2004 08:48 AM
тАО02-26-2004 08:48 AM
Re: Cannot Delete Empty Directory
cd to the directory and do an ls -b. That will display any non-printable characters in octal notation.
You can remove the directory d by issueing a recursive rm, rm -r dirname and that will remove all files/directories below dirname before removing dirname itself. Man rm for details.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2004 08:52 AM
тАО02-26-2004 08:52 AM
Re: Cannot Delete Empty Directory
fuser: could not find file system mounted at
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2004 08:57 AM
тАО02-26-2004 08:57 AM
Re: Cannot Delete Empty Directory
There are no non-printable characters in the directory name, when trying to remove the directory recursively with "rm -rf", it complains that the directory is not empty.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2004 09:00 AM
тАО02-26-2004 09:00 AM
Re: Cannot Delete Empty Directory
mv DIR NEWDIR
Does that work?
No - what happens when you do a:
fuser -cu /YOURDIR
If yes, try ftp'ing to the server using a ftp client like WSFTP - as root - then try to delete the directory from within ftp.
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2004 09:07 AM
тАО02-26-2004 09:07 AM
Re: Cannot Delete Empty Directory
If you
rm -i /dir_name
does it respond with anything at all - even an invisible filename?
If so - reply "y" to remove it.
Rgds,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2004 09:09 AM
тАО02-26-2004 09:09 AM
Re: Cannot Delete Empty Directory
I can mv the dir, but still cannot delete it after moving it. When running "fuser -cu
fuser: could not find file system mounted at
Also tried through an ftp client and it complained about the directory not being empty
When trying to mv
rm: directory
mv:
Any ideas on the "Cannot unlink"
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2004 09:09 AM
тАО02-26-2004 09:09 AM
Re: Cannot Delete Empty Directory
Meant rm -i * inside that dir...
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2004 09:23 AM
тАО02-26-2004 09:23 AM
Re: Cannot Delete Empty Directory
When running rm -i inside the dir it returns the following:
No match
What do you think about the "Cannot Unlink" error when moving the dir to another filesystem?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2004 09:24 AM
тАО02-26-2004 09:24 AM
Re: Cannot Delete Empty Directory
"I have seen this before. It happens when a directory has an extra hard
link. This isn't supposed to happen. If you do "ll -d" on that
directory, does it show 3 links? If so, then somewhere on the system,
there is (if fsck passes) another directory name that is the same
directory. Do "ll -ia" on the directory. This will tell you the inode
numbers of the directory and what it thinks is its parent. Then, you
can do something like "find / -inum [inodenum] -print" (where [inodenum]
is the inode number of "." from above) to discover where the two links
are. Now, do "ll -id" on both parent directories to see which one does
NOT match the inode number of ".." in the bad directory. Do an
"unlink" on the bad directory where the inode number of ".." doesn't
match the inode number of its parent. Then you should be able to
"rmdir" the other one."
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2004 09:30 AM
тАО02-26-2004 09:30 AM
Re: Cannot Delete Empty Directory
Still no luck, when I do an "ll -d
drwxrwxrwx 2 root sys 114688 Jan 25 23:28
When I do an "ll -ia
total 0
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2004 09:45 AM
тАО02-26-2004 09:45 AM
Re: Cannot Delete Empty Directory
Though I'm pretty sure you will get the same results....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2004 09:52 AM
тАО02-26-2004 09:52 AM
Re: Cannot Delete Empty Directory
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2004 10:08 AM
тАО02-26-2004 10:08 AM
Re: Cannot Delete Empty Directory
Try 'ncheck /dev/vgxx/lvolx > /tmp/
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2004 06:15 PM
тАО02-26-2004 06:15 PM
Re: Cannot Delete Empty Directory
If it is not, I would suggest to run an fsck on the filesystem the dir is in. Something or someone really messed it up... But that would mean you have to unmount it first.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2004 03:39 AM
тАО02-27-2004 03:39 AM
Re: Cannot Delete Empty Directory
fsck /dev/vgX/lvolX
fsck: /etc/default/fs is used for determining the file system type
vxfs fsck: cannot stat -
vxfs fsck: file system had I/O error(s) on meta-data.
vxfs fsck: file system had I/O error(s) on user data.
log replay in progress
full file system check required, exiting ...
Now I can't mount the filesystem. Any thoughts?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2004 03:43 AM
тАО02-27-2004 03:43 AM
Re: Cannot Delete Empty Directory
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2004 03:44 AM
тАО02-27-2004 03:44 AM
Re: Cannot Delete Empty Directory
# fsck -F vxfs -y -o full /dev/vgxx/lvolx
Regards,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2004 03:49 AM
тАО02-27-2004 03:49 AM
Re: Cannot Delete Empty Directory
fsck -F vxfs -y -o full /dev/vgX/lvolX
vxfs fsck: file system had I/O error(s) on meta-data.
vxfs fsck: file system had I/O error(s) on user data.
log replay in progress
pass0 - checking structural files
pass1 - checking inode sanity and blocks
vxfs fsck: fsck read failure bno = 89608, off = 0, len = 8192
file system check failure, aborting ...
Any thoughts?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2004 04:07 AM
тАО02-27-2004 04:07 AM
Re: Cannot Delete Empty Directory
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2004 04:11 AM
тАО02-27-2004 04:11 AM
Re: Cannot Delete Empty Directory
lvdisplay -v /dev/vgX/lvolX |more
look for errors....
Try a dd:
dd if=/dev/vgX/rlvolX of=/dev/null bs=256k
and try the physical disk that your lvol belongs to:
dd if=/dev/rdsk/c?t?d? of=/dev/null bs=256k
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2004 04:19 AM
тАО02-27-2004 04:19 AM
Re: Cannot Delete Empty Directory
vmunix: vxfs: mesg 055: vx_metaioerr - /dev/vgX/lvolX file system meta data read error
And this one:
Feb 26 05:25:12 SYS vmunix: DIAGNOSTIC SYSTEM WARNING:
Feb 26 05:25:12 SYS vmunix: The diagnostic logging facility has started receiving excessive
Feb 26 05:25:12 SYS vmunix: errors from the I/O subsystem. I/O error entries will be lost
Feb 26 05:25:12 SYS vmunix: until the cause of the excessive I/O logging is corrected.
Feb 26 05:25:12 SYS vmunix: If the diaglogd daemon is not active, use the Daemon Startup command
Feb 26 05:25:12 SYS vmunix: in stm to start it.
Feb 26 05:25:12 SYS vmunix: If the diaglogd daemon is active, use the logtool utility in stm
Feb 26 05:25:12 SYS vmunix: to determine which I/O subsystem is logging excessive errors.
Feb 26 05:47:11 SYS vmunix: DIAGNOSTIC SYSTEM WARNING:
Feb 26 05:47:11 SYS vmunix: The diagnostic logging facility is no longer receiving excessive
Feb 26 05:47:11 SYS vmunix: errors from the I/O subsystem. 69 I/O error entries were lost.
Any thoughts?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2004 04:25 AM
тАО02-27-2004 04:25 AM
SolutionWell that's not pretty. metioerror is an error reading the metadata in the filesystem. The metadata is where the inode info & other important data is kept that allows the system to find the file & tell you what you want to know about it.
If the following errors are right after this error, then I'd suspect you have a disk going bad & it's going bad in the absolute worst place - where the meta data lives.
You better back it up - IF YOU CAN - and get it replaced.
Rgds,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2004 04:29 AM
тАО02-27-2004 04:29 AM
Re: Cannot Delete Empty Directory
Rgds...Geoff