#Find only the volumes being used as NFS

1 messages · Page 1 of 1 (latest)

left violet
#

Hello,

I'd like to use the CLI to get all the volumes in a FAS8200 that are being used as NFS. As a bonus, I'd like to know if it's possible to use the "-fields" option in order to filter a result. For example, imagine I do "volume show -fields junction-active", I will get a list of all the volumes and wether or not their juction-active is true. Is there some way to have the command only return the ones that are true, instead of all of them? Something like "volume show -fields "junction-active=true""

Thank you!

hearty egret
#

volume show -junction-active true 🙃

left violet
#

Hmm, I understand I was going about it the wrong way on the "bonus question". The correct way to do it is to specify in the command that the junction-active is true and THEN filter with fields. So, this works:

volume show -vserver svm1 -junction-active true -fields junction-active

left violet
hearty egret
#

No, junction-active only means that volume is mounted to a junction-path. For NAS access the volume needs to be mounted. But that does not automatically mean that you can access that volume via NFS.

left violet
#

I see

#

Is there a way to find which volumes are being used via NFS or am I going about this the wrong way?

hearty egret
#

NFS is enabled in the vserver (aka SVM). vserver nfs show shows you all vserver which have NFS enabled. So now only filter for the volumes of these vservers and only show the ones which are mounted:
vol show -vserver [vserver1],[vserver2] -junction-active true

#

This is the list of volumes which you could possibly access via NFS but only if the export-policy allows it.

#

So list the export-policy currently assigned to each volume: vol show -vserver [vserver1],[vserver2] -junction-active true -fields policy
And then list the rules inside the export-policy: export-policy rule show -vserver [vserver1] -policyname [policyA]

#

You can use export-policy check-access to actually check if a certain client can access a volume via NFS according to the export-policy rules.

left violet
#

Thank you @hearty egret - this is what I needed. Great explanation too.

barren barn
#

What about
Vol show -junction-active true -junction-path !-
??

Show any volume that has an active path and the path is not null

hearty egret
#

Isn't junction-active=true once there is a junction-path for the volume?

barren barn
#

No idea. Never had to use it

#

I would think that would not be needed in my query. I’ve used the query above before without the junction-active. I guess it’s just “more thorough”

fading topaz
#

Why not just do this?
pstejska@pstejska-pc:~$ vsim

Last login time: 8/20/2024 12:41:50
Unsuccessful login attempts since last login: 1
pstejska_vsim::> set d

Warning: These diagnostic commands are for use by NetApp personnel only.
Do you want to continue? {y|n}: y

pstejska_vsim::*> statistics start -object volume -counter nfs_total_ops
Statistics collection is being started for sample-id: sample_205

pstejska_vsim::*> statistics show -tab

svm2: volume: 8/21/2024 08:04:20
nfs
instance total
name ops


fg1__0001 0
fg1__0002 0
lun1 0
svm2_root 0
svm3_root 0
vol0 0
6 entries were displayed.

pstejska_vsim::*>

barren barn
#

What if the volume isn’t mounted currently in name space used while you collect stats?

fading topaz
#

Wouldn't be able to get NFS only but you could use workload_queue_nblade total ops