[LU-6990] write error: Invalid argument when trying to set nosquash_nids Created: 12/Aug/15 Updated: 16/Jan/16 Resolved: 26/Aug/15 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.5.4 |
| Fix Version/s: | Lustre 2.8.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Bruno Travouillon (Inactive) | Assignee: | Emoly Liu |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Lustre 2.5.3.90 |
||
| Issue Links: |
|
||||||||
| Severity: | 3 | ||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||
| Description |
|
Since our update from 2.5.3 to 2.5.3.90, we can't set the nosquash_nids parameter by writing into the procfile /proc/fs/lustre/mdt/scratch-MDT0000/nosquash_nids. This is the method used by the shine tool for setting all the parameters. [root@mds2 ~]# echo "192.168.101.13@tcp" > /proc/fs/lustre/mdt/scratch-MDT0000/nosquash_nids
-bash: echo: write error: Invalid argument
However, it works with 'lctl set_param' or 'echo -n'. [root@mds2 ~]# echo -n "192.168.101.13@tcp" > /proc/fs/lustre/mdt/scratch-MDT0000/nosquash_nids
[root@mds2 ~]# cat /proc/fs/lustre/mdt/scratch-MDT0000/nosquash_nids
192.168.101.13@tcp
[root@mds2 ~]# lctl set_param mdt.scratch-MDT0000.nosquash_nids=192.168.0.13@tcp
mdt.scratch-MDT0000.nosquash_nids=192.168.0.13@tcp
[root@mds2 ~]# cat /proc/fs/lustre/mdt/scratch-MDT0000/nosquash_nids
192.168.0.13@tcp
It is related to 2789 if (count > 0 && kernbuf[count - 1] == '\n') 2790 kernbuf[count - 1] = '\0'; I don't understand why we need to replace \n by \0 since the nid parser seems to handle the newline. Please let me know if you need further details. |
| Comments |
| Comment by Peter Jones [ 12/Aug/15 ] |
|
Emoly Could you please assist with this one? Thanks Peter |
| Comment by Emoly Liu [ 14/Aug/15 ] |
|
Bruno, I think I know why that patch added "kernbuf[count - 1] = '\0';". I will post a patch to fix it. |
| Comment by Gerrit Updater [ 14/Aug/15 ] |
|
Emoly Liu (emoly.liu@intel.com) uploaded a new patch: http://review.whamcloud.com/15985 |
| Comment by Gerrit Updater [ 20/Aug/15 ] |
|
Grégoire Pichon (gregoire.pichon@bull.net) uploaded a new patch: http://review.whamcloud.com/16034 |
| Comment by Gerrit Updater [ 26/Aug/15 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/15985/ |
| Comment by Joseph Gmitter (Inactive) [ 26/Aug/15 ] |
|
Landed for 2.8. |