Operating System - HP-UX
1832241 Members
2791 Online
110041 Solutions
New Discussion

mount problem, device busy

 
Dirk Kilian
Advisor

mount problem, device busy

Hi,

I have a problem with a Service Guard script which is trying to NFS mount a filesystem.

The following message comes up:
Jan 20 17:41:26 yiek sgsmoumx.sh [2942]: Mounting of /m/home has failed!!!
nfs mount: mount_nfs: mount: /m/home: Device busy

the command in the SG script is:
mount sysyo:/d/home /m/home
(sysho is a SG package,
/m is a softlink to /d)

when I try to do it manually, the following happens:
yiek:/ (109) root% mount sysyo:/d/home /m/home
nfs mount: mount_nfs: mount: /m/home: Device busy

when I try it with a new mount point /k/home it works
yiek:/ (110) root% mkdir /k
yiek:/ (111) root% mkdir /k/home
yiek:/ (112) root% mount sysyo:/d/home /k/home
yiek:/ (113) root% bdf
yiek:/ (113) root% bdf
Filesystem kbytes used avail %used Mounted on
...
sysyo:/d/home 4292608 9576 4015400 0% /k/home

when I try to free the filesystem /m/home I get the message:
yiek:/etc/cmcluster/db (191) root% fuser -ck /m/home
/m/home: fuser: could not find file system mounted at /m/home.

++++ can you help ++++

BR Dirk


7 REPLIES 7
John Dvorchak
Honored Contributor

Re: mount problem, device busy

To use a mount point it has to be empty. Make sure that /m/home is actually empty. Also no one can be in that directory. Use fuser to see if someone is using it, by NOT using the -ck switch just fuser:

fuser /m/home

Will tell you if someone is there, because you don't have a file system mounted yet the -ck switch will fail with the error you are getting.
If it has wheels or a skirt, you can't afford it.
Sridhar Bhaskarla
Honored Contributor

Re: mount problem, device busy

Hi,

Make sure someone is not in /d/home (as you mentioned /m is a softlink to /d). YOu could do onething. Mv /d to /d.old and create /d/home and then try mounting it manually. It will take care of users in that directory.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Chris Vail
Honored Contributor

Re: mount problem, device busy

Sometimes dead/dying processes (even orphans/zombies, etc) will keep a file or directory locked and in use, even if other commands doesn't show it. To find these you'll need lsof. You can get this from software.hp.com. Its been a while since I last used it (6 months) but I had to recompile it for 64 bit--the 32bit version wouldn't run on one of my systems.


Chris
doug mielke
Respected Contributor

Re: mount problem, device busy

If fuser doesn't show any use of that mount point, look for a remote login there (whodo might give a clue), ftp process, or stale nfs mount. ps -elf | grep dirname to see a process running from there.

Look in /etc/mnttab to make sure there is not already something mounted there.

( of course, there's always a fix in a reboot)

aside:I thought mount points could have files in them, they just get hidden when something is mounted over them.
kamal_9
Super Advisor

Re: mount problem, device busy

Hi Dirk
Check if any any process is using /m/home .It might already mounted fot other filesystem .check with fuser
# fuser /m/system
if try killing the process
Dirk Kilian
Advisor

Re: mount problem, device busy

Hi all,

thx for your answers, problem has been solved by a colleague already.

He run a script, which is recreating the softlink /m -> /d and recreating all the filesystems /m/* which work as mountpoints for the real /d/* filesystems.

fuser is a good hint, thx for that...

Dirk
Jordan Bean
Honored Contributor

Re: mount problem, device busy

John, a mount point need not be empty. I've hidden stuff under mount points. The discrepency between df / and du -sx / confused my operators for a long time.