(1/2) Invalid value for '--i-data':
'q2-import/$storage_dir/test.qza' is not a valid filepath
(2/2) Invalid value for '--o-visualization': Directory
'q2-import/$storage_dir' does not exist, cannot save
'test.qzv' into it.
If I run the same command having the data (test.qza) in the $cwd, everything works just fine.
This is what I would recommend as your course of action - work through each grouping of files that you have by changing your $CWD and handling them one location at a time. You could move all of your files to a single location as a secondary option, but I assume you've separated them onto different partitions/storage locations due to the large number of files you have (as you mention above).
Thanks for providing that clarification! Just as a heads up, I didn't have time to get to this before the long weekend, but will follow up with you on Tuesday after the holiday. Thanks for your patience!
Thanks for your patience here! Happy to address your follow up below:
There is nothing within the QIIME 2 Framework that would prevent this - but if you are running into a permissions issue while having your file and script in different locations (i.e. errors along the line of: not a valid filepath, file not found, not allowed, etc), this is most likely something you'll need to reach out to your sysadmin about (if you are not the admin for the cluster of servers you are working with).
Best of luck here, hopefully this helps point you in the right direction!