Operating System - HP-UX
1833780 Members
2572 Online
110063 Solutions
New Discussion

Re: UMOUNT ERROR And Free LV

 
SOLVED
Go to solution
YOGI_3
Frequent Advisor

UMOUNT ERROR And Free LV

I am getting following error while unmouting....

# umount /dev/vgmsa01/yog
umount: cannot unmount /yog : Device busy
umount: return error 1.

#######################################

This is second query--
When i delete some files from one LV which is say 98% occupied...after deleting it is suppose to come upto 80% as files calculated..
Still its showing 98% ...
i fire lvsync still no expected result.

Waiting for ur valuable replies...

Thanks,
Yogesh
There is never a wrong time to do the right things
7 REPLIES 7
Devender Khatana
Honored Contributor

Re: UMOUNT ERROR And Free LV

Hi Yogesh,

Both your problems correspond to one reason. Your file system has some files open under this file system which is causing to be busy and not allowing to be unmounted and also the files which are in use are not freeing up space even after deleting. You need to find out the applications which are using these files. Once that application is terminated both your problems will resolv.

Use fuser to find out the processes using the file system. A more detailed information can be get through lsof if you have that.

HTH,
Devender
Impossible itself mentions "I m possible"
morganelan
Trusted Contributor

Re: UMOUNT ERROR And Free LV

Hi,try this

#fuser -ku /dev/vgmsa01/yog
#umount /dev/vgmsa01/yog
Kamal Mirdad
Ranjith_5
Honored Contributor
Solution

Re: UMOUNT ERROR And Free LV

Hi yogi,

See whether any one is using the file system dev/vgmsa01/yog.

#fuser -cu dev/vgmsa01/yog will show you the processes related.Kill those processes.
#fuser -ku dev/vgmsa01/yog

try umount again. If this doesnt solve your prob, use lsof to find out the open files in this file system and kill those.

For second query can you have a reboot and see again.

Regards,
Syam
Ranjith_5
Honored Contributor

Re: UMOUNT ERROR And Free LV

Attached lsof binary. copy this to /usr/bin
and then run

#lsof dev/vgmsa01/yog

Regards,
Syam
Mel Burslan
Honored Contributor

Re: UMOUNT ERROR And Free LV

for pid in `fuser -c /yog`
do
kill $pid; sleep 3; kill -9 pid
done
at this point your deleted file handles should be released and you should start to see the actual free space. If you still want to unmount the filesystem, at this point you should be able to do so:

umount /yog
________________________________
UNIX because I majored in cryptology...
Sreedhar Nathani
Valued Contributor

Re: UMOUNT ERROR And Free LV

Hello Yogi,

You can use the following command to unmount
#fuser -kuc /;umount /

Some times even though you deleted the files, but still your application is not released the files then bdf won't show the freed space. Normally stopping/starting the application will resolve the problem.

Incase if you want to see whether files are using by application or not, you can use the tool called uli

morganelan
Trusted Contributor

Re: UMOUNT ERROR And Free LV

Hi,
Fyi,Lsof stands for LiSt Open Files, and it does just that. It lists information about files that are open by the processes running on a UNIX system.
You must concern this:
Lsof never reports a path names for a file that has been unlinked from its parent directory -- e.g., deleted via rm, or the unlink() system call -- even when some process may still hold the file open. That's because the path name is erased from name caches and the parent directory file when the file is unlinked.

Unlinked open files are sometimes used by applications for temporary, but invisible storage (i.e., ls won't show them, and no other process can open them.) However, they may occasionally consume disk space to excess and cause concern for a system administrator, who will be unable to locate them with find, ls, du, or other tools that rely on finding files by examining the directory tree.

By using lsof's +L option you can see the link count of open files -- in the NLINK column. An unlinked file will have an NLINK value of zero. By using the option +L1 you can tell lsof to display only files whose link count is less than one (i.e., zero).

When a process has a lock of length one, starting at byte zero, lsof can't distinguish it from a full file lock.That's because most UNIX dialects represent both locks the same way in their file lock (flock or eflock) structures.
Kamal Mirdad