If you're trying to get a list of drives connected to your Ubuntu, or any Linux system, for that matter, it's a pretty simple task.
From a command line, you simply type the following command and hit <Enter>:
lsblk
There are also many other options available to you if you want to display other information or alternately you may need to output drive information in a format to allow you to control it with automation.
For example, lsblk -f will output information about the filesystem.
Flags such as -J which outputs JSON formatted drive information can be handy to incorporate in scripting if you're using remote code execution and automation tools to automate processes for management of your servers.
As always with any Linux distro, should you need to delve into the really deep end to get more than just basic information, people often forget to refer to their friendly man pages when searching for answers.
If you're looking for answers for any specific command and you already know that command, such as looking for information about the lsblk command, you'd simply type:
man lsblk
Discussion