It is possible to mount pvfs via the kernel interface read-only, but
I'm not sure if we have a way to do that via userspace apps, e.g.
pvfs2-ls, MPI. For a remote-mount metadata mirroring project we've
been doing, this would be handy.
I think the only feasible way to handle it is at the clients.
Servers don't keep any state about who has what mounted, and we
don't want to add some sort of "read-only export" capability to
servers. Maybe it could be argued that we should just run apps that
don't write.
It may be fairly easy to implement this by tracking the "ro" option
in pvfs2tab, and by returning -EROFS appropriately at PINT_encode.
Or, since msgpair is so commonly used, there's just two state
machine locations where we could do this check: sys-io.sm and
msgpairarray.sm.
Here's all the ops, for reference, sorted by me into which require
write perms:
write:
CREATE
REMOVE
IO (write)
SMALL_IO (write)
SETATTR
CRDIRENT
RMDIRENT
CHDIRENT
TRUNCATE
MKDIR
FLUSH
MGMT_SETPARAM
MGMT_NOOP
MGMT_REMOVE_OBJECT
MGMT_REMOVE_DIRENT
SETEATTR
DELEATTR
read:
IO (read)
SMALL_IO (read)
GETATTR
LOOKUP_PATH
READDIR
GETCONFIG
STATFS
MGMT_PERF_MON
MGMT_ITERATE_HANDLES
MGMT_DSPACE_INFO_LIST
MGMT_EVENT_MON
MGMT_GET_DIRDATA_HANDLE
PROTO_ERROR
GETEATTR
LISTEATTR
LISTATTR
fake ones:
INVALID
WRITE_COMPLETION
PERF_UPDATE
JOB_TIMER
Does anyone else think this would be useful? The point of this
feature would be to keep well-behaving users from accidentally
hurting themselves. Is there a way to muck with capabilities to
achieve this goal?
-- Pete
_______________________________________________
Pvfs2-developers mailing list
[email protected]
http://www.beowulf-underground.org/mailman/listinfo/pvfs2-developers