The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Operating Systems > Linux
.
google unix.com



Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how to force umount robertngo HP-UX 0 04-21-2009 06:25 AM
Upgrade serviceguard can be "dangerous"? kaugrs HP-UX 1 01-28-2008 01:18 PM
List of dangerous Unix command JBB873 UNIX for Dummies Questions & Answers 8 02-05-2005 02:57 PM
umount help andrec UNIX for Advanced & Expert Users 4 11-21-2003 03:13 PM
umount rod23 UNIX for Dummies Questions & Answers 2 08-07-2001 07:25 PM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-14-2009
pastajet pastajet is offline
Registered User
  
 

Join Date: Sep 2009
Posts: 1
Is umount -l dangerous?

I had a umount busy issue, that the usual fuser -mk did not solve, I did a umount -l and was able to unmount the device, I then got in trouble by the storage team staff:

Here was a snippet of their response:

Using "umount -l" is a potentially dangerous act.
The command combination for a lazy unmount "umount -l" has been outlawed in the past by the storage team.
It has caused outages on filers (they had to reboot)


I have never had the issue myself in the past with the command, and was wondering if anyone had any personal experience on this issue?

Thks.
  #2 (permalink)  
Old 09-14-2009
Corona688 Corona688 is offline
Registered User
  
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 1,969
Well, if you can't track down what's keeping it open with fuser, how will a lazy unmount help? It doesn't force anything, just waits. It doesn't stop anything from opening either, so it could well wait forever. If the filesystem is having actual problems, the system could be stuck forever waiting for operations to complete that will simply never complete with no way to cancel the unmount short of rebooting and hoping the filesystem isn't left in an unusable state.
  #3 (permalink)  
Old 09-14-2009
mark54g mark54g is offline
Registered User
  
 

Join Date: May 2008
Posts: 366
It doesn't wait, it pretty much says "OK, Lets just drop the connection" and allows the FS to sort it out later.
  #4 (permalink)  
Old 09-14-2009
Neo's Avatar
Neo Neo is offline Forum Staff  
Administrator
  
 

Join Date: Sep 2000
Location: Asia Pacific
Posts: 6,804
From the manual:


Code:
-l 
    Lazy unmount. Detach the filesystem from the filesystem hierarchy 
    now, and cleanup all references to the filesystem as soon as 
    it is not busy anymore. (Requires kernel 2.4.11 or later.)

So the filesystem is not "really" completely unmounted, it is in a state waiting for the processes using the filesystem to end so the filesystem can be cleaned up.

I would not recommend this. It is better to find the processes using the filesystem (with lsof, for example) and them manually kill the processes and then unmount. I would not want my server and filesystem to be in such a wait state of uncertainty.

---------- Post updated at 19:11 ---------- Previous update was at 19:00 ----------

Quote:
Originally Posted by mark54g View Post
It doesn't wait, it pretty much says "OK, Lets just drop the connection" and allows the FS to sort it out later.
Not really..... it does not drop the busy connections, it waits, and then cleans up, after the busy processes terminate.

---------- Post updated at 19:20 ---------- Previous update was at 19:11 ----------

FYI, FWIW from lsof manual:

Quote:
+|-f [cfgGn]

f by itself clarifies how path name arguments are to be interpreted. When followed by c, f, g, G, or n in any combination it specifies that the listing of kernel file structure information is to be enabled (`+') or inhibited (`-').

Normally a path name argument is taken to be a file system name if it matches a mounted-on directory name reported by mount(8), or if it represents a block device, named in the mount output and associated with a mounted directory name.

When +f is specified, all path name arguments will be taken to be file system names, and lsof will complain if any are not. This can be useful, for example, when the file system name (mounted-on device) isn't a block device. This happens for some CD-ROM file systems.

When -f is specified, all path name arguments will be taken to be simple files. Thus, for example, the ``-f /'' arguments direct lsof to search for open files with a `/' path name, not all open files in the `/' (root) file system.

Be careful to make sure +f is properly terminated and isn't followed by a character (e.g., of the file or file system name) that might be taken as a parameter. For example, use ``--'' after +f as in this example.

$ lsof +f -- /file/system/name

The listing of information from kernel file structures, requested with the +f [cfgGn] option form, is normally inhibited, and is not available for some dialects - e.g., /proc-based Linux. When the prefix to f is a plus sign (`+'), these characters request file structure information:
  • c file structure use count
  • f file structure address
  • g file flag abbreviations
  • G file flags in hexadecimal
  • n file structure node address

When the prefix is minus (`-') the same characters disable the listing of the indicated values.

File structure addresses, use counts, flags, and node addresses may be used to detect more readily identical files inherited by child processes and identical files in use by different processes. Lsof column output can be sorted by output columns holding the values and listed to identify identical file use, or lsof field output can be parsed by an AWK or Perl post-filter script, or by a C program.
  #5 (permalink)  
Old 09-14-2009
mark54g mark54g is offline
Registered User
  
 

Join Date: May 2008
Posts: 366
Sorry, I did not mean the process connection. I meant the file system mount status to users was "offline" and the cleanup would occur later. It was not meant to be horribly accurate but give a very high level overview of "Do now, clean later"
  #6 (permalink)  
Old 09-15-2009
Corona688 Corona688 is offline
Registered User
  
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 1,969
That's not accurate either. I went and tested it before spouting off, you know...

Users who have open directories are not stopped from traversing them, opening files in them, writing things in files, or perhaps even creating files. In other words, a lazy unmount doesn't do anything at all to the filesystem until it's free -- it just fakes it. That is, it denies access to a mounted filesystem until everyone closes all references to it. That's pretty much the worst of both worlds: It's mounted, so you can't do a thing to the devices, but it acts like its offline and denies everyone access. If the administration couldn't quickly find whatever reference is plugging up the unmount, they really would have to reboot the machine, it's either that or send the people who need to use that partition home for the day.

It wouldn't be so bad if there was a way to cancel a lazy unmount...

Last edited by Corona688; 09-15-2009 at 02:21 PM..
Reply

Bookmarks

Tags
lazy umount, umount, umount -l

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:06 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0