Open mittkonto opened 3 years ago
Only need RAID1 for metadata on RAID5 if 2 disks fail you lose everything anyway but not really a bad thing having more metadata redundancy (it's RAID6 you use RAID1c3 so it can still function with 2 disks missing)
But yes it be nice if the btrfs scrub command was smarter on scrubbing on raid56 so it's not acing 2-4x read impact on each disk witch is very bad for hdds
Should script a batch run for scrub 1 at a time per disk (just have it wait until it has finished)
You get <device> is not btrfs
because the helper function that checks for a btrfs filesystem, is_btrfs
, uses stat
, which returns tmpfs
on block devices.
A fix for this would be to change the helper function in btrfsmaintenance-functions
so that it uses blkid
, which can handle block devices.
So is_btrfs
should look like this:
is_btrfs() {
local FS=$(blkid -o value -s TYPE "$1")
[ "$FS" = "btrfs" ] && return 0
return 1
}
I just replaced stat -f --format=%T "$1"
with blkid -o value -s TYPE "$1"
.
Then running a scrub with the block devices in BTRFS_SCRUB_MOUNTPOINTS
will scrub each disk separately in the order given.
Hi, trying out raid5 with the "new" raid1c3/4 profiles. It's slow by it's nature, but..
Noticed scrub crawls 12MiB/s when I usually get 40MiB/s, also I'd rather scrub one disc at the time. It seems to be a thing.
I added
"BTRFS_SCRUB_MOUNTPOINTS="/dev/sda1:/dev/sdb1:/dev/sdc1:/dev/sdd1"
in/etc/default/btrfsmaintenance
But it does not seem to catch on when I:
sudo systemctl start btrfs-scrub
: