[LU-1833] Don't update mtab if it is symlink Created: 05/Sep/12 Updated: 16/Nov/16 Resolved: 07/Oct/12 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.3.0, Lustre 2.4.0 |
| Fix Version/s: | Lustre 2.4.0, Lustre 2.1.4 |
| Type: | Improvement | Priority: | Minor |
| Reporter: | Peng Tao | Assignee: | Keith Mannthey (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | patch | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Rank (Obsolete): | 4403 | ||||||||
| Description |
|
some distros (like Fedora 16) link /etc/mtab to /proc/mounts. In such distros, mount.lustre cannot update mtab otherwise we false alarm user with errors. |
| Comments |
| Comment by Peng Tao [ 05/Sep/12 ] |
|
patch submitted: |
| Comment by Peter Jones [ 07/Oct/12 ] |
|
Landed for 2.4 |
| Comment by Shuichi Ihara (Inactive) [ 10/Dec/12 ] |
|
Although this was already closed, we needed this backport patches to b2_1 and b1_8 for diskless lustre environment. http://review.whamcloud.com/#change,4786 (b1_8) |
| Comment by Carlos Thomaz [ 25/Mar/13 ] |
|
Hi. Thanks |
| Comment by Peter Jones [ 25/Mar/13 ] |
|
Carlos This fix was included in the 2.1.4 release. Ihara has already ported the fix to b1_8 and that patch can be applied anywhere that needs it. Peter |
| Comment by Alexey Shvetsov [ 07/May/13 ] |
|
This bug still here on 2.4 ls -l /etc/mtab |
| Comment by Keith Mannthey (Inactive) [ 07/May/13 ] |
|
What distro are you using? |
| Comment by Alexey Shvetsov [ 07/May/13 ] |
|
Gentoo. Client code was build from master + some patches to make 3.8 kernel work |
| Comment by Tyson Whitehead [ 16/Nov/16 ] |
|
Would add that this patch doesn't work on recent fedora as systemd creates /etc/mtab as a symlink to ../proc/self/mounts which doesn't match the check for it starting with /proc/. $ readlink /etc/mtab A simple hack would be to switch to strstr to see if the symlink contains /proc/ anywhere in it or, to be 100% correct, use realpath to fully get the canonical absolute path. $ realpath /etc/mtab Cheers! -Tyson |
| Comment by Tyson Whitehead [ 16/Nov/16 ] |
|
Patch to switch to from readpath to realpath. Can confirm it works with my indirect symlink. Haven't tested a non-symlink setup. |