Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-6990

write error: Invalid argument when trying to set nosquash_nids

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.8.0
    • Lustre 2.5.4
    • None
    • Lustre 2.5.3.90
    • 3
    • 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 LU-1778. The bug is in lprocfs_wr_nosquash_nids(). See lustre/obdclass/lprocfs_status.c (b2_5 branch, commit d82b4f54):

      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.

      Attachments

        Issue Links

          Activity

            People

              emoly.liu Emoly Liu
              bruno.travouillon Bruno Travouillon (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: