On 2015-12-22 07:30, Holger Hoffstätte wrote:
On Tue, Dec 22, 2015 at 3:16 AM, Qu Wenruo <quwen...@cn.fujitsu.com> wrote:
Current "recovery" mount option will only try to use backup root.
However the word "recovery" is too generic and may be confusing for some
users.
Here introduce a new and more specific mount option, "backuproot" to
replace "recovery" mount option.
"Recovery" will be kept for compatibility reason, but will be
deprecated.
I agree that this makes much more sense from a user's perspective, so +1.
But why not go all the way: try backuproot automatically when the
initial mount fails,
log the fallback and simply deprecate/ignore the option?
Either this works - in which case there is no need to involve a human,
which may not
even exist - or it does not. If it does not, things are hosed anyway
and we can fail
properly.
I have seen cases where mounting -o ro,recovery didn't work, but restore
did, so there are cases where data is recoverable but this mount option
won't work.
Any reasons not to do this?
I'm not 100% certain, but I think that there is a chance if it doesn't
work that it will make things worse. That, and TBH, it really should be
the administrator's choice; personally, if I come across a filesystem on
one of my systems that needs this, then I'm nuking the filesystem and
restoring from backup, because I don't trust that the rest of the
filesystem isn't broken. It's also consistent with other filesystems
(at least ext4 requires an option to force using a backup superblock).
Perhaps we could add a module parameter that specifies whether or not to
automatically try this?
--
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