01.01.2017 23:38, Wols Lists пишет:
On 01/01/17 20:31, Paul Neuwirth wrote:
Spare drive was instantly been included into the array. wondering if hot spares are supported by btrfs' raid, quick web search gave no clear result.
As I understand btrfs, "hot spare" is a meaningless term. Given that btrfs understands the concept of a filesystem spanning multiple drives, if a drive fails underneath it any files which have been declared as "mirrored" and have a copy on the failed drive, will have suddenly become "single copy" so the file system needs to replicate them onto another drive.
Which is exact definition of "hot spare". Drive that is used to restore redundancy *automatically*, without involving manual actions. I do not see what magic in btrfs suddenly makes it "meaningless".
And I'm guessing losing a drive would immediately trigger some sort of filesystem scan and rebalance - be weird if it didn't.
You cannot even mount degraded btrfs without manual steps. As long as it is not mounted, there can be no re-balance. You need to mount degraded RAID1 btrfs with option "-o degraded" - and you can do it exactly once. If you failed to restore redundancy while doing it (i.e. - add drive to make it RAID1 again), you cannot mount this filesystem for writing anymore. You can still mount it with "-o degraded,ro", but then you can neither replace failed drive (btrfs replace start silently succeeds but does nothing) nor remove/add new device (because filesystem is mounted read-only). And no, there is no automatic scan and re-balance in btrfs. You could simply test instead of guessing. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org