<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 9.00.8112.16464">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial></FONT> </DIV>
<BLOCKQUOTE 
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px" 
dir=ltr>
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color: black"><B>From:</B> 
  <A title=silvertip257@gmail.com 
  href="mailto:silvertip257@gmail.com">SilverTip257</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=centos-virt@centos.org 
  href="mailto:centos-virt@centos.org">Discussion about the virtualization on 
  CentOS</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Cc:</B> <A title=jboyce@meridianenv.com 
  href="mailto:jboyce@meridianenv.com">jboyce@meridianenv.com</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, March 05, 2013 4:21 
  PM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [CentOS-virt] Need to 
  unmount an LV from host system</DIV>
  <DIV><BR></DIV>
  <DIV dir=ltr>On Tue, Mar 5, 2013 at 3:24 PM, <SPAN dir=ltr><<A 
  href="mailto:jboyce@meridianenv.com" 
  target=_blank>jboyce@meridianenv.com</A>></SPAN> wrote:<BR>
  <DIV class=gmail_extra>
  <DIV class=gmail_quote>
  <BLOCKQUOTE 
  style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" 
  class=gmail_quote>Greetings -<BR><BR>Ok, I made a mistake that I need to 
    fix.  Fortunately it is not a<BR>destructive mistake, but I need some 
    advice on how to correct the problem.<BR><BR>CentOS 6.3 host system named 
    Earth<BR><BR>I was creating some new logical volumes within my exiting 
    volume group for<BR>a new virtual machine using the LVM GUI.  When I 
    created the LV that I<BR>plan to use for root partition of the new VM 
    (Bacteria) I mistakenly<BR>clicked on the box to mount the LV, and specified 
    the mount point as /.<BR><BR></BLOCKQUOTE>
  <DIV><BR></DIV>
  <DIV>So you mounted that new LV as / (or over the existing root) on your host 
  node?</DIV>
  <DIV><BR></DIV>
  <DIV>You may end up needing to boot to a rescue CD, mount, and rsync files 
  from Bacteria's root to Earth's [real] root.  ( I wonder if anything is 
  being written to Bacteria's root since it's mounted over the real root. 
)</DIV>
  <DIV> </DIV>
  <BLOCKQUOTE 
  style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" 
  class=gmail_quote>[root@earth ~]# df -h<BR>Filesystem       
         Size  Used Avail Use% Mounted 
    on<BR>/dev/mapper/vg_mei-lv_earthroot<BR>          
                5.0G  3.9G  880M 
     82% /<BR>tmpfs                 
    5.9G  276K  5.9G   1% /dev/shm<BR>/dev/sda1     
            485M  116M  344M  26% 
    /boot<BR>/dev/mapper/vg_mei-lv_earthvar<BR>        
                  3.0G  748M  2.1G 
     27% /var<BR>/dev/mapper/vg_mei-lv_bacteriaroot<BR>      
                    5.0G  3.9G 
     880M  82% /<BR><BR>I tried to unmount the device, but as shown 
    below, it is busy.<BR><BR>[root@earth ~]# umount 
    /dev/mapper/vg_mei-lv_bacteriaroot<BR>umount: /: device is busy.<BR>  
          (In some cases useful info about processes that 
    use<BR>         the device is found by lsof(8) or 
    fuser(1))<BR><BR></BLOCKQUOTE>
  <DIV><BR></DIV>
  <DIV>I would have expected you could unmount it given that you're umounting by 
  the device name.  Having it mounted on or over root likely makes this a 
  bit finicky.</DIV>
  <DIV> </DIV>
  <BLOCKQUOTE 
  style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" 
  class=gmail_quote>I tried to force unmount the device, but that failed 
    also.<BR><BR>[root@earth ~]# umount -f 
    /dev/mapper/vg_mei-lv_bacteriaroot<BR>umount2: Device or resource 
    busy<BR>umount: /: device is busy.<BR>        (In some 
    cases useful info about processes that use<BR>        
     the device is found by lsof(8) or fuser(1))<BR>umount2: Device or 
    resource busy<BR><BR><BR>What other options are there.  Is there are 
    way to get this unmounted<BR>without having to shutdown my host system and 
    boot into rescue mode.  I<BR>don't really want to shutdown my active 
    VM's while other staff are working<BR>on them right now.<BR></BLOCKQUOTE>
  <DIV><BR></DIV>
  <DIV>Take the advice of the output you pasted ... check the output from lsof 
  and see if you can't narrow down the problem.</DIV>
  <DIV><BR></DIV>
  <DIV>After you accidentally mounted that LV on root did you change your 
  directory?  Something is hanging on to that device.</DIV>
  <DIV> </DIV>
  <BLOCKQUOTE 
  style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" 
  class=gmail_quote><BR>Please cc me directly as I only receive the daily 
    digest.  Thanks.<BR><BR>Jeff<BR>Meridian 
    Environmental<BR><BR><BR>_______________________________________________<BR>CentOS-virt 
    mailing list<BR><A 
    href="mailto:CentOS-virt@centos.org">CentOS-virt@centos.org</A><BR><A 
    href="http://lists.centos.org/mailman/listinfo/centos-virt" 
    target=_blank>http://lists.centos.org/mailman/listinfo/centos-virt</A><BR></BLOCKQUOTE></DIV><BR 
  clear=all>
  <DIV><BR></DIV>-- <BR>---~~.~~---<BR>Mike<BR>//  SilverTip257  // 
  </DIV>
  <DIV class=gmail_extra><FONT face=Arial></FONT> </DIV>
  <DIV class=gmail_extra><FONT face=Arial></FONT> </DIV>
  <DIV class=gmail_extra><FONT face=Arial>Thanks for the insight.  I had 
  tried the advice from the output to use lsof and fuser, that is what led me to 
  try the force unmount.  In the end I realized that the only way to 
  unmount a / partition is to be off of it entirely, meaning you must be booted 
  to a live rescue disk such as SystemRescue CD.  I ended up solving this 
  by checking to make sure that /etc/fstab did not have an entry for the 
  Bacteria LV, then shutting down the system and rebooting it late at night when 
  there was no one on the system and no scheduled system activity.  A 
  reboot brought everything back up normal, so I didn't even have to resort to 
  using a Live CD.  Sorry for all the noise.</FONT></DIV>
  <DIV class=gmail_extra><FONT face=Arial></FONT> </DIV>
  <DIV class=gmail_extra><FONT face=Arial>Jeff</FONT></DIV>
  <DIV class=gmail_extra><FONT face=Arial>Meridian Environmental</FONT></DIV>
  <DIV class=gmail_extra> </DIV></DIV></BLOCKQUOTE></BODY></HTML>