List storage volumes but not their snapshots

Hello, sorry if this has been answered before, is there anyway to list all storage volumes in a pool but exclude all snapshots?

I know I can do lxc storage volume list <pool-name> to list all volumes in a pool but the command also prints out all snapshots. I take snapshots of a few custom volumes every 5 minutes so the command takes quite a few seconds to complete and the output is very long.

I was wondering if there’s perhaps an option/parameter that can be passed to the aforementioned command to filter out all snapshots from the output. Any help is appreciated, thanks.

Hmm, no, we don’t have support for any kind of server side filtering on that endpoint.
The client only makes a single API call so if we wanted to make that work, we’d need to implement API level filtering (as we have for instances) which would then allow the server to return just what you want and not have to query the rest.

Thanks for your reply Stephane. I’m currently using lxc storage show my-pool instead to have a look at all my custom volumes but it would be nice to be able to do something like lxc storage volume list my-pool -t custom not a deal breaker but it would be nice have, hopefully it can be implemented in future releases.

2 Likes

Awesome!!!