Link to home
Start Free TrialLog in
Avatar of mte01
mte01Flag for Lebanon

asked on

know my storage devices, (df -h)

hi,
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
ASKER CERTIFIED SOLUTION
Avatar of ravenpl
ravenpl
Flag of Poland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mte01

ASKER

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.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
> fdisk /dev/sda
> p
even safer: fdisk -l /dev/sd[a-z]
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial