LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Why was "lazy unmount" required in this situation? (https://www.linuxquestions.org/questions/linux-software-2/why-was-lazy-unmount-required-in-this-situation-421604/)

haertig 03-04-2006 12:32 PM

Why was "lazy unmount" required in this situation?
 
I'm not sure why I had to do a lazy unmount to unmount /opt in the scenerio below. Can anyone give me a clue why this might have been necessary? I've never had problems unmounting in single user mode before ... I'm just trying to increase my knowledge regarding what could have caused this.
Code:

# telinit 1
# umount /opt
  (device busy)
# ps -ef
  (only root daemon processes, and the shell I was working in)
# pwd
  (/root)
# lsof /opt
  (nothing)
# fuser -c /opt
  (nothing)
# netstat -an
  (nothing)
# umount -l /opt
  (WORKED!!!)


tvynr 03-04-2006 12:50 PM

Hmm... this is a wild stab, but was the device functioning? My laptop hard drive lost its mind recently and the only way I could unmount the thing was to use a lazy unmount. If /opt was a device mount, was the device in good, sane condition?

haertig 03-04-2006 01:07 PM

Quote:

Originally Posted by tvynr
but was the device functioning?

Perfectly, as far as I can tell. Here's the exact scenerio that led up to the issue (LVM gets into the mix, but I'm not sure that's relevent):
Code:

# lvrename /dev/vg0/debian_usr /dev/vg0/usr
# lvrename /dev/vg0/debian_var /dev/vg0/var
# lvrename /dev/vg0/debian_tmp /dev/vg0/tmp
# lvrename /dev/vg0/debian_home /dev/vg0/home
# lvrename /dev/vg0/debian_opt /dev/vg0/opt
# telinit 1
# umount /usr
# umount /var
# umount /tmp
# umount /home
# umount /opt  <<< ERROR!  device busy

I was unmounting the filesystems in preparation for renaming vg0 to vg_linux. That volume group renaming operation requires a vgchange -a n vg0 followed by vgrename /dev/vg0 /dev/vg_linux. But for some reason /opt didn't want to unmount. I don't think the lvrename had anything to do with the unmount failure, because all the other filesystems unmounted OK.

tvynr 03-04-2006 01:38 PM

I'm afraid I'm lost for ideas. Anyone else? :)


All times are GMT -5. The time now is 11:05 PM.