Operating System - HP-UX
1758117 Members
2889 Online
108868 Solutions
New Discussion юеВ

Re: cannot umount filesystem (challenging one)

 
Kenny Soward
New Member

cannot umount filesystem (challenging one)

I did something really stupid. I have an Unix 11.11 box. We have sapdatas mounted under /oracle//.

We received a validation error that /oracle/ was not mounted (which needs to be in our environment) and I went about trying to "fix" it.

I tried to follow a CBA we have for doing this. I
1) mv /oracle/ /oracle/.tmp
2) Created a new logical volume with the lvcreate command named after the original..
3) Perform newfs on the logical volume.
4) Mount old directory to new logical volume.
5) Copy the data from /oracle/.temp to new /oracle/ location.
Example:
find /oracle/.temp -xdev -depth -print | cpio -pxdm /oracle/
6) Removed /oracle/.tmp


My mistake was that I didn't umount anything prior to doing these steps. Bdfs showed the filesysems are mounted very strangely now.

# bdf /oracle/NPA/sapreorg
Filesystem kbytes used avail %used Mounted on
/dev/vg_apps/lv_oracle
524288 77629 418814 16% /oracle

This should be mounted on /dev/vg_NPA_lv_reorg.

I cannot unmount anything under /oracle/NPA now.

# umount /oracle/NPA/sapreorg
umount: cannot unmount /oracle/NPA/sapreorg : Block device required
umount: return error 1.

The customer said I can blow these filesystems away as they are "test" but I cannot get them unmounted.

Any ideas for this challenging issue?



7 REPLIES 7
Simon Hargrave
Honored Contributor

Re: cannot umount filesystem (challenging one)

Have you tried recreating mnttab?

# mv /etc/mnttab /etc/mnttab.bak
# mount
Walter Pisani
New Member

Re: cannot umount filesystem (challenging one)

Hi,

The mountpoint is /oracle

Correct Syntax:
# unmount /oracle

Walter
Bharat Katkar
Honored Contributor

Re: cannot umount filesystem (challenging one)

Hi,

Did you try "umount /oracle" !!!
Regards,

You need to know a lot to actually know how little you know
Kenny Soward
New Member

Re: cannot umount filesystem (challenging one)

Hi all. Thanks for the replies. Yes, I did try to rebuild mnttab using the above method with no luck.

Also, I would try to umount /oracle but there are some other running that are mounted beneath that.

I think the only way I'll be able to remedy this issue is get a reboot for this server.
Devesh Pant_1
Esteemed Contributor

Re: cannot umount filesystem (challenging one)

Did you try fuser -k on the /oracle ?
Devesh
Muthukumar_5
Honored Contributor

Re: cannot umount filesystem (challenging one)

If some user is entered into the mounted directory or using files located in it, then you can not umount it.

Try to check fuser -k /oracle to get user who is using that file system. Else directly make a message to that users as "who is using /oracle directoy. please out of that directory".

Or login as root and kill all user process by who -u except your's and unmount it.

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

Re: cannot umount filesystem (challenging one)

Personally I like to
#fuser -u /mountpoint

First, just because I like to see what processes it thinks is using that filesystem.
If you want you can kill the pids by hand or use the command above
#fuser -k /mountpoint.

I've seen cases where that comes back without any pids showing up. Then I usually go against the lvol.
#fuser -u /dev/vgXX/lvolXX

Then you should hopefully be able to
#umount /mountpoint