<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Personal Blog of Emre Yaşar &#187; fuser</title>
	<atom:link href="http://www.yasars.com/index.php/tag/fuser/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.yasars.com</link>
	<description>A bit technical, a bit lifestyle..</description>
	<lastBuildDate>Tue, 27 Apr 2010 19:55:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Basic Linux Tips #2 &#8211; lsof and fuser commands -</title>
		<link>http://www.yasars.com/index.php/2009/12/03/lsof_and-_fuser_commands/</link>
		<comments>http://www.yasars.com/index.php/2009/12/03/lsof_and-_fuser_commands/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 13:18:06 +0000</pubDate>
		<dc:creator>Admin - Emre Yasar</dc:creator>
				<category><![CDATA[Genel]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[device is busy]]></category>
		<category><![CDATA[fuser]]></category>
		<category><![CDATA[lsof]]></category>
		<category><![CDATA[umount]]></category>

		<guid isPermaLink="false">http://www.yasars.com/?p=327</guid>
		<description><![CDATA[System admins frequently get &#8220;device is busy&#8221; error while trying to umount a partition.
Probably you are getting rid of this problem by using &#8220;umount -f&#8221; comand at the end of your patience i think.
But I advise you being more polite while working around umount command.

At this point you can find the files are being used [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-medium wp-image-8" title="LINUX1-emreyasar" src="http://www.yasars.com/wp-content/uploads/2009/08/LINUX1-full-300x187.jpg" alt="LINUX1-emreyasar" width="300" height="187" />System admins frequently get &#8220;<strong>device is busy</strong>&#8221; error while trying to umount a partition.</p>
<p>Probably you are getting rid of this problem by using &#8220;umount -f&#8221; comand at the end of your patience i think.</p>
<p>But I advise you being more polite while working around umount command.</p>
<p><span id="more-327"></span></p>
<p>At this point you can find the files are being used by using lsof command.</p>
<p>For example:</p>
<p><strong>[emreyasar@testserver ~]# umount /mnt</strong></p>
<p><strong>umount: /mnt: device is busy</strong></p>
<p>Let&#8217;s look who is using /mnt folder</p>
<p><strong>[emreyasar@testserver ~]# lsof /mnt<br />
COMMAND   PID  USER   FD   TYPE DEVICE       SIZE  NODE NAME<br />
squid   12562 squid  142w   REG    8,6 1086241246 98209 /mnt/access.log</strong></p>
<p>We see that the process with PID 12562 initiated by squid account is using /mnt/access.log file.</p>
<p>You can use fuser command for getting a shorter result.</p>
<p><strong>[emreyasar@testserver ~]# fuser /mnt/*</strong></p>
<p><strong>/mnt/access.log:    12562</strong></p>
<p>If you can stop the related porcess normally you  do this and then you may umount the filesystem. If you can&#8217;t do by this way it&#8217;s time to be a bit rude.</p>
<p>You can use kill command for killing the process or you may try this:</p>
<p><strong>fuser -sk /mnt</strong></p>
<p>The command above will kill all the processes which are using /mnt folder.</p>
<p>If you could not killed the related process(es) now you must try</p>
<p><strong>umount -f /mnt </strong></p>
<p>command.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yasars.com/index.php/2009/12/03/lsof_and-_fuser_commands/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
