[LU-7086] RHEL made /sbin a symlink to /usr/sbin/ Created: 01/Sep/15  Updated: 01/Jul/16  Resolved: 28/Oct/15

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.8.0

Type: Bug Priority: Minor
Reporter: Oleg Drokin Assignee: Emoly Liu
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Related
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

We have a code in test-framework.sh that tries to avoid double-mounting /sbin/mount.lustre when running from a built tree:

       local mount_lustre=$LUSTRE/utils/mount.lustre
        if [ -f $mount_lustre ]; then
                local sbin_mount=/sbin/mount.lustre
                if grep -qw "$sbin_mount" /proc/mounts; then
                        cmp -s $mount_lustre $sbin_mount || umount $sbin_mount
                fi

In rhel7 and other new distros with the /sbin -> /usr/sbin symlink that never matches, /proc/mounts output is like this:

192.168.10.1:/exports/centos7-nfsroot/home/green/git/lustre-release/lustre/utils/mount.lustre /usr/sbin/mount.lustre nfs4 rw,relatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.10.232,local_lock=none,addr=192.168.10.1 0 0

This is sounds mostly harmless, after all whats acouple of more bind mounts, right? Except for an unknown reason (I am still looking), rhel7 kernel is doubling size of mnt_cache slab on every such bind mount, so 7 iterations in the cache takes 120 megabytes, next iteration brings it to 240 and so on. It does add up quickly and some other slabs also grow (though not as drastically), so we quickly run out of memory (I tried and rhel6 kernel does not have this problem).



 Comments   
Comment by Peter Jones [ 01/Sep/15 ]

Emoly

Could you please look into this issue?

Thanks

Peter

Comment by Gerrit Updater [ 23/Sep/15 ]

Emoly Liu (emoly.liu@intel.com) uploaded a new patch: http://review.whamcloud.com/16606
Subject: LU-7086 tests: resolve /sbin symlink in test-framework.sh
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 55d693fbe3ce9633c992761d2887174716b64706

Comment by Gerrit Updater [ 28/Oct/15 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/16606/
Subject: LU-7086 tests: resolve /sbin symlink in test-framework.sh
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 8f9ab85d3c79f06c9db6b7b44368857a4714d455

Comment by Joseph Gmitter (Inactive) [ 28/Oct/15 ]

Landed for 2.8

Generated at Sat Feb 10 02:05:52 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.