Network and Storage Protocols

Set volume or qtree to read-only in 7-mode or cDOT

loudymanschwab
9,867 Views

Does anyone know of a way to make a volume read-only in cDOT or 7-mode to both NFS and CIFS clients without modifying the export policy/rules or the share permissions?  Also, not looking to set as a snap-mirror destination.

Essentially, would like to flip a filesystem to read-only no matter what clients may be mounted/mapped.  This is in order to verify that the data is absolutely not changing at all before starting a very specific maintenance.

3 REPLIES 3

billshaffer
9,720 Views

I'm not aware of a way (can't speak for Cluster-Mode).  Do you need to keep read access available?  I know you said "without modifying the share/exports", but you CAN make that modification pretty painless if you need to...

Bill

loudymanschwab
9,720 Views

Bill - I do understand that it's relatively low-pain to modify a CIFS share and NFS export via command line to set all access to read-only.  My issue with this is restoring the filesystem to normal read-write operations.  In 7-mode, using exportfs -p does comment out the old rules, so it's fairly easy to look in the exports file for the previous config and re-export it (or just VI the exports file).  In cDOT, it's probably easiest to just the volume to use a pre-configured read-only export policy, then flip back to the original once done (so not a huge deal here).  For CIFS shares, its a bit trickier to see previous share permissions if they didn't happen to be the default.  My best thought here would be to log the permission set first, then re-configure when setting back to read-write.  Just don't want to write new scripts for all of this.

I'm working to create a procedure for an operations team with very low knowledge of NetApp specific commands and would like to avoid making another custom script.  Was just hoping that there was a way to flip a volume to read-only (while keeping data access intact) similar to how snapmirror does to keep this whole thing simple.

billshaffer
9,719 Views

Got it.  Just thought I'd throw it out there, since I don't know any other way to make it read only...

If you find something, post it here!

Bill

Public