Re: RAID 1 | Newbie Question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



23.04.2020 00:13, Chris Murphy пишет:
> I haven't looked at the wiki in a bit so I'm not sure if it points out
> two common gotchas:
> 
> Mismatch between SCT ERC and SCSI driver (used by libata and maybe
> also usb) timeouts. Btrfs needs explicit read errors on bad sectors to
> do automatic fix ups, same as md.
> https://raid.wiki.kernel.org/index.php/Timeout_Mismatch
> 
> There's no automatic degraded state for Btrfs. And it is not a good
> idea to add the degraded mount option to fstab, as it can result in a
> kind of "split brain" corruption. In the case of member device
> failure, at startup time the mount will fail and you'll need to
> manually mount degraded and fix the problem resulting in the need to
> mount degraded. An alternative is maybe modifying the current btrfs
> udev rule, to timeout after a decently long period of time to ensure
> it's really a case of needing degraded mount, rather than merely a
> slow or transient effect that just needs a delay so that all member
> devices are available when mount is called. But I don't know if udev
> has a concept of waiting. For mdadm this is done in the initramfs.
> 


mdadm starts per-array systemd timer via udev rule when the first member
device is detected. When this timer triggers (it is expected to trigger
before normal systemd device wait timeout) timer starts service that
effectively calls "mdadm --run".

If btrfs exposed filesystem in sysfs immediately when the first member
device was detected and also checked "mountability" every time member
device is added, similar mechanism could be implemented. Or dedicated
service that makes decision ... the primary problem is that currently
there is no way to know how many devices are there or whether these
devices are enough to mount filesystem even though kernel does know this
information.



[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux