On 2016-07-06 20:57, Chris Murphy wrote: [...] > > Seems like we need more granularity by btrfs ioctl for device ready, > e.g. some way to indicate: > > 0 all devices ready > 1 devices not ready (don't even try to mount) > 2 minimum devices ready (degraded mount possible) > > > Btrfs multiple device single and raid0 only return code 0 or 1. Where > raid 1, 5, 6 could return code 2. The systemd default policy for code > 2 could be to wait some amount of time to see if state goes to 0. At > the timeout, try to mount anyway. If rootflags=degraded, it mounts. If > not, mount fails, and we get a dracut prompt. >
Pay attention that to return 2, you have to scan all the VGs to check if all the involved devices are available: i.e. a filesystem composed by 5 disks, may have a VG RAID5 with only 3 disks used for data, and a VG RAID1 for metadata for the other two disks.... Think to try to perform this for each disk appearing.... I fear that it is too expensive > That's better behavior than now. > >> Equivalent of this rule is required under systemd and desired in >> general to avoid polling. On systemd list I outlined possible >> alternative implementation as systemd service instead of really >> hackish udev rule. > > I'll go read it there. Thanks. > > -- gpg @keyserver.linux.it: Goffredo Baroncelli <kreijackATinwind.it> Key fingerprint BBF5 1610 0B64 DAC6 5F7D 17B2 0EDA 9B37 8B82 E0B5 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html