Skip to content

Preferred metadata design #19

@josefbacik

Description

@josefbacik

We need to agree on how this system will work before we start writing code again. The main goal is to provide users the ability to specify a disk (or set of disks) to dedicate for metadata. There's a few policy questions that need to be asked here. Please discuss with new comments, and as we come to a consensus I will update this main entry with the conclusion of our discussions.

Policy questions

  • ENOSPC
    • Do we fail when we run out of chunks on the metadata disks?
    • Do we allow the use of non-metadata disks once the metadata disk is full?
    • Do we allow the user to specify the behavior in this case?
  • Device Replace/Removal
    • Does the preferred flag follow the device that's being replaced?
    • What do you do if you remove the only preferred device in the case that we hard ENOSPC if there are no metadata disks with free space?
  • On the fly changing of existing metadata disks.
    • If you unset the flag on one disk, is the metadata moved?
    • If you unset the flag on the only metadata disk, what happens? (Similar to device removal?)

Userspace implementation

  • sysfs interface for viewing current status of all elements.
  • sysfs interface at least for setting any policy related settings.
  • A btrfs command for setting a preferred disk.
    • The ability to set this at mkfs time without the file system mounted.

Kernel implementation

  • The device settings need to be persistent (ie which device is preferred for the metadata).
  • The policy settings must also be persistent.
    • The question of how to store this is an open question. I have suggested using the btrfs property xattrs and storing them in the tree-root, so they wouldn't be visible to anything except btrfs. We need to decide on some sort of way to deal with system wide settings, and we'll use this feature to figure out what we think the canonical way forward is for that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions