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

Possible for ID_FS_TYPE to be lustre / ldiskfs?

Details

    • Improvement
    • Resolution: Unresolved
    • Minor
    • None
    • None
    • None
    • 9223372036854775807

    Description

      consider a command like:

      mkfs.ext4 /dev/disk/by-id/ata-VBOX_HARDDISK_OST0PORT100000000000-part1

      This yields a UDEV event with:

      ID_FS_TYPE=ext4
      

       
      Creating a ldiskfs also sets

      ID_FS_TYPE=ext4
      

      Possible to set that to something other than ext4, I.E. lustre or ldiskfs?

      Attachments

        Issue Links

          Activity

            [LU-10599] Possible for ID_FS_TYPE to be lustre / ldiskfs?

            I agree with James in that the format of ldiskfs is as close as possible to ext4, so the ID_FS_TYPE cannot be used to distinguish them. Some options include using the ID_FS_LABEL to check for $fsname[:-]TGTxxxx, where TGT is MDT or OST or MGS/MGT.

            adilger Andreas Dilger added a comment - I agree with James in that the format of ldiskfs is as close as possible to ext4, so the ID_FS_TYPE cannot be used to distinguish them. Some options include using the ID_FS_LABEL to check for $fsname [:-] TGTxxxx , where TGT is MDT or OST or MGS/MGT .

            one day ext4 will be ldiskfs so we need to think of another way.

            simmonsja James A Simmons added a comment - one day ext4 will be ldiskfs so we need to think of another way.
            ofaaland Olaf Faaland added a comment -

            It would be useful for the purposes of LU-12530 if there was a property of an ldiskfs-formatted device that definitely distinguished it from an ext-formatted device.

            ofaaland Olaf Faaland added a comment - It would be useful for the purposes of LU-12530 if there was a property of an ldiskfs-formatted device that definitely distinguished it from an ext-formatted device.
            joe.grund Joe Grund added a comment -

            Sorry, let me update ticket to reflect my intent better

            joe.grund Joe Grund added a comment - Sorry, let me update ticket to reflect my intent better

            mkfs.lustre does emit udev events and they are almost the same. The FS_TYPE is listed as "ext4", since ldiskfs is based on ext4.

            ldiskfs

            [root@ieel-oss05 ~]# udevadm info --query=property --name /dev/sdb
            DEVLINKS=/dev/disk/by-id/scsi-36001405d57eec3c890142e593bc04a66 /dev/disk/by-id/wwn-0x6001405d57eec3c890142e593bc04a66 /dev/disk/by-label/scratch:OST0000 /dev/disk/by-path/ip-192.168.56.3:3260-iscsi-iqn.2005-06.net.utopiabound.ieel-storage:ieel-os2-lun-0 /dev/disk/by-uuid/89fa6c99-2c9d-471c-bf86-4893c54583c6
            DEVNAME=/dev/sdb
            DEVPATH=/devices/platform/host5/session3/target5:0:0/5:0:0:0/block/sdb
            DEVTYPE=disk
            ID_BUS=scsi
            ID_FS_LABEL=scratch:OST0000
            ID_FS_LABEL_ENC=scratch:OST0000
            ID_FS_TYPE=ext4
            ID_FS_USAGE=filesystem
            ID_FS_UUID=89fa6c99-2c9d-471c-bf86-4893c54583c6
            ID_FS_UUID_ENC=89fa6c99-2c9d-471c-bf86-4893c54583c6
            ID_FS_VERSION=1.0
            ID_MODEL=ost5
            ID_MODEL_ENC=ost5\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
            ID_PATH=ip-192.168.56.3:3260-iscsi-iqn.2005-06.net.utopiabound.ieel-storage:ieel-os2-lun-0
            ID_PATH_TAG=ip-192_168_56_3_3260-iscsi-iqn_2005-06_net_utopiabound_ieel-storage_ieel-os2-lun-0
            ID_REVISION=4.0
            ID_SCSI=1
            ID_SCSI_SERIAL=d57eec3c-8901-42e5-93bc-04a660762a87
            ID_SERIAL=36001405d57eec3c890142e593bc04a66
            ID_SERIAL_SHORT=6001405d57eec3c890142e593bc04a66
            ID_TARGET_PORT=0
            ID_TYPE=disk
            ID_VENDOR=LIO-ORG
            ID_VENDOR_ENC=LIO-ORG\x20
            ID_WWN=0x6001405d57eec3c8
            ID_WWN_VENDOR_EXTENSION=0x90142e593bc04a66
            ID_WWN_WITH_EXTENSION=0x6001405d57eec3c890142e593bc04a66
            IML_IS_RO=0
            IML_SCSI_80=SLIO-ORG ost5            d57eec3c-8901-42e5-93bc-04a660762a87
            IML_SCSI_83=36001405d57eec3c890142e593bc04a66
            IML_SIZE=16777216
            MAJOR=8
            MINOR=16
            MPATH_SBIN_PATH=/sbin
            SUBSYSTEM=block
            TAGS=:systemd:
            USEC_INITIALIZED=285444
            

            ext4

            [root@ieel-oss05 ~]# udevadm info --query=property --name /dev/sdc
            DEVLINKS=/dev/disk/by-id/scsi-360014050c340c8c56654461bf31ca064 /dev/disk/by-id/wwn-0x60014050c340c8c56654461bf31ca064 /dev/disk/by-path/ip-192.168.56.3:3260-iscsi-iqn.2005-06.net.utopiabound.ieel-storage:ieel-os2-lun-1 /dev/disk/by-uuid/45719ab5-bff2-4aa5-9e41-5239c0d56bcf
            DEVNAME=/dev/sdc
            DEVPATH=/devices/platform/host5/session3/target5:0:0/5:0:0:1/block/sdc
            DEVTYPE=disk
            ID_BUS=scsi
            ID_FS_TYPE=ext4
            ID_FS_USAGE=filesystem
            ID_FS_UUID=45719ab5-bff2-4aa5-9e41-5239c0d56bcf
            ID_FS_UUID_ENC=45719ab5-bff2-4aa5-9e41-5239c0d56bcf
            ID_FS_VERSION=1.0
            ID_MODEL=ost6
            ID_MODEL_ENC=ost6\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
            ID_PATH=ip-192.168.56.3:3260-iscsi-iqn.2005-06.net.utopiabound.ieel-storage:ieel-os2-lun-1
            ID_PATH_TAG=ip-192_168_56_3_3260-iscsi-iqn_2005-06_net_utopiabound_ieel-storage_ieel-os2-lun-1
            ID_REVISION=4.0
            ID_SCSI=1
            ID_SCSI_SERIAL=0c340c8c-5665-4461-bf31-ca064dc55200
            ID_SERIAL=360014050c340c8c56654461bf31ca064
            ID_SERIAL_SHORT=60014050c340c8c56654461bf31ca064
            ID_TARGET_PORT=0
            ID_TYPE=disk
            ID_VENDOR=LIO-ORG
            ID_VENDOR_ENC=LIO-ORG\x20
            ID_WWN=0x60014050c340c8c5
            ID_WWN_VENDOR_EXTENSION=0x6654461bf31ca064
            ID_WWN_WITH_EXTENSION=0x60014050c340c8c56654461bf31ca064
            IML_IS_RO=0
            IML_SCSI_80=SLIO-ORG ost6            0c340c8c-5665-4461-bf31-ca064dc55200
            IML_SCSI_83=360014050c340c8c56654461bf31ca064
            IML_SIZE=16777216
            MAJOR=8
            MINOR=32
            MPATH_SBIN_PATH=/sbin
            SUBSYSTEM=block
            TAGS=:systemd:
            
            utopiabound Nathaniel Clark added a comment - mkfs.lustre does emit udev events and they are almost the same. The FS_TYPE is listed as "ext4", since ldiskfs is based on ext4. ldiskfs [root@ieel-oss05 ~]# udevadm info --query=property --name /dev/sdb DEVLINKS=/dev/disk/by-id/scsi-36001405d57eec3c890142e593bc04a66 /dev/disk/by-id/wwn-0x6001405d57eec3c890142e593bc04a66 /dev/disk/by-label/scratch:OST0000 /dev/disk/by-path/ip-192.168.56.3:3260-iscsi-iqn.2005-06.net.utopiabound.ieel-storage:ieel-os2-lun-0 /dev/disk/by-uuid/89fa6c99-2c9d-471c-bf86-4893c54583c6 DEVNAME=/dev/sdb DEVPATH=/devices/platform/host5/session3/target5:0:0/5:0:0:0/block/sdb DEVTYPE=disk ID_BUS=scsi ID_FS_LABEL=scratch:OST0000 ID_FS_LABEL_ENC=scratch:OST0000 ID_FS_TYPE=ext4 ID_FS_USAGE=filesystem ID_FS_UUID=89fa6c99-2c9d-471c-bf86-4893c54583c6 ID_FS_UUID_ENC=89fa6c99-2c9d-471c-bf86-4893c54583c6 ID_FS_VERSION=1.0 ID_MODEL=ost5 ID_MODEL_ENC=ost5\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20 ID_PATH=ip-192.168.56.3:3260-iscsi-iqn.2005-06.net.utopiabound.ieel-storage:ieel-os2-lun-0 ID_PATH_TAG=ip-192_168_56_3_3260-iscsi-iqn_2005-06_net_utopiabound_ieel-storage_ieel-os2-lun-0 ID_REVISION=4.0 ID_SCSI=1 ID_SCSI_SERIAL=d57eec3c-8901-42e5-93bc-04a660762a87 ID_SERIAL=36001405d57eec3c890142e593bc04a66 ID_SERIAL_SHORT=6001405d57eec3c890142e593bc04a66 ID_TARGET_PORT=0 ID_TYPE=disk ID_VENDOR=LIO-ORG ID_VENDOR_ENC=LIO-ORG\x20 ID_WWN=0x6001405d57eec3c8 ID_WWN_VENDOR_EXTENSION=0x90142e593bc04a66 ID_WWN_WITH_EXTENSION=0x6001405d57eec3c890142e593bc04a66 IML_IS_RO=0 IML_SCSI_80=SLIO-ORG ost5 d57eec3c-8901-42e5-93bc-04a660762a87 IML_SCSI_83=36001405d57eec3c890142e593bc04a66 IML_SIZE=16777216 MAJOR=8 MINOR=16 MPATH_SBIN_PATH=/sbin SUBSYSTEM=block TAGS=:systemd: USEC_INITIALIZED=285444 ext4 [root@ieel-oss05 ~]# udevadm info --query=property --name /dev/sdc DEVLINKS=/dev/disk/by-id/scsi-360014050c340c8c56654461bf31ca064 /dev/disk/by-id/wwn-0x60014050c340c8c56654461bf31ca064 /dev/disk/by-path/ip-192.168.56.3:3260-iscsi-iqn.2005-06.net.utopiabound.ieel-storage:ieel-os2-lun-1 /dev/disk/by-uuid/45719ab5-bff2-4aa5-9e41-5239c0d56bcf DEVNAME=/dev/sdc DEVPATH=/devices/platform/host5/session3/target5:0:0/5:0:0:1/block/sdc DEVTYPE=disk ID_BUS=scsi ID_FS_TYPE=ext4 ID_FS_USAGE=filesystem ID_FS_UUID=45719ab5-bff2-4aa5-9e41-5239c0d56bcf ID_FS_UUID_ENC=45719ab5-bff2-4aa5-9e41-5239c0d56bcf ID_FS_VERSION=1.0 ID_MODEL=ost6 ID_MODEL_ENC=ost6\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20 ID_PATH=ip-192.168.56.3:3260-iscsi-iqn.2005-06.net.utopiabound.ieel-storage:ieel-os2-lun-1 ID_PATH_TAG=ip-192_168_56_3_3260-iscsi-iqn_2005-06_net_utopiabound_ieel-storage_ieel-os2-lun-1 ID_REVISION=4.0 ID_SCSI=1 ID_SCSI_SERIAL=0c340c8c-5665-4461-bf31-ca064dc55200 ID_SERIAL=360014050c340c8c56654461bf31ca064 ID_SERIAL_SHORT=60014050c340c8c56654461bf31ca064 ID_TARGET_PORT=0 ID_TYPE=disk ID_VENDOR=LIO-ORG ID_VENDOR_ENC=LIO-ORG\x20 ID_WWN=0x60014050c340c8c5 ID_WWN_VENDOR_EXTENSION=0x6654461bf31ca064 ID_WWN_WITH_EXTENSION=0x60014050c340c8c56654461bf31ca064 IML_IS_RO=0 IML_SCSI_80=SLIO-ORG ost6 0c340c8c-5665-4461-bf31-ca064dc55200 IML_SCSI_83=360014050c340c8c56654461bf31ca064 IML_SIZE=16777216 MAJOR=8 MINOR=32 MPATH_SBIN_PATH=/sbin SUBSYSTEM=block TAGS=:systemd:
            pjones Peter Jones added a comment -

            Nathaniel

            Is this something that you could help with?

            Peter

            pjones Peter Jones added a comment - Nathaniel Is this something that you could help with? Peter

            People

              utopiabound Nathaniel Clark
              joe.grund Joe Grund
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated: