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

lsnapshot: snapshots of ldiskfs targets on md-kmec arrays

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • None
    • None
    • 3
    • 9223372036854775807

      lctl snapshot_* works only for ZFS targets. md-kmec (https://github.com/scopedog/mdraid-super, which pins md-kmec and its mdadm) is an md RAID personality (raidkm). Native snapshots are a new md-kmec feature: crash-safe, read-only snapshots of a whole array, managed with mdadm --snapshot from the mdadm pinned there (mdraid-super 895933c: md-kmec b64f85d, mdadm 5bf8fec6). An ldiskfs target that is a whole md-kmec array can use these for Lustre snapshots: mdadm --snapshot --create freezes the filesystem on the array while it takes the snapshot, so a snapshot taken under the write barrier is a clean image.

      Changes

      • ldev.conf accepts md:/dev/<array>. A snapshot piece is the native snapshot of the array; its read-only device comes from mdadm --snapshot --list, and the lustre:* ZFS properties are kept as array snapshot attributes.
      • New mount.lustre option fsname=<name>, allowed only with rdonly_dev, so a snapshot starts under its own fsname with nothing written into it.
      • ldev.conf also accepts lvm:/dev/<vg>/<lv> for an LVM thin LV; the md: backend uses the same code. lctl snapshot_create warns when the thin pool geometry does not fit the md row.
      • Needs rdonly_dev on ldiskfs (LU-15873).
      • sanity-lsnapshot runs on ldiskfs when every target is an md-kmec array or an LVM thin LV; new test_7 (destroy the middle of three snapshots). New conf-sanity test_176 for fsname=.

      Testing
      Single node, RHEL 9.7 (kernel 5.14.0-611.55.1), md-kmec from mdraid-super 895933c, raidkm 8+2 arrays, 128K chunk. conf-sanity 176 and sanity-lsnapshot 0, 1a, 1b, 2, 3a, 3b, 7 pass with combined and with separate MGS, both with native md-kmec snapshots (one array per target) and with LVM thin LVs in one pool on an md-kmec array. test_4 is excluded: it fails with a separate MGS on every backend, including ZFS, which CI never runs.
      With an earlier md-kmec build (same snapshot freeze path), snapshots survived an array stop and assemble and a hard reset (journal replay), and mounted with the data from create time.
      CI has no md-kmec arrays, so CI only checks that the ZFS path is unchanged.

            hnishida Hiroshi Nishida
            hnishida Hiroshi Nishida
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: