- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: rmdir: Cannot remove mountable 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
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
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
09-16-2003 09:37 AM
09-16-2003 09:37 AM
rmdir: Cannot remove mountable directory
on a HPUX 11i server running vpars, I'm trying to remove an directory using rmdir but get the following reply :
rmdir /bkp
rmdir: /bkp: Cannot remove mountable directory
So I do the following:
umount /bkp
umount: cannot find /bkp in /etc/mnttab
cannot unmount /bkp
I try mount it:
mount /bkp
mount: /bkp was either ignored or not found in /etc/fstab
It's not listed in SAM under LVs or Filesystems. It's not mentioned in /etc/mnttab or /etc/fstab. Also, there are no device files for it in either /dev/vg00 or /dev/vg01 - the 2 volume groups I have.
Perhaps another file is linked to it ?
The output of ls -ail is as follows :
2 drwxr-xr-x 2 root root 4096 Sep 16 17:45 bkp
I'm stumped - any ideas ?
Robert Bissett
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2003 09:41 AM
09-16-2003 09:41 AM
Re: rmdir: Cannot remove mountable directory
but did u check if automounter/autofs has been configured to mount on this dir..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2003 09:42 AM
09-16-2003 09:42 AM
Re: rmdir: Cannot remove mountable directory
Try this -
mv /etc/mnttab /etc/mnttab.old
mount -a
umount /bkp
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2003 09:52 AM
09-16-2003 09:52 AM
Re: rmdir: Cannot remove mountable directory
I just reproduced the error in one of my test machines. The prob is that automounter has been configured to mount to the directory.
# ps -ef | grep auto
# kill
# vi /etc/auto_master
remove the ref
# /usr/lib/netsvc/fs/automount/automount -f /etc/auto_master
# rmdir /bkp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2003 09:54 AM
09-16-2003 09:54 AM
Re: rmdir: Cannot remove mountable directory
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2003 02:56 AM
09-17-2003 02:56 AM
Re: rmdir: Cannot remove mountable directory
thanks for your replies, however problem still exists. It's not the automounter.....
ps -ef | grep auto
root 5396 5326 0 07:04:05 pts/ta 0:00 grep auto
Also, renaming /etc/mnttab didnt work.....
$ mv /etc/mnttab /etc/mnttab.old
$ ls /etc/mnt*
/etc/mnttab.old
mount -a
$ umount /bkp
umount: cannot find /bkp in /etc/mnttab
cannot unmount /bkp
$ rmdir /bkp
rmdir: /bkp: Cannot remove mountable directory
Any other ideas ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2003 03:04 AM
09-17-2003 03:04 AM
Re: rmdir: Cannot remove mountable directory
check if u could find any links inside.
Any similar inodes!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2003 03:10 AM
09-17-2003 03:10 AM
Re: rmdir: Cannot remove mountable directory
just a stupid question: do you have any other mount points that use /bkp ?
regards,
John K.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2003 03:20 AM
09-17-2003 03:20 AM
Re: rmdir: Cannot remove mountable directory
Take a look at next link, bit old but look very mutch like you problem.
http://aa11.cjb.net/hpux_admin/1997/0100.html
Regards,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2003 03:49 AM
09-17-2003 03:49 AM
Re: rmdir: Cannot remove mountable directory
# mkdir /delete
# cd /delete
# rmdir /delete
rmdir: /delete: Cannot remove mountable directory
You don't happen to be in the directory you are trying to delete do you?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2003 03:55 AM
09-17-2003 03:55 AM
Re: rmdir: Cannot remove mountable directory
"If the directory is the root directory or the current working directory
of any process, it is unspecified whether the function succeeds, or
whether it fails and sets errno to [EBUSY]."
Looks like it could be a bug/feature in HPUX too
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2003 04:01 AM
09-17-2003 04:01 AM
Re: rmdir: Cannot remove mountable directory
I tried ls -ali initially. Here is a portion of the output (with dates and times removed for ease of viewing)....showing all directories with the same inode number i.e. 2, as is normal I think.
Also, I'm not in the directory while trying to remove.
Robby.
2 drwxr-xr-x 32 root root 8192 .
2 drwxr-xr-x 32 root root 8192 ..
1909 drw------- 5 root sys 8192 .netscape
1068 -r--r--r-- 1 bin bin 965 .profile
2145 -rw------- 1 root sys 3622 .sh_history
1067 drwxr-xr-x 5 root sys 96 .sw
1916 drwxr-xr-x 2 root sys 96 SD_CDROM
2458 dr-xr-xr-x 2 root sys 96 backup
1224 lr-xr-xr-t 1 root sys 8 bin -> /usr/bin
2 drwxr-xr-x 2 root root 4096 bkp
1032 drwxrwxrwx 2 root sys 8192 brs
1066 dr-xr-xr-x 2 root root 96 tmp_mnt
2 drwxr-xr-x 5 oracle dba 96 u01
2 drwxr-xr-x 4 oracle dba 96 u02
2 drwxr-xr-x 4 oracle dba 96 u03
2 drwxr-xr-x 5 oracle dba 96 u04
2438 -rw-rw-rw- 1 root sys 04 umodem.log
2 dr-xr-xr-x 25 bin bin 8192 usr
2 dr-xr-xr-x 27 bin bin 8192 var
1981 -rw-rw-rw- 1 root sys 43226 wlm.txt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2003 04:14 AM
09-17-2003 04:14 AM
Re: rmdir: Cannot remove mountable directory
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2003 05:13 AM
09-17-2003 05:13 AM
Re: rmdir: Cannot remove mountable directory
Does "fuser" show anything?
Try:
#fuser -c /bkp
and
#fuser -f /bkp
Kind regards,
Zigor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2003 05:21 AM
09-17-2003 05:21 AM
Re: rmdir: Cannot remove mountable directory
Look also at "/etc/exports".
Hope this helps.
Kind regards,
Zigor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2003 05:34 AM
09-17-2003 05:34 AM
Re: rmdir: Cannot remove mountable directory
no, nothing in /etc/exports and fuser shows nothing using the dir.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2003 05:38 AM
09-17-2003 05:38 AM
Re: rmdir: Cannot remove mountable directory
in case I didnt mention the /bkp directory is empty.
Robby.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2003 05:50 AM
09-17-2003 05:50 AM
Re: rmdir: Cannot remove mountable directory
Does this show nothing:
# ls /bkp | cat -v
what does
# file /bkp
show?
regards,
John K.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2003 05:55 AM
09-17-2003 05:55 AM
Re: rmdir: Cannot remove mountable directory
$ ls /bkp | cat -v
$ file /bkp
/bkp: directory
i.e. empty directory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2003 06:04 AM
09-17-2003 06:04 AM
Re: rmdir: Cannot remove mountable directory
My stupid suggestion, let's try with other commands to see if the result is the same:
Try to move with "mv /bkp /bkp.old"
and if it works, try again to delete "/bkp.old"
What happens?
Kind regards,
Zigor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2003 06:12 AM
09-17-2003 06:12 AM
Re: rmdir: Cannot remove mountable directory
tried already. Output is...
$ mv /bkp /bkp.old
mv: /bkp.old: rename: Device busy
Regards,
Robby.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2003 06:18 AM
09-17-2003 06:18 AM
Re: rmdir: Cannot remove mountable directory
I guess at this time you will need to use "lsof" to find out the processes attached to this directory. lsof is much elegant than fuser. Once it is installed, run lsof /bkp and see what processes are using this directory. It could be a soft nfs mount etc., which can be easily found through the processes working on this directory.
You can search this site for pointers to get lsof 64bit version. Even someone posted the actual binary.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2003 07:19 AM
09-17-2003 07:19 AM
Re: rmdir: Cannot remove mountable directory
This may be a bit heavy-handed (and perhaps you've already tried it), but do you get the same results in single-user mode? If something is "using" /bkp, dropping to single-user mode ought to fix that little problem.
Good Luck,
Chuck
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2003 07:45 AM
09-17-2003 07:45 AM
Re: rmdir: Cannot remove mountable directory
forgot to ask about the mount point; what is the output of:
# cd /bkp
# bdf .
regards,
John K.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2003 02:04 AM
09-18-2003 02:04 AM
Re: rmdir: Cannot remove mountable directory
thanks again for all the suggestions. Here are the outputs of each - the lsof ouput looks weird, perhaps there was a link at some point which doesn't exist now ?
$ /tmp/lsof_4.68 /bkp
lsof_4.68: WARNING: can't stat() vxfs file system /robby
Output information may be incomplete.
Unfortunately I can't bring the server down to single user mode as it's production. I'm also worried I would have problems rebooting.
Here is the output of the bdf suggestion within the directory.
/bkp $ bdf .
bdf: could not find the mount point for .
It looks like lsof has hinted at something - anyone any ideas what though ?
Thanks,
Robby.