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

mke2fs check_if_lustre_mounted() not working or needed

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      The check_if_lustre_mounted() function that is patched into mke2fs is not working properly, because it is checking /proc/fs/lustre/osd-ldiskfs/mntdev but this file has long ago moved to /sys/fs/lustre/osd-ldiskfs/mntdev.

      The checking for the Lustre mount device was necessary before the kernel open(O_EXCL) functionality was available to prevent mke2fs and e2fsck from running on a mounted block device. It seems that this patch is no longer needed and could be removed from e2fsprogs, one less patch that needs to be maintained.

      Before removing the patch completely, it would be good to manually test this is working against a (test) mounted ZFS filesystem device. I've tested with ldiskfs and can confirm that open(O_EXCL) fails for the BLOCK DEVICE (e.g. /dev/mapper/ost4_flakey), though it does not work if a plain file (e.g. /tmp/testfs-ost4) is mounted via loopback and the file is formatted by mke2fs, but that isn't unexpected and this patch wouldn't avoid it either way.

      Attachments

        Activity

          People

            wc-triage WC Triage
            adilger Andreas Dilger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: