I am trying to unmount/offline/delete all volumes that start with volume name "to_" and that has less than 3 snapshots. I use the following query to find them I use:
`hostname::> vol show -snapshot-count <3 -volume to_*
Vserver Volume Aggregate State Type Size Available Used%
svm-bu-file to_sv_vol_staff_foo_bar aggr_backup_1n_hostname online DP 204.8GB 204.8GB 0%
...etc...`
I find 110 entries that match, I want to use this to first unmount, then offline and lastly delete.
So I normaly take the search I did previously "vol show -snapshot-count <3 -volume to_*" and edit the line to make "vol unmount { -snapshot-count <3 -volume to_*}"
For other work I do this work but for unmounting/offline/delete this always gives me the following:
hostname::> vol unmount {-snapshot-count <3 -volume to_*}
Error: Volume name: The first character must be a letter or underscore.
I have looked at the article https://docs.netapp.com/us-en/ontap/system-admin/methods-specifying-queries-concept.html
Am I missing something in my thought process or can't I use wildcards in that extended query?