Operating System - HP-UX
1753808 Members
7496 Online
108805 Solutions
New Discussion юеВ

Re: rmdir: Cannot remove mountable directory

 
V. Nyga
Honored Contributor

Re: rmdir: Cannot remove mountable directory

Hi Robert,

what does bdf shows from your root directory?
# bdf

Volkmar
*** Say 'Thanks' with Kudos ***
Robert Bissett
Advisor

Re: rmdir: Cannot remove mountable directory

Hi,
thanks again for suggestions. Answers to questions and results of suggestions below....
Robby.

Todds Questions:
1. No
2. Can I kill nfskd ?
3. Can I recreate fstab without affecting system running ?
4. ls -i /bkp gives nothing

cd /bkp
/bkp $ ls -ldi .
2 drwxr-xr-x 2 root root 4096 Sep 17 14:06 .

/bkp was possibly a mounted filesystem at one point and there was another directory that had a symbolic link to it, this is now gone. That's all we know.


$ bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 204800 99192 104800 49% /
/dev/vg00/lvol1 298928 107576 161456 40% /stand
/dev/vg00/lvol8 4710400 430392 4246664 9% /var
/dev/vg00/lvol7 1466368 992536 470184 68% /usr
/dev/vg01/lvu04 17408000 2234568 14936484 13% /u04
/dev/vg01/lvu03 17408000 4193800 13007736 24% /u03
/dev/vg01/lvu02 17408000 11394908 5919204 66% /u02
/dev/vg01/lvu01 17653760 6090000 11202512 35% /u01
/dev/vg00/lvol4 204800 147256 57544 72% /tmp
/dev/vg01/lvstats 53248 4520 45729 9% /stats
/dev/vg00/lvol6 1114112 961760 151184 86% /opt
/dev/vg00/lvol5 24576 11024 13496 45% /home
/dev/vg00/lvprod 524288 297974 212208 58% /prod
/dev/vg01/lvrobby 204800 99192 104800 49% /robby
/dev/vg00/lvexport 2048000 16703 1904363 1% /export
john korterman
Honored Contributor

Re: rmdir: Cannot remove mountable directory

Hi again Robert,

the leftmost "2" of the output from the -ldi command:
2 drwxr-xr-x 2 root root 4096 Sep 17 14:06 .
indicates (to me, at least) that /bkp is a mount point and that it is still mounted.
I therefore suspect that there is something wrong in your /etc/fstab. Have you looked into that?

regards,
John K.
it would be nice if you always got a second chance
Mark Grant
Honored Contributor

Re: rmdir: Cannot remove mountable directory

If you are sure that no process is holding that directory open or has an open file in that directory (remember the file might not actually have a name if it has been removed) or that no process regularly tries to traverse the /bkp directory then my guess is that the directory doesn't actually exist but that there is still an entry for it in the / directory entry for some reason. However, I personally am not confident enough to start editing / myself so I guess an fsck of / is in order.

By the way, there is no problem updating fstab within a live system unless your production applications run "mount" for some reason. Same is true of NFS though if it doesn't come back up again you might be in trouble.
Never preceed any demonstration with anything more predictive than "watch this"
Todd McDaniel_1
Honored Contributor

Re: rmdir: Cannot remove mountable directory

I agree it seems to be more and more like /etc/fstab...


I might try one other thing just to see what it gives...

#mount -p

This will show you what hte mount options are on each filesystem. Probably show null for /bkp.

_________________________________
Yes you can recreate the fstab... Just do it some where else... and mv it into place!

cp /etc/fstab /root/fstab.old
vi /tmp/fstab
mv /etc/fstab* /some/other/dir/
mv /tmp/fstab /etc/fstab

*****One other thing move any and all versions of /etc/fstab to some other directory...********

I know it shouldnt matter but I would do it just to be clean in /etc... I would grep for bkp in any old fstabs in /etc...
Unix, the other white meat.
Robert Bissett
Advisor

Re: rmdir: Cannot remove mountable directory

Guys,
I'll try these suggestions on monday. Thanks,
Robby

btw - I've assigned points a couple of times to the last few posts but they havn't appeared ?
Balakumar M
Frequent Advisor

Re: rmdir: Cannot remove mountable directory

Hi,
Try with fuser -cu /bkp and kill the listed process, if the process is not listed then check for the filesystem which was mounted on /bkp e.g. fuser -cu /dev/vg02/lovl1, if any process uses this mount point, kill the process. I think this will do.

Regards,
-Bala
Life is a continues learning process
Gary Cooper_1
Esteemed Contributor

Re: rmdir: Cannot remove mountable directory

I dont know if you managed to fix this (guess by now you managed to work around it anyway), but I've been having a similar problem.

What I've been doing is relocating the source of an automounted (autofs) nfs directory. The directory that I couldn't delete was actually the destination (auto)mount point.

I had switched off the automounting of this directory, but I think I had done it before the automount had expired and had unmounted.

Anyway the way that I eventually got rid of it was to issue the 'automount' command on the offending system (i.e. the one with the directory that wouldn't delete)... and hey presto! the directory was gone! - I didn't even have to delete it!

Anyway, I hope this helps anyone else that may encounter the same problem.

Regards,

Gary Cooper
Suresh Patoria
Super Advisor

Re: rmdir: Cannot remove mountable directory

hi

use rm -rf /bkp command

thanx & regards,
suresh patoria
Todd McDaniel_1
Honored Contributor

Re: rmdir: Cannot remove mountable directory

no points here please.


Gary... I might have started a new thread so yours wont get lost in this looong thread.

just a friendly suggestion.


I sometimes post answers that I have found instead of asking questions as you did here, just incase some browsing the forums might need it.

Unix, the other white meat.