kdave / btrfs-progs

Development of userspace BTRFS tools
GNU General Public License v2.0
527 stars 239 forks source link

feature request: btrfs redundancy report #791

Open CHerSun opened 1 month ago

CHerSun commented 1 month ago

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

Example:

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:

Or:

Or (hypothetically):

Is that possible?