Details

    • Bug
    • Resolution: Fixed
    • Critical
    • Lustre 2.10.1, Lustre 2.11.0
    • Lustre 2.10.1, Lustre 2.11.0
    • None
    • 3
    • 9223372036854775807

    Description

      https://review.whamcloud.com/#/c/24325/ removed name length and content checking for the fsname.

      You can now format a FS with up to 16 characters, but can only reference 8 of them in various places, 16 in others.

      Attachments

        Issue Links

          Activity

            [LU-9767] FS name checking got removed

            John L. Hammond (john.hammond@intel.com) merged in patch https://review.whamcloud.com/28996/
            Subject: LU-9767 utils: validate filesystem name for mkfs.lustre
            Project: fs/lustre-release
            Branch: b2_10
            Current Patch Set:
            Commit: ba56efcfdd53f3066d95bb2274f6f9cca9e34c0b

            gerrit Gerrit Updater added a comment - John L. Hammond (john.hammond@intel.com) merged in patch https://review.whamcloud.com/28996/ Subject: LU-9767 utils: validate filesystem name for mkfs.lustre Project: fs/lustre-release Branch: b2_10 Current Patch Set: Commit: ba56efcfdd53f3066d95bb2274f6f9cca9e34c0b

            James Simmons (uja.ornl@yahoo.com) uploaded a new patch: https://review.whamcloud.com/28996
            Subject: LU-9767 utils: validate filesystem name for mkfs.lustre
            Project: fs/lustre-release
            Branch: b2_10
            Current Patch Set: 1
            Commit: 51deb7c46a0509732a9274bfc87a0d762f40114b

            gerrit Gerrit Updater added a comment - James Simmons (uja.ornl@yahoo.com) uploaded a new patch: https://review.whamcloud.com/28996 Subject: LU-9767 utils: validate filesystem name for mkfs.lustre Project: fs/lustre-release Branch: b2_10 Current Patch Set: 1 Commit: 51deb7c46a0509732a9274bfc87a0d762f40114b
            pjones Peter Jones added a comment -

            Landed for 2.11

            pjones Peter Jones added a comment - Landed for 2.11

            Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/28070/
            Subject: LU-9767 utils: validate filesystem name for mkfs.lustre
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 28216a73f4c0b19ef45e3ec2d6949801f6b9f828

            gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/28070/ Subject: LU-9767 utils: validate filesystem name for mkfs.lustre Project: fs/lustre-release Branch: master Current Patch Set: Commit: 28216a73f4c0b19ef45e3ec2d6949801f6b9f828

            James Simmons (uja.ornl@yahoo.com) uploaded a new patch: https://review.whamcloud.com/28070
            Subject: LU-9767 utils: validate filesystem name for mkfs.lustre
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 654f635ed795d6eed28a37585dbfaec7f42b6342

            gerrit Gerrit Updater added a comment - James Simmons (uja.ornl@yahoo.com) uploaded a new patch: https://review.whamcloud.com/28070 Subject: LU-9767 utils: validate filesystem name for mkfs.lustre Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 654f635ed795d6eed28a37585dbfaec7f42b6342

            For mkfs.lustre, the problem is that there is no way for the kernel to verify the fsname because the kernel isn't even involved until the filesystem is mounted.

            My recommendation would be make a quick patch to add checks into mount_utils_ldiskfs.c and mount_utils_zfs.c that the fsname is <= 8 characters, and do not include a '.' or other illegal character, and then separately we can examine whether it is safe to have a longer fsname where that works (e.g. ZFS where it isn't limited by the size of s_volume_name in the superblock) and make a patch to allow ZFS to have a longer fsname. This will need a code review of where fsname is used on disk and over the network, to verify there aren't explicit or implicit limitations based on the length.

            adilger Andreas Dilger added a comment - For mkfs.lustre, the problem is that there is no way for the kernel to verify the fsname because the kernel isn't even involved until the filesystem is mounted. My recommendation would be make a quick patch to add checks into mount_utils_ldiskfs.c and mount_utils_zfs.c that the fsname is <= 8 characters, and do not include a '.' or other illegal character, and then separately we can examine whether it is safe to have a longer fsname where that works (e.g. ZFS where it isn't limited by the size of s_volume_name in the superblock) and make a patch to allow ZFS to have a longer fsname. This will need a code review of where fsname is used on disk and over the network, to verify there aren't explicit or implicit limitations based on the length.
            bevans Ben Evans (Inactive) added a comment - - edited

            Well, you get some weird looking bugs from it:

            tunefs.lustre:
            Permanent disk data:
            Target: asdfasdf-MDT0000
            Index: 0
            Lustre FS: asdfasdfasdfasd
            Mount type: ldiskfs
            Flags: 0x5
            (MDT MGS )
            Persistent mount opts: user_xattr,errors=remount-ro
            Parameters:

            so the fsname got accepted, but is truncated, except where it's not. I haven't fully sorted out what tools would refer to it by its full name, rather than the truncated one. mkfs.lustre happily accepts it, throwing no errors (up to 16 chars). I'd be curious what happens if you give it a raft of control characters. Regardless, this is a UI error, as the user should be informed of the problem in some manner.

            bevans Ben Evans (Inactive) added a comment - - edited Well, you get some weird looking bugs from it: tunefs.lustre: Permanent disk data: Target: asdfasdf-MDT0000 Index: 0 Lustre FS: asdfasdfasdfasd Mount type: ldiskfs Flags: 0x5 (MDT MGS ) Persistent mount opts: user_xattr,errors=remount-ro Parameters: so the fsname got accepted, but is truncated, except where it's not. I haven't fully sorted out what tools would refer to it by its full name, rather than the truncated one. mkfs.lustre happily accepts it, throwing no errors (up to 16 chars). I'd be curious what happens if you give it a raft of control characters. Regardless, this is a UI error, as the user should be informed of the problem in some manner.

            John Hammond asked for this. User land can scribble what ever it wants but kernel space should be rejecting the invalid file system name. The same goes for pool names. Is this not the case?

            simmonsja James A Simmons added a comment - John Hammond asked for this. User land can scribble what ever it wants but kernel space should be rejecting the invalid file system name. The same goes for pool names. Is this not the case?

            People

              simmonsja James A Simmons
              bevans Ben Evans (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: