Bug 703203
Summary: | System halt does not unmount mount points with nfs in the path name. | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Jeremy Mueller <jmueller> | ||||
Component: | initscripts | Assignee: | initscripts Maintenance Team <initscripts-maint-list> | ||||
Status: | CLOSED ERRATA | QA Contact: | qe-baseos-daemons | ||||
Severity: | low | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 5.6 | CC: | harald, jscotka, notting, pknirsch | ||||
Target Milestone: | rc | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: |
Due to a bug in the /etc/init.d/halt script, no mount point set up with the word "nfs" anywhere in its path could be unmounted at reboot or shutdown. This bug has been fixed and such mount points are now unmounted properly.
|
Story Points: | --- | ||||
Clone Of: | |||||||
: | 703210 (view as bug list) | Environment: | |||||
Last Closed: | 2011-07-21 08:34:07 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 703210 | ||||||
Attachments: |
|
Thanks, added to git master as commit a8295af. Note that this would require them not getting unmounted in netfs stop, unless I'm missing something? This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release. (In reply to comment #1) > Thanks, added to git master as commit a8295af. > > Note that this would require them not getting unmounted in netfs stop, unless > I'm missing something? It's not that the mount is an NFS mount, it's that the name of the path for the mount point contains the keyword "nfs". In our case, the mount point is an LVM with XFS on it. It's then exported to other servers. We could have easily called it something like "/shares/export" instead of "/shares/nfsfiles". Here's our relevant entry in /proc/mounts: /dev/mapper/vg0-lvolstoreb /shares/nfsfiles xfs rw,nobarrier,logbufs=8,sunit=128,swidth=256,noquota 0 0 Thanks for committing it. Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Due to a bug in the /etc/init.d/halt script, no mount point set up with the word "nfs" anywhere in its path could be unmounted at reboot or shutdown. This bug has been fixed and such mount points are now unmounted properly. An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-1081.html An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-1081.html |
Created attachment 497858 [details] Unified diff to fix the umount error in /etc/init.d/halt. Description of problem: If you have a mount point setup with the word "nfs" anywhere in the path, the mount will not be unmounted at reboot/halt time. This also affects the keywords loopfs, autofs, cifs, smbfs, ncpfs, sysfs. Version-Release number of selected component (if applicable): initscripts-8.45.33-1.el5 How reproducible: Always Steps to Reproduce: 1. Create a mount point called /shares and mount a device there. 2. Create another mount point called /shares/nfsfiles and mount a device there (in our case we use LVM volumes for both mount points). 3. sudo reboot Actual results: During the halt process you will receive "umount: /shares: device is busy" errors because /shares/nfsfiles was not unmounted. Expected results: The system unmounts /shares/nfsfiles then unmounts /shares. Additional info: This problem is caused by the awk statements in /etc/init.d/halt. Specifically: /(loopfs|autofs|nfs|cifs|smbfs|ncpfs|sysfs|^none|^\/dev\/ram|^\/dev\/root$)/ {next} That will match the keywords anywhere in a line in /proc/mounts, so will match NFS mounts (nfs in 3rd column) and nfs in paths (/shares/nfsfiles in 2nd column). The fix to this would be to change that awk statement to: $3 ~ /(loopfs|autofs|nfs|cifs|smbfs|ncpfs|sysfs)/ {next} /(^none|^\/dev\/ram|^\/dev\/root$)/ {next} I've attached a unified diff file with the fix.