Solved What does mounting pool read only mean? (Sloppy language, see responses).

Greetings all,

I cannot find any documentation regarding this feature for FreeBSD, so I do not understand what does the term mean.

Consider, e.g., a / being installed on a mirrored pool and the system determining, during a scrub, that one of the entities comprising the pool needing to be repaired. Will the system do it?

Thus, is the term absolute, or limited to only entities outside of zfs, e.g., users, third party software, etc?

Kindest regards,

M
 
I don't quite understand the question or the problem. Read only means just that. As for problems during a scrub: it'll depend on the nature of the problem if it gets repaired or not. Minor issues won't be an issue, serious ones... See also zpool(8):

Begins a scrub or resumes a paused scrub. The scrub examines all
data in the specified pools to verify that it checksums correctly.
For replicated (mirror or raidz) devices, ZFS automatically repairs
any damage discovered during the scrub. The zpool status command
reports the progress of the scrub and summarizes the results of the
scrub upon completion.
I also don't understand how you'd overlook this :-/
 
Hi ShellLuser,

I know what scrub does. However, damage repair implies writing. So, if the pool is read only, arguably writing is prohibited, no? Hence my question. Also, the recitation does not say anything about the state of the pool, e.g., read only. So, strictly speaking, you are making assumption.

Assuming that you are correct, will e.g., mtime be updated(?) - another wiring into read only pool.

Does the question make sense now?

Kindest regards,

M
 
Setting read only on a ZFS filesystem when mounted (you don’t mount a pool) means that no writes are propagated from the posix filesystem layer.

The pool is still mutable. You can still receive snapshots into a read only filesystem, or run scrubs, for example.

Importing a pool readonly disables all transaction (including pending ZIL completions) processing on the pool.
 
Hi Eric,

thank you for the reply. I had found the web-site but the brief description does not say much. For example, I would not discern from it what you have suggested.

I will have to look up POSIX layer to better understand what is happening.

I was hoping that by importing a pool containing / read only, I can prevent modifications.

Kindest regards,

M
 
I will have to look up POSIX layer to better understand what is happening.

Put another way; you can't modify the pool via the mounted filesystem (modification / access time; changing file contents or permissions; add/remove files) when a filesystem is mounted read-only. (zfs set readonly=on pool/filesystem). That doesn't mean the underlying pool can't be modified, so snapshots can still be created/destroyed/and even received, scrubs can be performed, clones created, etc.

I was hoping that by importing a pool containing / read only, I can prevent modifications.
Importing a pool readonly with zpool import -o readonly=on pool should prevent all modifications to the pool.
 
Hi Eric,

thank you very much; that really clarifies the question.

I was really sloppy with the language in the title.

Kindest regards,

M
 
Back
Top