From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041111 Firefox/1.0 Description of problem: If you create any filesystems that are mounted below a directory other than the root directory, Fedora will barf on shutdown. For example, if I create and mount filesystems "/hello" and "/hello/world", shutdown gives a message like this: ------------------------------------ umount2: Device or resource busy umount: /hello: device is busy umount2: Device or resource busy umount: /hello: device is busy ------------------------------------ Version-Release number of selected component (if applicable): initscripts-7.93.5-1 How reproducible: Always Steps to Reproduce: 1. mount a filesystem as "/hello". 2. mount a filesystem as "/hello/world". 3. run, "shutdown -h now". 4. watch the console. Actual Results: ------------------------------------ umount2: Device or resource busy umount: /hello: device is busy umount2: Device or resource busy umount: /hello: device is busy ------------------------------------ There is then a delay until the machine forcibly reboots. As such, this bug is causing an unnecessary performance problem. Expected Results: I would expect no output and no errors from the umount commands. Additional info: The problem appears to lie in "/etc/init.d/halt" line 201: ------------------------------------ # Try all file systems other than root and RAM disks, one last time. mount | awk '!/( \/ |^\/dev\/root|^\/dev\/ram| \/proc )/ { print $3 }' | \ while read line; do umount -f $line done ------------------------------------ This code is incorrect since it does not reverse the order of the mounts as returned by the "mount" command. As such, if I have these two filesystems mounted: /hello /hello/world The code will fail to unmount "/hello" (since "/hello/world" is still mounted), but will succeed in unmounting "/hello/world". The fix is to reverse sort the output: ------------------------------------ # Try all file systems other than root and RAM disks, one last time. mount | awk '!/( \/ |^\/dev\/root|^\/dev\/ram| \/proc )/ { print $3 }' | sort -r \ while read line; do umount -f $line done ------------------------------------
Added in 8.08-1.