Unable to get console path for volume
While getting my homelab up and running again, I ran into the below error while trying to map an NFS share as a datastore to my main ESXi host. I wanted to make a post about it here mostly for my own reference, but also in case someone else happens to find it while experiencing a similar problem.
Problem
Initially, I tried to add the datastore via the GUI and it presented this message:
Operation failed, diagnostics report: Unable to get console path for volume
Since that didn’t give me a lot to go on, I decided to try to add it manually using the following command, which gave me a similar, yet more insightful, message
esxcfg-nas -a -o 10.0.40.11 -s /mnt/HDD_Pool_01 NDS-NAS01-HDD-01 Error performing operation: Unable to add new NAS, volume with the label NDS-NAS01-HDD-01 already exists
Okay, so it’s saying the datastore is already mounted. Huh? It’s not showing up in the GUI. Next step is to check in the shell if the volume is sill connected using the following command:
esxcfg-nas -l
As I expected, the output showed nothing. So, where do we go from here?
Resolution
I realized that I had this volume mounted previously, so the error messages stating it already exists may be due to an improper removal. Since I have a session open, we can test this by running the datastore removal command:
esxcfg-nas -d NDS-NAS01-HDD-01 IORM: failed to disable IORM: Unable to get console path for volume, NDS-NAS01-HDD-01 NAS volume NDS-NAS01-HDD-01 deleted.
Interpreting the command, we can see that there was volume with the same name in the database, but it cannot get the console path. It then removes the entry completely.
Now we can run the command from above to add the volume again, which is successful!
esxcfg-nas -a -o 10.0.40.11 -s /mnt/HDD_Pool_01 NDS-NAS01-HDD-01 Connecting to NAS volume: NDS-NAS01-HDD-01 NDS-NAS01-HDD-01 created and connected.
Switching back over to the GUI, I can now see the datastore and browse to it without issue. The problem was resolved after a few short minutes of panic! The main takeaway from this experience is that you should never improperly remove objects from ESXi, remnants may still exist somewhere in the system.
That works for me, thanks!!