To obtain the necessary information, we can use the lsblk utility, which is built into most Linux distributions by default.

The standard input of the lsblk command will provide us with basic information about the drives on the dedicated server.
But its standard output won't allow us to retrieve the serial numbers of the disks. To do this, we need to add arguments that will enable us to see the serial numbers for each of the drives. Let's use the following ready-made command:

lsblk -o name,type,size,serial

This is exactly what we need. It displays the serial number for each physical drive. By the way, when it comes to physical drives, there's no need to try to obtain a serial number on virtual servers (VDS). We won't get it due to the virtual nature of the disks, not their physical presence.