know my storage devices, (df -h)

i need to know the available space that i have on my linux machine, so i used df -h command
and it gave me the following:
/dev/sdb2             21G      5.8G       15G    .....       /
udev                     2.0G     152K       2.0G   ......     /dev
/dev/sdb3             444G    2.2G        442G  .....      /home

i need to know if those are the storage devices that i have on the machine?

another thing is: executing iostat -k generated the following:
sda       0.00          0.00     ....
sdb       4.95          0.12    

the question:
so what are sda and sdb and what are sdb2, sdb3 and udev ?
which of those are my storage devices?
thanks in advance
Who is Participating?
sdX - are scsi disks, where scsi means scsi, sata, usb, etc (and ata disks as well in very fresh kernel)
sdaX - are partition numbers within first scsi disk
udev is special virtual(in-memory only) device mounted on /dev folder.

Seems like first disk is unused (not mounted anywhere).
mte01Author Commented:
so, if i want to calculate my storage size, and the used size, do i simply run the command: df -h
and then calculate the total values?
what about the dvd or cd rooms will they be displayed?
thanks a lot for the fast reply.
> what about the dvd or cd rooms will they be displayed?
Only if they are used (loaded and [auto]mounted).

Basically df shows currently known(in-use) storage. In the provided output there's no partition from /dev/sda mounted. Since it's unused, it's not shown along df output.
Also check /proc/partitions file, it contains all known block devices/partitions along with total sizes.
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

As said above, 'df' will only show you mounted partitions.

You can look what partitions the disks have by (carefully) using the 'fdisk' command.

So, if you want to see the partitions on /dev/sda you would do (as root):

fdisk /dev/sda

That will tell you the total size of the disk, plus partition sizes (in KB, I think).

If there are partitions on /dev/sda, then you would have to mount them to see how much free space they have.
> fdisk /dev/sda
> p
even safer: fdisk -l /dev/sd[a-z]
Duncan RoeSoftware DeveloperCommented:
Also, "swapon -s" will show you partitions being used for swap
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.