In order to get an information from the machine regarding the physical storage size from a machine, this article will discuss it in the content. The information is available in the machine by retrieving it through several means. The common means is using a suitable command executed in the command line interface. In the end, by executing the command , performing the command in the command line interface itself will generate the suitable output. The following is an example of generating the suitable information using the tool or the command available in the operating system.
There is a specific command to generate or to print the output containing information about physical storage size. That command is the ‘lsblk’ command. From the manual page available in the operating system, it is a command to list block devices. What is the block devices actually ?. According to this link, a block driver provides access to devices that transfer randomly accessible data in fixed-size blocks—disk drives, primarily. The command is useful to list the available block device in the operating system such as disk drives. Executing the command will list all of it. The following is the execution of the ‘lsblk’ command :
[root@hostname ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT vda 253:0 0 200G 0 disk ├─vda1 253:1 0 16G 0 part / ├─vda2 253:2 0 4G 0 part [SWAP] └─vda3 253:3 0 180G 0 part /home [root@hostname ~]#
According to the output above, the size of the physical storage is ‘200G’. Is is referring to the physical disk storage with the name of ‘vda’. Actually, ‘vda’ itself is referring to the a paravirtualizated disk driver. But in terms of disk or storage, it is actually referring to a disk as a whole. The output of the command execution above can be different from one another. It depends on the availability of the block devices in the machine, it will also displays a different list of block devices. There are also several different arguments or parameter to display different information about the block devices.