Something is setting my data sets to read only

Something is changing the pools I back up to, to read-only…and the backups fail.

I had to unset the read only flag in multiple datasets a week or so ago…only to discover today that they had been reset; everything in that pool became read-only for no apparent reason. It’s extremely aggravating and the knowledge that my system might just up and decide to stop making backups is nerve wracking.

Any idea what could be causing this? Any idea what I can do to try to troubleshoot it?

Are you using ZFS replication?

Yes for many things I am. For one dataset (the largest), however, I do brute-force copies (very large files, I md5sum to see if they changed). That’s what’s failing because ALL of the data sets in the pool become read only suddenly.

Is that dataset also part of a (recursive?) replication? Because a replication target must be read-only and the software sets it that way.

OK, that explains it.

The replication takes the entire source pool, and sends it to the destination pool, except for that one data set, which I do with the “brute force” backup script. But the destination directory for the brute force backup is in the same place on the destination as on the source. So it gets turned read only as well, even though it’s not being replicated. (Would it make sense to try to prevent this? Only read-only the things actually replicated rather than just do it from the top down even for exceptions?)

Regardless of whether that’s a bug or not, the fix for me today is probably to have two datasets: the big file one, and “everything else” and replicate to “everything else.” That way the big file one should not be affected by the read-only setting.