Created
December 5, 2023 10:47
-
-
Save xkr47/529b112beee5704419bcecff120c9504 to your computer and use it in GitHub Desktop.
Dump all kinds of info for btrfs mounts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
[ "$#" = 1 ] | |
r () { | |
echo -ne "\033[1m------ " | |
echo -n "$@" | |
echo -e "\033[m" | |
"$@" | |
} | |
r btrfs de st "$1" | |
r btrfs de us "$1" | |
r btrfs fi sh "$1" | |
r btrfs fi us "$1" | |
r btrfs fi df "$1" | |
devs=$(btrfs fi sh "$1" | perl -ne 'print $1 if(m!path (/dev/[^ ]+)!)') | |
for dev in $devs ; do | |
r btrfs inspect-internal dump-super "$dev" | |
done | |
r btrfs sc stat -d "$1" | |
r btrfs ba stat "$1" | |
r btrfs rep stat -1 "$1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment