Network Storage Protocols Discussions

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

loudymanschwab

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

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

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.

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

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public