Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: btrfs redundancy report #791

Open
CHerSun opened this issue May 7, 2024 · 0 comments
Open

feature request: btrfs redundancy report #791

CHerSun opened this issue May 7, 2024 · 0 comments

Comments

@CHerSun
Copy link

CHerSun commented May 7, 2024

I'd really appreciate some way to cleanly get blocks redundancy state.

Example:

  • 4 drives in d=RAID1, m=RAID1c3
  • 1 drive went missing

lsblk - reports 3 drives now.
btrfs device scan - reports 3 devices with no other notices
btrfs device usage ... - reports all 4 drives with no marks really, only device size = 0
btrfs filesystem show ... - shows all 4 drives, but marks drive as missing.
btrfs filesystem usage -T ... - shows all devices without marking them in any way (with missing device value > 0).
btrfs filesystem df ... - may report or may not report *some devices are missing. Looks like that depends on which drive went missing, not sure.

Judging by that - btrfs knows it does miss a device, but it doesn't do the next step - to notify about redundancy problem in a clear way, so that end user could take a proper action, if needed (in my case btrfs device delete <devid> until I can replace). What I mean is that I'd really like to see something like btrfs filesystem status ... with statements like:

  • Online/Degraded
  • Physical devices: 3 out of 4
  • Data state: ### blocks in RAID1 have NO redundancy
  • Metadata state: redundancy is reduced

Or:

  • Online/healthy
  • Physical devices: 4 out of 4
  • Data state: healthy
  • Metadata state: healthy

Or (hypothetically):

  • Offline/Failed
  • Physical devices: 3 out of 4
  • Data state: ### blocks in RAID0 were lost
  • Metadata state: redundancy is reduced

Is that possible?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants